mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Handle post-vs data being padded/aligned instead of tightly packed
This commit is contained in:
@@ -806,8 +806,20 @@ namespace renderdocui.Windows
|
||||
uint offset = 0;
|
||||
for (int i = 0; i < details.OutputSig.Length; i++)
|
||||
{
|
||||
uint numComps = f[i].format.compCount;
|
||||
uint elemSize = f[i].format.compType == FormatComponentType.Double ? 8U : 4U;
|
||||
|
||||
if (m_Core.CurPipelineState.HasAlignedPostVSData)
|
||||
{
|
||||
if (numComps == 2)
|
||||
offset = offset.AlignUp(2U * elemSize);
|
||||
else if (numComps > 2)
|
||||
offset = offset.AlignUp(4U * elemSize);
|
||||
}
|
||||
|
||||
f[i].offset = offset;
|
||||
offset += f[i].format.compCount * sizeof(float);
|
||||
|
||||
offset += numComps * elemSize;
|
||||
}
|
||||
|
||||
ret.BufferFormats = f.ToArray();
|
||||
|
||||
Reference in New Issue
Block a user