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/assets/TestComputeShaders.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Tests/TestApp/assets/TestComputeShaders.lua') diff --git a/Tests/TestApp/assets/TestComputeShaders.lua b/Tests/TestApp/assets/TestComputeShaders.lua index efd6bae..ed36f3f 100644 --- a/Tests/TestApp/assets/TestComputeShaders.lua +++ b/Tests/TestApp/assets/TestComputeShaders.lua @@ -301,7 +301,8 @@ RenderPS:BindResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED"} DrawAttrs = DrawAttribs.Create{ IsIndexed = true, IndexType = "VT_UINT32", - pIndirectDrawAttribs = IndirectDrawArgsBuffer + pIndirectDrawAttribs = IndirectDrawArgsBuffer, + Flags = {"DRAW_FLAG_TRANSITION_VERTEX_BUFFERS", "DRAW_FLAG_TRANSITION_INDEX_BUFFER", "DRAW_FLAG_TRANSITION_INDIRECT_ARGS_BUFFER"} } @@ -329,7 +330,7 @@ function Dispatch() Context.CommitShaderResources(FillTextureSRB, "COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES" ) - Context.DispatchCompute(NumGroupsX, NumGroupsY) + Context.DispatchCompute(NumGroupsX, NumGroupsY) end Context.SetPipelineState(UpdateDispatchArgsBuffPSO) @@ -339,7 +340,7 @@ function Dispatch() Context.SetPipelineState(UpdateDrawArgsBuffPSO) Context.CommitShaderResources("COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES") - Context.DispatchCompute(IndirectDispatchArgsBuffer, 16) + Context.DispatchCompute(IndirectDispatchArgsBuffer, 16, "DISPATCH_FLAG_TRANSITION_INDIRECT_ARGS_BUFFER") Context.SetPipelineState(UpdateIndBuffPSO) Context.TransitionShaderResources(UpdateIndBuffPSO) -- cgit v1.2.3