From 8866a43b2d2903038b1e43a371a33b7524afe2df Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Wed, 12 Mar 2025 18:44:34 +0100 Subject: [PATCH] tests/hlsl: Add some fx_4_0 state tests. --- Makefile.am | 1 + .../hlsl/effect-pass-states-fx_4.shader_test | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 tests/hlsl/effect-pass-states-fx_4.shader_test diff --git a/Makefile.am b/Makefile.am index 2cb893d1..957eba38 100644 --- a/Makefile.am +++ b/Makefile.am @@ -109,6 +109,7 @@ vkd3d_shader_tests = \ tests/hlsl/effect-compile.shader_test \ tests/hlsl/effect-initial-values-fx_2.shader_test \ tests/hlsl/effect-initial-values-fx_4.shader_test \ + tests/hlsl/effect-pass-states-fx_4.shader_test \ tests/hlsl/effect-pass-states-fx_5.shader_test \ tests/hlsl/effect-shader-objects-fx_2.shader_test \ tests/hlsl/effect-shader-objects-fx_5.shader_test \ diff --git a/tests/hlsl/effect-pass-states-fx_4.shader_test b/tests/hlsl/effect-pass-states-fx_4.shader_test new file mode 100644 index 00000000..3d25d8e7 --- /dev/null +++ b/tests/hlsl/effect-pass-states-fx_4.shader_test @@ -0,0 +1,29 @@ +[require] +shader model >= 4.0 +shader model < 6.0 + +% int and uint are compatible and generate no casts +[effect todo] +int stencil = 1; +DepthStencilState depth { + DepthEnable = TRUE; +}; + +technique10 foo { + pass p0 { + SetDepthStencilState(depth, stencil); + } +} + +% float to uint generates a cast +[effect todo] +float stencil = 1.0; +DepthStencilState depth { + DepthEnable = TRUE; +}; + +technique10 foo { + pass p0 { + SetDepthStencilState(depth, stencil); + } +}