From 849d4b3b2bf38018ac87fba5362da4e04d25680c Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 22 Sep 2024 10:12:05 +0200 Subject: [PATCH] tests: Add some tests for state value assignments. Signed-off-by: Nikolay Sivov --- Makefile.am | 1 + .../hlsl/effect-assignments-fx_5.shader_test | 51 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 tests/hlsl/effect-assignments-fx_5.shader_test diff --git a/Makefile.am b/Makefile.am index 92f5365f..cf8b645d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -104,6 +104,7 @@ vkd3d_shader_tests = \ tests/hlsl/early-depth-stencil.shader_test \ tests/hlsl/effect-annotations-fx_2.shader_test \ tests/hlsl/effect-annotations-fx_4.shader_test \ + tests/hlsl/effect-assignments-fx_5.shader_test \ tests/hlsl/effect-compile.shader_test \ tests/hlsl/effect-initial-values-fx_2.shader_test \ tests/hlsl/effect-initial-values-fx_4.shader_test \ diff --git a/tests/hlsl/effect-assignments-fx_5.shader_test b/tests/hlsl/effect-assignments-fx_5.shader_test new file mode 100644 index 00000000..c159895c --- /dev/null +++ b/tests/hlsl/effect-assignments-fx_5.shader_test @@ -0,0 +1,51 @@ +[require] +shader model >= 5.0 +shader model < 6.0 + +[pixel shader] +float4 main() : sv_target +{ + return 0; +} + +uint stencil_refs[2]; + +technique11 +{ + pass + { + SetDepthStencilState(NULL, stencil_refs[10]); + } +} + +[effect todo] +uint stencil_ref; +uint stencil_refs[2]; +uint index; + +technique11 +{ + pass + { + SetDepthStencilState(NULL, stencil_ref); + } + pass + { + SetDepthStencilState(NULL, stencil_refs[1]); + } + pass + { + SetDepthStencilState(NULL, stencil_refs[index]); + } +} + +[effect fail todo] +uint stencil_refs[2]; + +technique11 +{ + pass + { + SetDepthStencilState(NULL, stencil_refs[10]); + } +}