Skip to content

Commit c381d09

Browse files
committed
Expand out DXIL Debugger RDCASSERT's which were using ^
1 parent e83786b commit c381d09

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

renderdoc/driver/shaders/dxil/dxil_debug.cpp

+13-3
Original file line numberDiff line numberDiff line change
@@ -3181,7 +3181,10 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
31813181
}
31823182

31833183
uint32_t stride = fmt.stride;
3184-
RDCASSERT(!((stride == 1) ^ byteAddress));
3184+
if(byteAddress)
3185+
RDCASSERTEQUAL(stride, 1);
3186+
else
3187+
RDCASSERTNOTEQUAL(stride, 1);
31853188

31863189
RDCASSERTEQUAL(result.columns, 1);
31873190
RDCASSERTEQUAL(fmt.numComps, result.columns);
@@ -4370,7 +4373,10 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
43704373

43714374
// Ensure global variables use global memory
43724375
// Ensure non-global variables do not use global memory
4373-
RDCASSERT(!((cast<GlobalVar>(inst.args[0]) != NULL) ^ alloc.global));
4376+
if(alloc.global)
4377+
RDCASSERT(cast<GlobalVar>(inst.args[0]));
4378+
else
4379+
RDCASSERT(!cast<GlobalVar>(inst.args[0]));
43744380

43754381
result.type = baseType;
43764382
result.rows = (uint8_t)countElems;
@@ -5423,7 +5429,11 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
54235429
};
54245430

54255431
// Update the result variable
5426-
RDCASSERT(!(result.name.empty() ^ (resultId == DXILDebug::INVALID_ID)));
5432+
if(resultId == DXILDebug::INVALID_ID)
5433+
RDCASSERT(result.name.empty());
5434+
else
5435+
RDCASSERT(!result.name.empty());
5436+
54275437
if(!result.name.empty() && resultId != DXILDebug::INVALID_ID)
54285438
{
54295439
if(m_State)

0 commit comments

Comments
 (0)