From 076e2f20ce80ef9ea6ccb351c2bfdc3b99ac8015 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 30 Oct 2020 14:18:45 -0700 Subject: A number of minor updates --- .../GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') 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 pTexture{Barrier.pResource, IID_TextureD3D11}; - if (pTexture) + if (RefCntAutoPtr 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 pBuffer{Barrier.pResource, IID_BufferD3D11}; - if (pBuffer) + else if (RefCntAutoPtr 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"); + } } } -- cgit v1.2.3