Skip to content

Commit edf9dda

Browse files
committed
Use ENABLED(RDOC_RELEASE), ENABLED(RDOC_DEVEL) instead of #if defined
1 parent 0194951 commit edf9dda

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

renderdoc/driver/d3d12/d3d12_dxil_debug.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
using namespace DXIL;
3838
using namespace DXILDebug;
3939

40-
#if defined(RELEASE)
40+
#if ENABLED(RDOC_RELEASE)
4141
#define CHECK_DEVICE_THREAD()
4242
#else
4343
#define CHECK_DEVICE_THREAD() \
4444
RDCASSERTMSG("API Wrapper function called from non-device thread!", IsDeviceThread());
45-
#endif // #if defined(RELEASE)
45+
#endif // #if ENABLED(RDOC_RELEASE)
4646

4747
namespace DXILDebug
4848
{

renderdoc/driver/shaders/dxil/dxil_debug.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,25 @@ RDOC_CONFIG(bool, D3D12_DXILShaderDebugger_EnableMT, true,
3939
RDOC_DEBUG_CONFIG(bool, D3D12_Hack_ShaderDebugUsesJobSystemJobs, false,
4040
"Use individual job system jobs to run shader debugging simulation.");
4141

42-
#if defined(RELEASE)
42+
#if ENABLED(RDOC_RELEASE)
4343
#define CHECK_DEBUGGER_THREAD() \
4444
do \
4545
{ \
4646
} while((void)0, 0)
4747
#else
4848
#define CHECK_DEBUGGER_THREAD() \
4949
RDCASSERTMSG("Debugger function called from non-device thread!", IsDeviceThread());
50-
#endif // #if defined(RELEASE)
50+
#endif // #if ENABLED(RDOC_RELEASE)
5151

52-
#if defined(RELEASE)
52+
#if ENABLED(RDOC_RELEASE)
5353
#define THREADSTATE_CHECK_DEBUGGER_THREAD() \
5454
do \
5555
{ \
5656
} while((void)0, 0)
5757
#else
5858
#define THREADSTATE_CHECK_DEBUGGER_THREAD() \
5959
RDCASSERTMSG("Function called from non-debugger thread!", m_Debugger.IsDeviceThread());
60-
#endif // #if defined(RELEASE)
60+
#endif // #if ENABLED(RDOC_RELEASE)
6161

6262
using namespace rdcshaders;
6363

@@ -10112,15 +10112,15 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
1011210112
continue;
1011310113

1011410114
const rdcarray<ThreadReference> &threadRefs = tangle.GetThreadRefs();
10115-
#if !defined(RELEASE)
10115+
#if ENABLED(RDOC_DEVEL)
1011610116
for(const ThreadReference &ref : threadRefs)
1011710117
{
1011810118
const uint32_t threadId = ref.id;
1011910119
const uint32_t lane = threadId;
1012010120
ThreadState &thread = m_Workgroup[lane];
1012110121
RDCASSERT(!thread.IsSimulationStepActive());
1012210122
}
10123-
#endif // #if !defined(RELEASE)
10123+
#endif // #if ENABLED(RDOC_DEVEL)
1012410124

1012510125
const DXIL::BlockArray *newPartialConvergentPoints = NULL;
1012610126
ExecutionPoint newConvergencePoint = INVALID_EXECUTION_POINT;

renderdoc/driver/shaders/dxil/dxil_debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "dxil_controlflow.h"
3535
#include "dxil_debuginfo.h"
3636

37-
#if defined(RELEASE)
37+
#if ENABLED(RDOC_RELEASE)
3838
#define DXIL_DEBUG_RDCASSERT(...) \
3939
do \
4040
{ \

renderdoc/driver/shaders/spirv/spirv_debug.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636

3737
using namespace rdcshaders;
3838

39-
#if defined(RELEASE)
39+
#if ENABLED(RDOC_RELEASE)
4040
#define CHECK_DEBUGGER_THREAD() \
4141
do \
4242
{ \
4343
} while((void)0, 0)
4444
#else
4545
#define CHECK_DEBUGGER_THREAD() \
4646
RDCASSERTMSG("Function called from non-debugger thread!", debugger.IsDeviceThread());
47-
#endif // #if defined(RELEASE)
47+
#endif // #if ENABLED(RDOC_RELEASE)
4848

4949
static bool ContainsNaNInf(const ShaderVariable &var)
5050
{

renderdoc/driver/shaders/spirv/spirv_debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "spirv_common.h"
3131
#include "spirv_processor.h"
3232

33-
#if defined(RELEASE)
33+
#if ENABLED(RDOC_RELEASE)
3434
#define SPIRV_DEBUG_RDCASSERT(...) \
3535
do \
3636
{ \

renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,15 @@ void AssignValue(ShaderVariable &dst, const ShaderVariable &src)
281281
AssignValue(dst.members[i], src.members[i]);
282282
}
283283

284-
#if defined(RELEASE)
284+
#if ENABLED(RDOC_RELEASE)
285285
#define CHECK_DEBUGGER_THREAD() \
286286
do \
287287
{ \
288288
} while((void)0, 0)
289289
#else
290290
#define CHECK_DEBUGGER_THREAD() \
291291
RDCASSERTMSG("Debugger function called from non-device thread!", IsDeviceThread());
292-
#endif // #if defined(RELEASE)
292+
#endif // #if ENABLED(RDOC_RELEASE)
293293

294294
Debugger::Debugger() : deviceThreadID(Threading::GetCurrentID())
295295
{
@@ -2800,15 +2800,15 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
28002800
continue;
28012801

28022802
const rdcarray<ThreadReference> &threadRefs = tangle.GetThreadRefs();
2803-
#if !defined(RELEASE)
2803+
#if ENABLED(RDOC_DEVEL)
28042804
for(const ThreadReference &ref : threadRefs)
28052805
{
28062806
const uint32_t threadId = ref.id;
28072807
const uint32_t lane = threadId;
28082808
ThreadState &thread = workgroup[lane];
28092809
RDCASSERT(!thread.IsSimulationStepActive());
28102810
}
2811-
#endif // #if !defined(RELEASE)
2811+
#endif // #if ENABLED(RDOC_DEVEL)
28122812

28132813
ExecutionPoint newConvergeInstruction = INVALID_EXECUTION_POINT;
28142814
ExecutionPoint newFunctionReturnPoint = INVALID_EXECUTION_POINT;

renderdoc/driver/vulkan/vk_shaderdebug.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ struct ShaderUniformParameters
122122
float minlod;
123123
};
124124

125-
#if defined(RELEASE)
125+
#if ENABLED(RDOC_RELEASE)
126126
#define CHECK_DEVICE_THREAD()
127127
#else
128128
#define CHECK_DEVICE_THREAD() \
129129
RDCASSERTMSG("API Wrapper function called from non-device thread!", IsDeviceThread());
130-
#endif // #if defined(RELEASE)
130+
#endif // #if ENABLED(RDOC_RELEASE)
131131

132132
class VulkanAPIWrapper : public rdcspv::DebugAPIWrapper
133133
{

0 commit comments

Comments
 (0)