From 3ac2135f01a2b644e6d828c2dfef1f66d61217f9 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 2 Aug 2016 10:39:20 -0700 Subject: [PATCH] Updated for validation warning on Windows 10 Anniversary Update 14393 --- Src/ResourceUploadBatch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/ResourceUploadBatch.cpp b/Src/ResourceUploadBatch.cpp index f1736d46..c59d907f 100644 --- a/Src/ResourceUploadBatch.cpp +++ b/Src/ResourceUploadBatch.cpp @@ -655,7 +655,7 @@ class ResourceUploadBatch::Impl heap.Get(), 0, &aliasDescU32, - D3D12_RESOURCE_STATE_COPY_DEST, + D3D12_RESOURCE_STATE_UNORDERED_ACCESS, nullptr, IID_GRAPHICS_PPV_ARGS(resourceAliasU32.GetAddressOf()))); @@ -714,7 +714,7 @@ class ResourceUploadBatch::Impl AliasBarrier(resourceAliasU32.Get(), resourceAlias8888.Get()); // Transition to pixel shader resource - Transition(resourceAlias8888.Get(), D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); + Transition(resourceAlias8888.Get(), D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); } else { @@ -767,7 +767,7 @@ class ResourceUploadBatch::Impl } // Direct copy back - Transition(resourceCopy.Get(), D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, D3D12_RESOURCE_STATE_COPY_SOURCE); + Transition(resourceCopy.Get(), D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_COPY_SOURCE); Transition(resource, D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_COPY_DEST); mList->CopyResource(resource, resourceCopy.Get()); Transition(resource, D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);