From 7cd2b15f46fc4f91448753d34ab9d822aa162875 Mon Sep 17 00:00:00 2001 From: Minseok Lee Date: Thu, 17 Nov 2022 08:16:03 +0900 Subject: [PATCH] Fix a warning about the initial state of a buffer resource (#804) --- .../D3D12RaytracingSimpleLighting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSimpleLighting/D3D12RaytracingSimpleLighting.cpp b/Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSimpleLighting/D3D12RaytracingSimpleLighting.cpp index 08dcc201c..ca2506c5a 100644 --- a/Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSimpleLighting/D3D12RaytracingSimpleLighting.cpp +++ b/Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSimpleLighting/D3D12RaytracingSimpleLighting.cpp @@ -492,7 +492,7 @@ void D3D12RaytracingSimpleLighting::BuildAccelerationStructures() ThrowIfFalse(bottomLevelPrebuildInfo.ResultDataMaxSizeInBytes > 0); ComPtr 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).