rt64
rt64 copied to clipboard
Review possible transition error for Render Target in D3D12
I've been unable to reproduce this error myself. It is possible it is a race condition that will require some luck to trigger. A static code analysis is likely preferable here.
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using Draw on Command List (0x0000020AB1860350:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0x0: D3D12_RESOURCE_STATE_[COMMON|PRESENT]) of resource (0x0000020AB009D740:'Unnamed ID3D12Resource Object') (subresource: 0) is invalid for use as a render target. Expected State Bits (all): 0x4: D3D12_RESOURCE_STATE_RENDER_TARGET, Actual State: 0x0: D3D12_RESOURCE_STATE_[COMMON|PRESENT], Missing State: 0x4: D3D12_RESOURCE_STATE_RENDER_TARGET. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
D3D12: **BREAK** enabled for the previous message, which was: [ ERROR EXECUTION #538: INVALID_SUBRESOURCE_STATE ]
Exception thrown at 0x00007FFE012FBA99 (KernelBase.dll) in Zelda64Recompiled.exe: 0x0000087A (parameters: 0x0000000000000001, 0x000000AFA7CFBE90, 0x000000AFA7CFDC60).
Unhandled exception at 0x00007FFE012FBA99 (KernelBase.dll) in Zelda64Recompiled.exe: 0x0000087A (parameters: 0x0000000000000001, 0x000000AFA7CFBE90, 0x000000AFA7CFDC60).
D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: Using ResourceBarrier on Command List (0x0000020AB1860350:'Unnamed ID3D12GraphicsCommandList Object'): Before state (0x4: D3D12_RESOURCE_STATE_RENDER_TARGET) of resource (0x0000020AB009D740:'Unnamed ID3D12Resource Object') (subresource: 0) specified by transition barrier does not match with the state (0x0: D3D12_RESOURCE_STATE_[COMMON|PRESENT]) specified in the previous call to ResourceBarrier [ RESOURCE_MANIPULATION ERROR #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH]
D3D12: **BREAK** enabled for the previous message, which was: [ ERROR RESOURCE_MANIPULATION #527: RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH ]
Exception thrown at 0x00007FFE012FBA99 (KernelBase.dll) in Zelda64Recompiled.exe: 0x0000087A (parameters: 0x0000000000000001, 0x000000AFA7CFC480, 0x000000AFA7CFE250).
Unhandled exception at 0x00007FFE012FBA99 (KernelBase.dll) in Zelda64Recompiled.exe: 0x0000087A (parameters: 0x0000000000000001, 0x000000AFA7CFC480, 0x000000AFA7CFE250).