Skip to content

Commit

Permalink
Expand out DXIL Debugger RDCASSERT's which were using ^
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorro666 committed Jan 7, 2025
1 parent e83786b commit c381d09
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions renderdoc/driver/shaders/dxil/dxil_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3181,7 +3181,10 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
}

uint32_t stride = fmt.stride;
RDCASSERT(!((stride == 1) ^ byteAddress));
if(byteAddress)
RDCASSERTEQUAL(stride, 1);
else
RDCASSERTNOTEQUAL(stride, 1);

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

// Ensure global variables use global memory
// Ensure non-global variables do not use global memory
RDCASSERT(!((cast<GlobalVar>(inst.args[0]) != NULL) ^ alloc.global));
if(alloc.global)
RDCASSERT(cast<GlobalVar>(inst.args[0]));
else
RDCASSERT(!cast<GlobalVar>(inst.args[0]));

result.type = baseType;
result.rows = (uint8_t)countElems;
Expand Down Expand Up @@ -5423,7 +5429,11 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
};

// Update the result variable
RDCASSERT(!(result.name.empty() ^ (resultId == DXILDebug::INVALID_ID)));
if(resultId == DXILDebug::INVALID_ID)
RDCASSERT(result.name.empty());
else
RDCASSERT(!result.name.empty());

if(!result.name.empty() && resultId != DXILDebug::INVALID_ID)
{
if(m_State)
Expand Down

0 comments on commit c381d09

Please sign in to comment.