summaryrefslogtreecommitdiffstats
path: root/Tests/TestApp/src/TestDrawCommands.cpp
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-11-21 18:01:10 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-11-21 18:01:10 +0000
commit41e5a5404dd18c748a8355c0796d5e53f793c3b9 (patch)
tree58af8fabc3132d1edce8248ae5f5eaf53bbd6f42 /Tests/TestApp/src/TestDrawCommands.cpp
parentFixed release history (diff)
downloadDiligentEngine-41e5a5404dd18c748a8355c0796d5e53f793c3b9.tar.gz
DiligentEngine-41e5a5404dd18c748a8355c0796d5e53f793c3b9.zip
Implemented explicit resource state transitions
Diffstat (limited to 'Tests/TestApp/src/TestDrawCommands.cpp')
-rw-r--r--Tests/TestApp/src/TestDrawCommands.cpp11
1 files changed, 11 insertions, 0 deletions
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 };