Skip to content

Commit

Permalink
Fix a warning about the initial state of a buffer resource (microsoft…
Browse files Browse the repository at this point in the history
  • Loading branch information
codeonwort authored Nov 16, 2022
1 parent 3ffc698 commit 7cd2b15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ void D3D12RaytracingSimpleLighting::BuildAccelerationStructures()
ThrowIfFalse(bottomLevelPrebuildInfo.ResultDataMaxSizeInBytes > 0);

ComPtr<ID3D12Resource> scratchResource;
AllocateUAVBuffer(device, max(topLevelPrebuildInfo.ScratchDataSizeInBytes, bottomLevelPrebuildInfo.ScratchDataSizeInBytes), &scratchResource, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, L"ScratchResource");
AllocateUAVBuffer(device, max(topLevelPrebuildInfo.ScratchDataSizeInBytes, bottomLevelPrebuildInfo.ScratchDataSizeInBytes), &scratchResource, D3D12_RESOURCE_STATE_COMMON, L"ScratchResource");

// Allocate resources for acceleration structures.
// Acceleration structures can only be placed in resources that are created in the default heap (or custom heap equivalent).
Expand Down

0 comments on commit 7cd2b15

Please sign in to comment.