Fix DXIL Debugger Constants display of cbuffer with packedoffset

The simulation had the correct values

cbuffer packed_consts : register(b1)
{
  float col1z : packoffset(c1.z); // 4+2
  float col2w : packoffset(c2.w); // 8+3
};
This commit is contained in:
Jake Turner
2025-09-23 16:16:32 +01:00
parent bfb0b09db9
commit 0f0da06737
+2 -2
View File
@@ -238,14 +238,14 @@ static void FlattenSingleVariable(const rdcstr &cbufferName, uint32_t byteOffset
{
outvars[outIdx + reg].rows = 1;
outvars[outIdx + reg].type = v.type;
outvars[outIdx + reg].columns = v.columns;
outvars[outIdx + reg].columns = v.columns + (uint8_t)outComp;
outvars[outIdx + reg].flags = v.flags;
}
if(v.RowMajor())
{
for(size_t ri = 0; ri < v.rows; ri++)
memcpy(&outvars[outIdx + ri].value.u32v[0], &v.value.u32v[ri * v.columns],
memcpy(&outvars[outIdx + ri].value.u32v[outComp], &v.value.u32v[ri * v.columns],
sizeof(uint32_t) * v.columns);
}
else