diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-11-21 18:01:10 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-11-21 18:01:10 +0000 |
| commit | 41e5a5404dd18c748a8355c0796d5e53f793c3b9 (patch) | |
| tree | 58af8fabc3132d1edce8248ae5f5eaf53bbd6f42 /Tests/TestApp/assets/TestComputeShaders.lua | |
| parent | Fixed release history (diff) | |
| download | DiligentEngine-41e5a5404dd18c748a8355c0796d5e53f793c3b9.tar.gz DiligentEngine-41e5a5404dd18c748a8355c0796d5e53f793c3b9.zip | |
Implemented explicit resource state transitions
Diffstat (limited to 'Tests/TestApp/assets/TestComputeShaders.lua')
| -rw-r--r-- | Tests/TestApp/assets/TestComputeShaders.lua | 7 |
1 files changed, 4 insertions, 3 deletions
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) |
