Module: vkd3d Branch: master Commit: 7fd10bb6bc325467cdd0923b5e24b4d5fd4335a5 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/7fd10bb6bc325467cdd0923b5e24b4...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Aug 9 13:09:07 2023 +0200
tests: Add some tests for a 'const' modifier.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
---
Makefile.am | 1 + tests/hlsl/const.shader_test | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+)
diff --git a/Makefile.am b/Makefile.am index 27087c8e..b36358b2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -74,6 +74,7 @@ vkd3d_shader_tests = \ tests/hlsl/comma.shader_test \ tests/hlsl/compute.shader_test \ tests/hlsl/conditional.shader_test \ + tests/hlsl/const.shader_test \ tests/hlsl/cross.shader_test \ tests/hlsl/d3dcolor-to-ubyte4.shader_test \ tests/hlsl/ddxddy.shader_test \ diff --git a/tests/hlsl/const.shader_test b/tests/hlsl/const.shader_test new file mode 100644 index 00000000..ff89791e --- /dev/null +++ b/tests/hlsl/const.shader_test @@ -0,0 +1,21 @@ +[pixel shader todo] +const float4 f1; +const uniform float4 f2; + +float4 main() : sv_target +{ + return f1 + f2; +} + +[test] +uniform 0 float4 1.0 2.0 3.0 4.0 +uniform 4 float4 0.1 0.2 0.3 0.4 +todo draw quad +todo probe all rgba (1.1, 2.2, 3.3, 4.4) + +[pixel shader fail] +float4 main() : sv_target +{ + const float f; + return 0; +}