mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 23:16:31 +00:00
Ensure each element in an array is vec4-aligned in cbuffer. Refs #618
This commit is contained in:
@@ -360,6 +360,12 @@ void D3D11DebugManager::FillCBufferVariables(const string &prefix, size_t &offse
|
||||
rowDataOffset = AlignUp(rowDataOffset, sizeof(Vec4f));
|
||||
}
|
||||
|
||||
// arrays are also aligned to the nearest Vec4f for each element
|
||||
if(!flatten && isArray)
|
||||
{
|
||||
rowDataOffset = AlignUp(rowDataOffset, sizeof(Vec4f));
|
||||
}
|
||||
|
||||
if(rowDataOffset < data.size())
|
||||
{
|
||||
const byte *d = &data[rowDataOffset];
|
||||
|
||||
Reference in New Issue
Block a user