From 41e5a5404dd18c748a8355c0796d5e53f793c3b9 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 21 Nov 2018 10:01:10 -0800 Subject: Implemented explicit resource state transitions --- Tests/TestApp/src/TestDrawCommands.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Tests/TestApp/src/TestDrawCommands.cpp') diff --git a/Tests/TestApp/src/TestDrawCommands.cpp b/Tests/TestApp/src/TestDrawCommands.cpp index bab6c3e..1c0a5ea 100644 --- a/Tests/TestApp/src/TestDrawCommands.cpp +++ b/Tests/TestApp/src/TestDrawCommands.cpp @@ -267,6 +267,17 @@ void TestDrawCommands::Draw() Uint32 Offsets[] = {0, 0}; m_pDeviceContext->SetVertexBuffers( 0, 1, pBuffs, Offsets, SET_VERTEX_BUFFERS_FLAG_RESET); + StateTransitionDesc Barriers[] = + { + {m_pVertexBuff, RESOURCE_STATE_UNKNOWN, RESOURCE_STATE_VERTEX_BUFFER, true}, + {m_pVertexBuff2, RESOURCE_STATE_UNKNOWN, RESOURCE_STATE_VERTEX_BUFFER, true}, + {m_pInstanceData, RESOURCE_STATE_UNKNOWN, RESOURCE_STATE_VERTEX_BUFFER, true}, + {m_pIndexBuff, RESOURCE_STATE_UNKNOWN, RESOURCE_STATE_INDEX_BUFFER, true}, + {m_pIndirectDrawArgs, RESOURCE_STATE_UNKNOWN, RESOURCE_STATE_INDIRECT_ARGUMENT, true}, + {m_pIndexedIndirectDrawArgs, RESOURCE_STATE_UNKNOWN, RESOURCE_STATE_INDIRECT_ARGUMENT, true} + }; + m_pDeviceContext->TransitionResourceStates(_countof(Barriers), Barriers); + Uint32 NumTestTrianglesInRow[TriGridSize] = { 0 }; -- cgit v1.2.3