From d80f5d9b2d769fd0513ae0e026d8a56b5d56a1fe Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 22 Dec 2018 22:56:19 -0800 Subject: Implemented split barriers (closed https://github.com/DiligentGraphics/DiligentCore/issues/43). --- Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index e04686a9..8ee4090b 100755 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -1871,6 +1871,14 @@ namespace Diligent DEV_CHECK_ERR((Barrier.pTexture != nullptr) ^ (Barrier.pBuffer != nullptr), "Exactly one of pTexture or pBuffer must not be null"); DEV_CHECK_ERR(Barrier.NewState != RESOURCE_STATE_UNKNOWN, "New resource state can't be unknown"); + if (Barrier.TransitionType == STATE_TRANSITION_TYPE_BEGIN) + { + // Skip begin-split barriers + VERIFY(!Barrier.UpdateResourceState, "Resource state can't be updated in begin-split barrier"); + continue; + } + VERIFY(Barrier.TransitionType == STATE_TRANSITION_TYPE_IMMEDIATE || Barrier.TransitionType == STATE_TRANSITION_TYPE_END, "Unexpected barrier type"); + if (Barrier.pTexture) { auto* pTextureD3D11Impl = ValidatedCast(Barrier.pTexture); -- cgit v1.2.3