diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-10-30 21:18:45 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-10-30 21:18:45 +0000 |
| commit | 076e2f20ce80ef9ea6ccb351c2bfdc3b99ac8015 (patch) | |
| tree | c750936f9e5cb8a3bb2743d8497b287245e596b3 /Graphics/GraphicsEngineD3D11 | |
| parent | Added include tests for BLAS, TLAS and SBT headers, fixed few issues (diff) | |
| download | DiligentCore-076e2f20ce80ef9ea6ccb351c2bfdc3b99ac8015.tar.gz DiligentCore-076e2f20ce80ef9ea6ccb351c2bfdc3b99ac8015.zip | |
A number of minor updates
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
| -rwxr-xr-x | Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index e42dd2d0..54c9b3c4 100755 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -2167,8 +2167,7 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State } VERIFY(Barrier.TransitionType == STATE_TRANSITION_TYPE_IMMEDIATE || Barrier.TransitionType == STATE_TRANSITION_TYPE_END, "Unexpected barrier type"); - RefCntAutoPtr<TextureBaseD3D11> pTexture{Barrier.pResource, IID_TextureD3D11}; - if (pTexture) + if (RefCntAutoPtr<TextureBaseD3D11> pTexture{Barrier.pResource, IID_TextureD3D11}) { auto OldState = Barrier.OldState; if (OldState == RESOURCE_STATE_UNKNOWN) @@ -2218,11 +2217,8 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State { pTexture->SetState(Barrier.NewState); } - continue; } - - RefCntAutoPtr<BufferD3D11Impl> pBuffer{Barrier.pResource, IID_BufferD3D11}; - if (pBuffer) + else if (RefCntAutoPtr<BufferD3D11Impl> pBuffer{Barrier.pResource, IID_BufferD3D11}) { auto OldState = Barrier.OldState; if (OldState == RESOURCE_STATE_UNKNOWN) @@ -2262,10 +2258,11 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State { pBuffer->SetState(Barrier.NewState); } - continue; } - - UNEXPECTED("unsupported resource type"); + else + { + UNEXPECTED("The type of resource '", Barrier.pResource->GetDesc().Name, "' is not support in D3D11"); + } } } |
