From d7f7be63a974771c52526ca629faa1a86f60a85d Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Thu, 2 Oct 2025 05:24:48 +0100 Subject: [PATCH] Spirv debugger small tidy up for consistency Rename: simulationFinished -> atomic_simulationFinished Vulkan_Hack_ShaderDebugUsesJobSystemQueue -> Vulkan_Hack_ShaderDebugUsesJobSystemJobs --- renderdoc/driver/shaders/spirv/spirv_debug.h | 2 +- .../driver/shaders/spirv/spirv_debug_setup.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/renderdoc/driver/shaders/spirv/spirv_debug.h b/renderdoc/driver/shaders/spirv/spirv_debug.h index 9e0629cd6..2856355a1 100644 --- a/renderdoc/driver/shaders/spirv/spirv_debug.h +++ b/renderdoc/driver/shaders/spirv/spirv_debug.h @@ -814,7 +814,7 @@ private: rdcarray pendingGpuSampleGatherOpsResults; uint64_t deviceThreadID; - int32_t simulationFinished; + int32_t atomic_simulationFinished; bool mtSimulation; }; diff --git a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp index 55e14309a..6c9f30189 100644 --- a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp @@ -36,8 +36,8 @@ RDOC_CONFIG(bool, Vulkan_Debug_UseDebugColumnInformation, false, RDOC_CONFIG(bool, Vulkan_Debug_EnableShaderDebugMT, true, "Use multiple threads to run the shader debugger simulation."); -RDOC_DEBUG_CONFIG(bool, Vulkan_Hack_ShaderDebugUsesJobSystemQueue, false, - "Work in progress run shader debugging simulation in job system queue."); +RDOC_DEBUG_CONFIG(bool, Vulkan_Hack_ShaderDebugUsesJobSystemJobs, false, + "Use individual job system jobs to run shader debugging simulation."); using namespace rdcshaders; @@ -292,7 +292,7 @@ Debugger::Debugger() : deviceThreadID(Threading::GetCurrentID()) Debugger::~Debugger() { - AtomicStore(&simulationFinished, 1); + AtomicStore(&atomic_simulationFinished, 1); Threading::JobSystem::SyncAllJobs(); SAFE_DELETE(apiWrapper); } @@ -1783,10 +1783,10 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *api, const ShaderStage s if(threadsInWorkgroup < 4) mtSimulation = false; - AtomicStore(&simulationFinished, 0); + AtomicStore(&atomic_simulationFinished, 0); if(mtSimulation) { - if(!Vulkan_Hack_ShaderDebugUsesJobSystemQueue()) + if(!Vulkan_Hack_ShaderDebugUsesJobSystemJobs()) { uint32_t countJobs = RDCMIN(threadsInWorkgroup, Threading::JobSystem::GetCountWorkers() / 2U); for(uint32_t i = 0; i < countJobs; ++i) @@ -2651,7 +2651,7 @@ rdcarray Debugger::ContinueDebug() // if we've finished, return an empty set to signify that if(active.Finished()) { - AtomicStore(&simulationFinished, 1); + AtomicStore(&atomic_simulationFinished, 1); Threading::JobSystem::SyncAllJobs(); return ret; } @@ -4691,7 +4691,7 @@ DebugAPIWrapper *Debugger::GetAPIWrapper() const void Debugger::SimulationJobHelper() { - while(AtomicLoad(&simulationFinished) == 0) + while(AtomicLoad(&atomic_simulationFinished) == 0) { for(uint32_t lane = 0; lane < workgroup.size(); ++lane) { @@ -4921,7 +4921,7 @@ void Debugger::QueueJob(uint32_t lane) thread.SetStepQueued(); if(mtSimulation) { - if(Vulkan_Hack_ShaderDebugUsesJobSystemQueue()) + if(Vulkan_Hack_ShaderDebugUsesJobSystemJobs()) { Threading::JobSystem::AddJob( [this, lane]() { StepThread(lane, StepThreadMode::RUN_MULTIPLE_STEPS); });