From: Zebediah Figura zfigura@codeweavers.com
--- Makefile.am | 1 + tests/hlsl/unbounded-array-5.1.shader_test | 38 ++++++++++++++++++++++ tests/shader_runner.c | 1 + 3 files changed, 40 insertions(+) create mode 100644 tests/hlsl/unbounded-array-5.1.shader_test
diff --git a/Makefile.am b/Makefile.am index 68e8642e0..39b041502 100644 --- a/Makefile.am +++ b/Makefile.am @@ -214,6 +214,7 @@ vkd3d_shader_tests = \ tests/hlsl/uav-rwbyteaddressbuffer.shader_test \ tests/hlsl/uav-rwstructuredbuffer.shader_test \ tests/hlsl/uav-rwtexture.shader_test \ + tests/hlsl/unbounded-array-5.1.shader_test \ tests/hlsl/uniform-parameters.shader_test \ tests/hlsl/uniform-semantics.shader_test \ tests/hlsl/vector-indexing-uniform.shader_test \ diff --git a/tests/hlsl/unbounded-array-5.1.shader_test b/tests/hlsl/unbounded-array-5.1.shader_test new file mode 100644 index 000000000..766da9649 --- /dev/null +++ b/tests/hlsl/unbounded-array-5.1.shader_test @@ -0,0 +1,38 @@ +[require] +shader model >= 5.1 +shader model < 6.0 +options: unbounded-descriptor-arrays + +[pixel shader todo] +Texture2D t[]; +SamplerState s[][2]; +uniform uint u, v; + +float4 main() : sv_target +{ + return t[u].Sample(s[1][v], 0); +} + + +[pixel shader fail] +SamplerState s[][]; + +float4 main() : sv_target +{ + return 0; +} + + +[pixel shader fail] +SamplerState s[2][]; +float4 main() : sv_target {return 0;} + + +[pixel shader fail] +float f[]; +float4 main() : sv_target {return 0;} + + +[pixel shader fail todo] +STRING s[]; +float4 main() : sv_target {return 0;} diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 5eafbcbe4..f800ded32 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -311,6 +311,7 @@ static void parse_require_directive(struct shader_runner *runner, const char *li { D3DCOMPILE_PACK_MATRIX_ROW_MAJOR, "row-major" }, { D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR, "column-major" }, { D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY, "backcompat" }, + { D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES, "unbounded-descriptor-arrays" }, };
runner->compile_options = 0;