Use ENABLED(RDOC_RELEASE), ENABLED(RDOC_DEVEL) instead of #if defined

This commit is contained in:
Jake Turner committed 2025-11-13 03:34:55 +13:00
1 parent 0194951bca
commit edf9ddacf0
7 files changed
+18 -18

No files matched your search

+2 -2
View File
@@ -37,12 +37,12 @@
using namespace DXIL;
using namespace DXILDebug;
#if defined(RELEASE)
#if ENABLED(RDOC_RELEASE)
#define CHECK_DEVICE_THREAD()
#else
#define CHECK_DEVICE_THREAD() \
RDCASSERTMSG("API Wrapper function called from non-device thread!", IsDeviceThread());
#endif // #if defined(RELEASE)
#endif // #if ENABLED(RDOC_RELEASE)
namespace DXILDebug
{
+6 -6
View File
@@ -39,7 +39,7 @@ RDOC_CONFIG(bool, D3D12_DXILShaderDebugger_EnableMT, true,
RDOC_DEBUG_CONFIG(bool, D3D12_Hack_ShaderDebugUsesJobSystemJobs, false,
"Use individual job system jobs to run shader debugging simulation.");
#if defined(RELEASE)
#if ENABLED(RDOC_RELEASE)
#define CHECK_DEBUGGER_THREAD() \
do \
{ \
@@ -47,9 +47,9 @@ RDOC_DEBUG_CONFIG(bool, D3D12_Hack_ShaderDebugUsesJobSystemJobs, false,
#else
#define CHECK_DEBUGGER_THREAD() \
RDCASSERTMSG("Debugger function called from non-device thread!", IsDeviceThread());
#endif // #if defined(RELEASE)
#endif // #if ENABLED(RDOC_RELEASE)
#if defined(RELEASE)
#if ENABLED(RDOC_RELEASE)
#define THREADSTATE_CHECK_DEBUGGER_THREAD() \
do \
{ \
@@ -57,7 +57,7 @@ RDOC_DEBUG_CONFIG(bool, D3D12_Hack_ShaderDebugUsesJobSystemJobs, false,
#else
#define THREADSTATE_CHECK_DEBUGGER_THREAD() \
RDCASSERTMSG("Function called from non-debugger thread!", m_Debugger.IsDeviceThread());
#endif // #if defined(RELEASE)
#endif // #if ENABLED(RDOC_RELEASE)
using namespace rdcshaders;
@@ -10112,7 +10112,7 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
continue;
const rdcarray<ThreadReference> &threadRefs = tangle.GetThreadRefs();
#if !defined(RELEASE)
#if ENABLED(RDOC_DEVEL)
for(const ThreadReference &ref : threadRefs)
{
const uint32_t threadId = ref.id;
@@ -10120,7 +10120,7 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
ThreadState &thread = m_Workgroup[lane];
RDCASSERT(!thread.IsSimulationStepActive());
}
#endif // #if !defined(RELEASE)
#endif // #if ENABLED(RDOC_DEVEL)
const DXIL::BlockArray *newPartialConvergentPoints = NULL;
ExecutionPoint newConvergencePoint = INVALID_EXECUTION_POINT;
+1 -1
View File
@@ -34,7 +34,7 @@
#include "dxil_controlflow.h"
#include "dxil_debuginfo.h"
#if defined(RELEASE)
#if ENABLED(RDOC_RELEASE)
#define DXIL_DEBUG_RDCASSERT(...) \
do \
{ \
@@ -36,7 +36,7 @@
using namespace rdcshaders;
#if defined(RELEASE)
#if ENABLED(RDOC_RELEASE)
#define CHECK_DEBUGGER_THREAD() \
do \
{ \
@@ -44,7 +44,7 @@ using namespace rdcshaders;
#else
#define CHECK_DEBUGGER_THREAD() \
RDCASSERTMSG("Function called from non-debugger thread!", debugger.IsDeviceThread());
#endif // #if defined(RELEASE)
#endif // #if ENABLED(RDOC_RELEASE)
static bool ContainsNaNInf(const ShaderVariable &var)
{
+1 -1
View File
@@ -30,7 +30,7 @@
#include "spirv_common.h"
#include "spirv_processor.h"
#if defined(RELEASE)
#if ENABLED(RDOC_RELEASE)
#define SPIRV_DEBUG_RDCASSERT(...) \
do \
{ \
@@ -281,7 +281,7 @@ void AssignValue(ShaderVariable &dst, const ShaderVariable &src)
AssignValue(dst.members[i], src.members[i]);
}
#if defined(RELEASE)
#if ENABLED(RDOC_RELEASE)
#define CHECK_DEBUGGER_THREAD() \
do \
{ \
@@ -289,7 +289,7 @@ void AssignValue(ShaderVariable &dst, const ShaderVariable &src)
#else
#define CHECK_DEBUGGER_THREAD() \
RDCASSERTMSG("Debugger function called from non-device thread!", IsDeviceThread());
#endif // #if defined(RELEASE)
#endif // #if ENABLED(RDOC_RELEASE)
Debugger::Debugger() : deviceThreadID(Threading::GetCurrentID())
{
@@ -2800,7 +2800,7 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
continue;
const rdcarray<ThreadReference> &threadRefs = tangle.GetThreadRefs();
#if !defined(RELEASE)
#if ENABLED(RDOC_DEVEL)
for(const ThreadReference &ref : threadRefs)
{
const uint32_t threadId = ref.id;
@@ -2808,7 +2808,7 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
ThreadState &thread = workgroup[lane];
RDCASSERT(!thread.IsSimulationStepActive());
}
#endif // #if !defined(RELEASE)
#endif // #if ENABLED(RDOC_DEVEL)
ExecutionPoint newConvergeInstruction = INVALID_EXECUTION_POINT;
ExecutionPoint newFunctionReturnPoint = INVALID_EXECUTION_POINT;
+2 -2
View File
@@ -122,12 +122,12 @@ struct ShaderUniformParameters
float minlod;
};
#if defined(RELEASE)
#if ENABLED(RDOC_RELEASE)
#define CHECK_DEVICE_THREAD()
#else
#define CHECK_DEVICE_THREAD() \
RDCASSERTMSG("API Wrapper function called from non-device thread!", IsDeviceThread());
#endif // #if defined(RELEASE)
#endif // #if ENABLED(RDOC_RELEASE)
class VulkanAPIWrapper : public rdcspv::DebugAPIWrapper
{