From eaf444aa176db2631c0a5ad6fa718026eb01fcfe Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 24 Apr 2019 23:14:27 -0700 Subject: Improved error messages about incorrect resource states specified in the barrier --- Graphics/GraphicsEngineD3D12/src/CommandContext.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp b/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp index ef79ba3d..e1f0b473 100644 --- a/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp +++ b/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp @@ -180,7 +180,10 @@ void CommandContext::TransitionResource(const StateTransitionDesc& Barrier) } else { - DEV_CHECK_ERR(Barrier.OldState == RESOURCE_STATE_UNKNOWN || Barrier.OldState == OldState, "Resource state is known (", OldState, ") and does not match OldState (", Barrier.OldState, ") specified in resource barrier. Set OldState member to RESOURCE_STATE_UNKNOWN to make the engine use current resource state"); + DEV_CHECK_ERR(Barrier.OldState == RESOURCE_STATE_UNKNOWN || Barrier.OldState == OldState, + "Resource state is known (", GetResourceStateString(OldState), ") and does not match the OldState (", + GetResourceStateString(Barrier.OldState), ") specified in the resource barrier. Set OldState member to " + "RESOURCE_STATE_UNKNOWN to make the engine use current resource state"); } // Check if required state is already set -- cgit v1.2.3