diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-03-02 04:55:44 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-03-02 04:55:44 +0000 |
| commit | dd7847d9e2b0729799d3e953f7872719e6ab70c0 (patch) | |
| tree | 6aac246e73f61a29c6d5638d862cf698f5ae1a84 /Tests/TestApp/assets/TestComputeShaders.lua | |
| parent | Updated Core, FX & Samples submodules (diff) | |
| download | DiligentEngine-dd7847d9e2b0729799d3e953f7872719e6ab70c0.tar.gz DiligentEngine-dd7847d9e2b0729799d3e953f7872719e6ab70c0.zip | |
Updated test to compy with the new API
Diffstat (limited to 'Tests/TestApp/assets/TestComputeShaders.lua')
| -rw-r--r-- | Tests/TestApp/assets/TestComputeShaders.lua | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Tests/TestApp/assets/TestComputeShaders.lua b/Tests/TestApp/assets/TestComputeShaders.lua index 695c482..d5e12d2 100644 --- a/Tests/TestApp/assets/TestComputeShaders.lua +++ b/Tests/TestApp/assets/TestComputeShaders.lua @@ -170,12 +170,9 @@ FillTextureCS = Shader.Create{ UseCombinedTextureSamplers = true, Desc = { - ShaderType = "SHADER_TYPE_COMPUTE", - VariableDesc = {{Name = "g_tex2DTestUAV", Type = "SHADER_VARIABLE_TYPE_DYNAMIC"}} + ShaderType = "SHADER_TYPE_COMPUTE" } } -assert(FillTextureCS.Desc.VariableDesc[1].Name == "g_tex2DTestUAV"); -assert(FillTextureCS.Desc.VariableDesc[1].Type == "SHADER_VARIABLE_TYPE_DYNAMIC"); UpdateVertBuffCS = Shader.Create{ FilePath = GetShaderPath("CSTest\\UpdateVertBuff", "csh", true), @@ -216,12 +213,20 @@ RenderPS = Shader.Create{ FillTexturePSO = PipelineState.Create { Name = "FillTexturePSO", + ResourceLayout = + { + Variables = {{ShaderStages = "SHADER_TYPE_COMPUTE", Name = "g_tex2DTestUAV", Type = "SHADER_RESOURCE_VARIABLE_TYPE_DYNAMIC"}} + }, IsComputePipeline=true, ComputePipeline = { pCS = FillTextureCS } } +assert(FillTexturePSO.ResourceLayout.Variables[1].ShaderStages[1] == "SHADER_TYPE_COMPUTE"); +assert(FillTexturePSO.ResourceLayout.Variables[1].Name == "g_tex2DTestUAV"); +assert(FillTexturePSO.ResourceLayout.Variables[1].Type == "SHADER_RESOURCE_VARIABLE_TYPE_DYNAMIC"); + FillTextureSRB = FillTexturePSO:CreateShaderResourceBinding() UpdateVertBuffPSO = PipelineState.Create @@ -293,14 +298,13 @@ RenderPSO = PipelineState.Create PrimitiveTopology = "PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP" } } +RenderPSO:BindStaticResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED"}) RenderSRB = RenderPSO:CreateShaderResourceBinding() -UpdateVertBuffCS:BindResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED", "BIND_SHADER_RESOURCES_UPDATE_STATIC"} ) -UpdateIndBuffCS:BindResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED", "BIND_SHADER_RESOURCES_UPDATE_ALL"}) -UpdateDrawArgsBuffCS:BindResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED"}) -UpdateDispatchArgsBuffCS:BindResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED"}) -RenderVS:BindResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED"}) -RenderPS:BindResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED"}) +UpdateVertBuffPSO:BindStaticResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED", "BIND_SHADER_RESOURCES_UPDATE_STATIC"} ) +UpdateIndBuffPSO:BindStaticResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED", "BIND_SHADER_RESOURCES_UPDATE_ALL"}) +UpdateDrawArgsBuffPSO:BindStaticResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED"}) +UpdateDispatchArgsBuffPSO:BindStaticResources(ResMapping, {"BIND_SHADER_RESOURCES_VERIFY_ALL_RESOLVED"}) FillTextureSRB:InitializeStaticResources() UpdateVertBuffSRB:InitializeStaticResources() |
