Disallow compaction entirely

* Although we intercept size queries to return the current size instead of
  compacted size, this size can still leak out if a compacted AS is used as the
  source of a subsequent update-build. Also in theory an application could just
  compact then query the current size (possibly for defrag? though you'd expect
  that size to be cached on the CPU from the original compact).
This commit is contained in:
baldurk
2024-11-22 16:15:18 +00:00
parent 3c3ff89e06
commit 9bff5fe29f
@@ -1530,8 +1530,12 @@ void WrappedID3D12GraphicsCommandList::CopyRaytracingAccelerationStructure(
_In_ D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData,
_In_ D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode)
{
D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE compactBlockedMode = Mode;
if(compactBlockedMode == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_COMPACT)
compactBlockedMode = D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_CLONE;
SERIALISE_TIME_CALL(m_pList4->CopyRaytracingAccelerationStructure(
DestAccelerationStructureData, SourceAccelerationStructureData, Mode));
DestAccelerationStructureData, SourceAccelerationStructureData, compactBlockedMode));
if(IsCaptureMode(m_State))
{