Handle getting descriptor access at EIDs where root params are unbound

This commit is contained in:
baldurk
2024-05-28 15:09:11 +01:00
parent 11463be8a7
commit 45db4fef33
+12
View File
@@ -1964,6 +1964,14 @@ rdcarray<DescriptorAccess> D3D12Replay::GetDescriptorAccess(uint32_t eventId)
continue;
}
// otherwise the access may be to a rootsig element that's not bound if the current event is
// not a valid draw or dispatch
if(rootIndex >= rootSig.sigelems.size())
{
access.descriptorStore = ResourceId();
continue;
}
const D3D12RenderState::SignatureElement &rootEl = rootSig.sigelems[rootIndex];
// this indicates a root parameter
@@ -1982,6 +1990,10 @@ rdcarray<DescriptorAccess> D3D12Replay::GetDescriptorAccess(uint32_t eventId)
access.byteOffset += (uint32_t)rootEl.offset;
}
}
// remove any invalid / unbound root element accesses
ret.removeIf(
[](const DescriptorAccess &access) { return access.descriptorStore == ResourceId(); });
}
return ret;