[PATCH vkd3d 11/12] tests: Test complex broadcasts.

Giovanni Mascellani gmascellani at codeweavers.com
Tue Apr 19 05:50:23 CDT 2022


Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>

Il 18/04/22 08:34, Giovanni Mascellani ha scritto:
> From: Francisco Casas <fcasas at codeweavers.com>
> 
> Signed-off-by: Francisco Casas <fcasas at codeweavers.com>
> ---
>   Makefile.am                      |  1 +
>   tests/cast-broadcast.shader_test | 24 ++++++++++++++++++++++++
>   2 files changed, 25 insertions(+)
>   create mode 100644 tests/cast-broadcast.shader_test
> 
> diff --git a/Makefile.am b/Makefile.am
> index 52d057c9..0d1ce2a2 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -56,6 +56,7 @@ vkd3d_shader_tests = \
>   	tests/arithmetic-int.shader_test \
>   	tests/arithmetic-uint.shader_test \
>   	tests/bitwise.shader_test \
> +	tests/cast-broadcast.shader_test \
>   	tests/cast-to-float.shader_test \
>   	tests/cast-to-half.shader_test \
>   	tests/cast-to-int.shader_test \
> diff --git a/tests/cast-broadcast.shader_test b/tests/cast-broadcast.shader_test
> new file mode 100644
> index 00000000..02d14c0b
> --- /dev/null
> +++ b/tests/cast-broadcast.shader_test
> @@ -0,0 +1,24 @@
> +[pixel shader]
> +
> +struct foo
> +{
> +    float3 aa;
> +    float4 bb;
> +};
> +
> +struct bar
> +{
> +    struct foo aa;
> +    int2 bb;
> +    int4 cc[8];
> +};
> +
> +float4 main() : SV_TARGET
> +{
> +    struct bar p = (struct bar)42;
> +    return p.aa.bb + p.cc[5];
> +}
> +
> +[test]
> +todo draw quad
> +todo probe all rgba (84.0, 84.0, 84.0, 84.0)



More information about the wine-devel mailing list