mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 06:36:08 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user