From 836fe0591602a729556da5ecf83e26cdbe139dd5 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 22 Apr 2024 14:18:18 +0200 Subject: [PATCH] tests: Add some tests for string variables. Signed-off-by: Nikolay Sivov --- Makefile.am | 1 + tests/hlsl/strings.shader_test | 51 ++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 tests/hlsl/strings.shader_test diff --git a/Makefile.am b/Makefile.am index 432f4f27..50a5e8b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -199,6 +199,7 @@ vkd3d_shader_tests = \ tests/hlsl/static-initializer.shader_test \ tests/hlsl/step.shader_test \ tests/hlsl/storage-qualifiers.shader_test \ + tests/hlsl/strings.shader_test \ tests/hlsl/struct-array.shader_test \ tests/hlsl/struct-assignment.shader_test \ tests/hlsl/struct-semantics.shader_test \ diff --git a/tests/hlsl/strings.shader_test b/tests/hlsl/strings.shader_test new file mode 100644 index 00000000..a0cdcd48 --- /dev/null +++ b/tests/hlsl/strings.shader_test @@ -0,0 +1,51 @@ +[pixel shader todo fail(sm>=6)] +String s = "text"; +string s2 = "text2"; +sTring s3 = "text3"; + +float4 main() : sv_target +{ + return 0; +} + +[pixel shader todo] +typedef float4 sTring; +sTring var = float4(1, 2, 3, 4); + +float4 main() : sv_target +{ + return 0; +} + +[pixel shader todo fail(sm>=6)] +// Uninitialized strings are allowed for non-fx profiles +String s; + +float4 main() : sv_target +{ + return 0; +} + +[pixel shader fail] +typedef float4 string; + +float4 main() : sv_target +{ + return 0; +} + +[pixel shader fail(sm<6) todo] +typedef float4 String; + +float4 main() : sv_target +{ + return 0; +} + +[pixel shader fail(sm<6) todo] +float4 String; + +float4 main() : sv_target +{ + return 0; +}