Fix tracking of dynamic offsets when binding multiple descriptor sets

Before this, when binding multiple sets that use dynamic offsets, the
wrong offsets would be stored for all sets other than the first. This
caused the wrong offsets to be used when replaying individual draws.
This commit is contained in:
Alex Smith authored and baldurk committed 2017-09-13 12:31:31 +01:00
1 parent 41ba1dcba5
commit 2ae8fb9602
1 file changed
+1
@@ -1334,6 +1334,7 @@ bool WrappedVulkan::Serialise_vkCmdBindDescriptorSets(
descsets[first + i].descSet = descriptorIDs[i];
uint32_t dynCount = m_CreationInfo.m_DescSetLayout[descSetLayouts[first + i]].dynamicCount;
descsets[first + i].offsets.assign(offsIter, offsIter + dynCount);
offsIter += dynCount;
dynConsumed += dynCount;
RDCASSERT(dynConsumed <= offsCount);
}