From bc1504bd7443a799682383af0d254c0bffc32f27 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Mon, 17 Nov 2025 11:42:57 +1300 Subject: [PATCH] Get the base type form the encoded GPUPointer for DXIL Atomic operations --- renderdoc/driver/shaders/dxil/dxil_debug.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/renderdoc/driver/shaders/dxil/dxil_debug.cpp b/renderdoc/driver/shaders/dxil/dxil_debug.cpp index 5746e4ed3..68f9d23cc 100644 --- a/renderdoc/driver/shaders/dxil/dxil_debug.cpp +++ b/renderdoc/driver/shaders/dxil/dxil_debug.cpp @@ -7619,6 +7619,20 @@ void ThreadState::OperationAtomic(const DXIL::Instruction &inst, DXIL::Operation a = m_Variables[ptrId]; } + // Get the underling type of the GPUPointer + if(a.type == VarType::GPUPointer) + { + Id id; + uint64_t offset; + uint64_t size; + VarType baseType; + // Decode the pointer allocation: ptrId, offset, size + RDCASSERT(DecodePointer(id, offset, size, baseType, a)); + RDCASSERTEQUAL(baseMemoryId, id); + RDCASSERTEQUAL(allocSize, size); + a.type = baseType; + } + // GSM variable, read from the global backing memory if(allocation.gsm) {