mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-15 10:15:48 +00:00
Only copy previous push descriptor bindings that were valid
This commit is contained in:
@@ -92,9 +92,10 @@ void DescSetLayout::UpdateBindingsArray(const DescSetLayout &prevLayout,
|
||||
DescriptorSetSlot *newSlots = new DescriptorSetSlot[bindings[i].descriptorCount];
|
||||
|
||||
// copy over any previous bindings that overlapped
|
||||
memcpy(newSlots, descBindings[i],
|
||||
sizeof(DescriptorSetSlot) *
|
||||
RDCMIN(prevLayout.bindings[i].descriptorCount, bindings[i].descriptorCount));
|
||||
if(i < prevLayout.bindings.size())
|
||||
memcpy(newSlots, descBindings[i],
|
||||
sizeof(DescriptorSetSlot) *
|
||||
RDCMIN(prevLayout.bindings[i].descriptorCount, bindings[i].descriptorCount));
|
||||
|
||||
// delete old array, and assign the new one
|
||||
SAFE_DELETE_ARRAY(descBindings[i]);
|
||||
|
||||
Reference in New Issue
Block a user