Can anyone move this to “Graphics and GPU Programming”? I submit to wrong forum and can not hide this. Sorry :(
The init State of Dest is D3D12_RESOURCE_STATE_UNORDERED_ACCESS,
In my first approch, I wrote:
Transition Dst to D3D12_RESOURCE_STATE_COPY_DEST
DX12Cmdlist→CopyResource(Dst, Src);
PIX gave me Perf hint like this:
If I removed the transition before copyresource, I got runtime DX12 error:
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using CopyResource on Command List (0x000001421176B7D0:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x8: D3D12_RESOURCE_STATE_UNORDERED_ACCESS) of resource (0x000001423C96C140:'Dst') (subresource: 0) is invalid for use as a destination resource. Expected State Bits (all): 0x400: D3D12_RESOURCE_STATE_COPY_DEST, Actual State: 0x8: D3D12_RESOURCE_STATE_UNORDERED_ACCESS, Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
but not understand it. What is the meaning of “Promotion”? It will change resource state? Or just keep the resource's state, don't need to transition its states explicitly?