From c15b89975b4ec4c72827c683e9a9c7ed75a0e057 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sat, 4 Feb 2023 20:57:44 +0000 Subject: [PATCH] Allocate a general purpose GPU-side debug tracing buffer Can be used for checkpoints, etc. --- app/src/main/cpp/skyline/gpu.cpp | 3 ++- app/src/main/cpp/skyline/gpu.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/gpu.cpp b/app/src/main/cpp/skyline/gpu.cpp index 192f802a..84e0d765 100644 --- a/app/src/main/cpp/skyline/gpu.cpp +++ b/app/src/main/cpp/skyline/gpu.cpp @@ -402,7 +402,8 @@ namespace skyline::gpu { descriptor(*this), helperShaders(*this, state.os->assetFileSystem), renderPassCache(*this), - framebufferCache(*this) {} + framebufferCache(*this), + debugTracingBuffer(memory.AllocateBuffer(DebugTracingBufferSize)) {} void GPU::Initialise() { std::string titleId{state.loader->nacp->GetSaveDataOwnerId()}; diff --git a/app/src/main/cpp/skyline/gpu.h b/app/src/main/cpp/skyline/gpu.h index ab5fcfec..454b46e6 100644 --- a/app/src/main/cpp/skyline/gpu.h +++ b/app/src/main/cpp/skyline/gpu.h @@ -68,6 +68,9 @@ namespace skyline::gpu { std::optional graphicsPipelineManager; interconnect::kepler_compute::PipelineManager computePipelineManager; + static constexpr size_t DebugTracingBufferSize{0x80000}; //!< 512KiB + memory::Buffer debugTracingBuffer; //!< General use buffer for debug tracing, first 4 bytes are allocated for checkpoints + GPU(const DeviceState &state); /**