Skip to content

Commit 60d0c6b

Browse files
committed
Handle NULL resource for AtomicOp's
Was already handled for UAV Load/Stores Increase assert value for components (maximum is 16 instead of 4)
1 parent bfe042a commit 60d0c6b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

renderdoc/driver/shaders/dxil/dxil_debug.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -3394,7 +3394,15 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
33943394
RDCERR("Unhandled dxOpCode %s", ToStr(dxOpCode).c_str());
33953395
}
33963396

3397-
TypedUAVStore(fmt, (byte *)data, res.value);
3397+
// NULL resource or out of bounds
3398+
if((!texData && elemIdx >= numElems) || (texData && dataOffset >= dataSize))
3399+
{
3400+
RDCERR("Ignoring store to unbound resource %s", GetArgumentName(1).c_str());
3401+
}
3402+
else
3403+
{
3404+
TypedUAVStore(fmt, (byte *)data, res.value);
3405+
}
33983406

33993407
// result is the original value
34003408
result.value = a.value;
@@ -5733,7 +5741,7 @@ void ThreadState::SetResult(const Id &id, ShaderVariable &result, Operation op,
57335741
ShaderEvents flags)
57345742
{
57355743
RDCASSERT((result.rows > 0 && result.columns > 0) || !result.members.empty());
5736-
RDCASSERT(result.columns <= 4);
5744+
RDCASSERT(result.columns <= 16);
57375745
RDCASSERTNOTEQUAL(result.type, VarType::Unknown);
57385746

57395747
// Can only flush denorms for float types

0 commit comments

Comments
 (0)