mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-26 09:21:37 +00:00
Rename some config variables to better be agnostic over SPIR-V and DXIL
This commit is contained in:
@@ -36,8 +36,7 @@ RDOC_CONFIG(bool, D3D12_DXILShaderDebugger_Logging, false,
|
||||
RDOC_CONFIG(bool, D3D12_DXILShaderDebugger_EnableMT, true,
|
||||
"Use multiple threads to run the shader debugger simulation.");
|
||||
|
||||
RDOC_DEBUG_CONFIG(bool, D3D12_Hack_ShaderDebugUsesJobSystemJobs, false,
|
||||
"Use individual job system jobs to run shader debugging simulation.");
|
||||
RDOC_EXTERN_CONFIG(bool, Shader_Debug_UseJobSystemJobs);
|
||||
|
||||
#if ENABLED(RDOC_RELEASE)
|
||||
#define CHECK_DEBUGGER_THREAD() \
|
||||
@@ -9990,7 +9989,7 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *apiWrapper, uint32_t eve
|
||||
AtomicStore(&atomic_simulationFinished, 0);
|
||||
if(m_MTSimulation)
|
||||
{
|
||||
if(!D3D12_Hack_ShaderDebugUsesJobSystemJobs())
|
||||
if(!Shader_Debug_UseJobSystemJobs())
|
||||
{
|
||||
uint32_t countJobs = RDCMIN(threadsInWorkgroup, Threading::JobSystem::GetCountWorkers() / 2U);
|
||||
for(uint32_t i = 0; i < countJobs; ++i)
|
||||
@@ -10656,7 +10655,7 @@ void Debugger::QueueJob(uint32_t lane)
|
||||
thread.SetStepQueued();
|
||||
if(m_MTSimulation)
|
||||
{
|
||||
if(D3D12_Hack_ShaderDebugUsesJobSystemJobs())
|
||||
if(Shader_Debug_UseJobSystemJobs())
|
||||
{
|
||||
Threading::JobSystem::AddJob(
|
||||
[this, lane]() { StepThread(lane, StepThreadMode::RUN_MULTIPLE_STEPS); });
|
||||
|
||||
@@ -109,6 +109,7 @@ public:
|
||||
virtual ~DebugAPIWrapper() {}
|
||||
virtual void AddDebugMessage(MessageCategory c, MessageSeverity sv, MessageSource src, rdcstr d) = 0;
|
||||
|
||||
virtual bool SimulateThreaded() = 0;
|
||||
virtual ResourceId GetShaderID() = 0;
|
||||
|
||||
virtual uint64_t GetBufferLength(const ShaderBindIndex &bind) = 0;
|
||||
|
||||
@@ -30,13 +30,10 @@
|
||||
#include "spirv_op_helpers.h"
|
||||
#include "spirv_reflect.h"
|
||||
|
||||
RDOC_CONFIG(bool, Vulkan_Debug_UseDebugColumnInformation, false,
|
||||
RDOC_CONFIG(bool, Shader_Debug_SPIRVUseDebugColumnInformation, false,
|
||||
"Control whether column information should be read from vulkan debug info.");
|
||||
|
||||
RDOC_CONFIG(bool, Vulkan_Debug_EnableShaderDebugMT, true,
|
||||
"Use multiple threads to run the shader debugger simulation.");
|
||||
|
||||
RDOC_DEBUG_CONFIG(bool, Vulkan_Hack_ShaderDebugUsesJobSystemJobs, false,
|
||||
RDOC_DEBUG_CONFIG(bool, Shader_Debug_UseJobSystemJobs, false,
|
||||
"Use individual job system jobs to run shader debugging simulation.");
|
||||
|
||||
using namespace rdcshaders;
|
||||
@@ -1823,14 +1820,14 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *api, const ShaderStage s
|
||||
ret->samplers = global.samplers;
|
||||
ret->inputs = active.inputs;
|
||||
|
||||
mtSimulation = Vulkan_Debug_EnableShaderDebugMT();
|
||||
mtSimulation = apiWrapper->SimulateThreaded();
|
||||
if(threadsInWorkgroup < 4)
|
||||
mtSimulation = false;
|
||||
|
||||
AtomicStore(&atomic_simulationFinished, 0);
|
||||
if(mtSimulation)
|
||||
{
|
||||
if(!Vulkan_Hack_ShaderDebugUsesJobSystemJobs())
|
||||
if(!Shader_Debug_UseJobSystemJobs())
|
||||
{
|
||||
uint32_t countJobs = RDCMIN(threadsInWorkgroup, Threading::JobSystem::GetCountWorkers() / 2U);
|
||||
for(uint32_t i = 0; i < countJobs; ++i)
|
||||
@@ -4453,7 +4450,7 @@ void Debugger::RegisterOp(Iter it)
|
||||
{
|
||||
m_CurLineCol.lineStart = EvaluateConstant(dbg.arg<Id>(1), {}).value.u32v[0];
|
||||
m_CurLineCol.lineEnd = EvaluateConstant(dbg.arg<Id>(2), {}).value.u32v[0];
|
||||
if(Vulkan_Debug_UseDebugColumnInformation())
|
||||
if(Shader_Debug_SPIRVUseDebugColumnInformation())
|
||||
{
|
||||
m_CurLineCol.colStart = EvaluateConstant(dbg.arg<Id>(3), {}).value.u32v[0];
|
||||
m_CurLineCol.colEnd = EvaluateConstant(dbg.arg<Id>(4), {}).value.u32v[0];
|
||||
@@ -5012,7 +5009,7 @@ void Debugger::QueueJob(uint32_t lane)
|
||||
thread.SetStepQueued();
|
||||
if(mtSimulation)
|
||||
{
|
||||
if(Vulkan_Hack_ShaderDebugUsesJobSystemJobs())
|
||||
if(Shader_Debug_UseJobSystemJobs())
|
||||
{
|
||||
Threading::JobSystem::AddJob(
|
||||
[this, lane]() { StepThread(lane, StepThreadMode::RUN_MULTIPLE_STEPS); });
|
||||
|
||||
@@ -40,6 +40,9 @@ RDOC_CONFIG(rdcstr, Vulkan_Debug_PSDebugDumpDirPath, "",
|
||||
RDOC_CONFIG(bool, Vulkan_Debug_ShaderDebugLogging, false,
|
||||
"Output verbose debug logging messages when debugging shaders.");
|
||||
|
||||
RDOC_CONFIG(bool, Vulkan_Debug_EnableShaderDebugMT, true,
|
||||
"Use multiple threads to run the shader debugger simulation.");
|
||||
|
||||
// needed for old linux compilers
|
||||
namespace std
|
||||
{
|
||||
@@ -292,6 +295,8 @@ public:
|
||||
m_pDriver->AddDebugMessage(cat, sev, src, desc);
|
||||
}
|
||||
|
||||
virtual bool SimulateThreaded() override { return Vulkan_Debug_EnableShaderDebugMT(); }
|
||||
|
||||
virtual ResourceId GetShaderID() override { return m_ShaderID; }
|
||||
|
||||
virtual uint64_t GetBufferLength(const ShaderBindIndex &bind) override
|
||||
|
||||
Reference in New Issue
Block a user