[PATCH vkd3d 10/11] tests: Test matrix indexing.

Francisco Casas fcasas at codeweavers.com
Thu Apr 14 12:02:58 CDT 2022


Signed-off-by: Francisco Casas <fcasas at codeweavers.com>


April 14, 2022 6:53 AM, "Giovanni Mascellani" <gmascellani at codeweavers.com> wrote:

> Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
> ---
> Makefile.am | 1 +
> tests/hlsl-matrix-indexing.shader_test | 47 ++++++++++++++++++++++++++
> 2 files changed, 48 insertions(+)
> create mode 100644 tests/hlsl-matrix-indexing.shader_test
> 
> diff --git a/Makefile.am b/Makefile.am
> index d57ea2b7..ed881ffa 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -85,6 +85,7 @@ vkd3d_shader_tests = \
> tests/hlsl-invalid.shader_test \
> tests/hlsl-majority-pragma.shader_test \
> tests/hlsl-majority-typedef.shader_test \
> + tests/hlsl-matrix-indexing.shader_test \
> tests/hlsl-mul.shader_test \
> tests/hlsl-nested-arrays.shader_test \
> tests/hlsl-numeric-constructor-truncation.shader_test \
> diff --git a/tests/hlsl-matrix-indexing.shader_test b/tests/hlsl-matrix-indexing.shader_test
> new file mode 100644
> index 00000000..1d444ffa
> --- /dev/null
> +++ b/tests/hlsl-matrix-indexing.shader_test
> @@ -0,0 +1,47 @@
> +[pixel shader]
> +uniform float4x4 m;
> +
> +float4 main() : SV_TARGET
> +{
> + return float4(m[0][0], m[1][0], m[1][2], m[2][3]);
> +}
> +
> +[test]
> +uniform 0 float4 1.0 2.0 3.0 4.0
> +uniform 4 float4 5.0 6.0 7.0 8.0
> +uniform 8 float4 9.0 10.0 11.0 12.0
> +uniform 12 float4 13.0 14.0 15.0 16.0
> +todo draw quad
> +probe all rgba (1.0, 2.0, 10.0, 15.0)
> +
> +[pixel shader]
> +uniform column_major float4x4 m;
> +
> +float4 main() : SV_TARGET
> +{
> + return float4(m[0][0], m[1][0], m[1][2], m[2][3]);
> +}
> +
> +[test]
> +uniform 0 float4 1.0 2.0 3.0 4.0
> +uniform 4 float4 5.0 6.0 7.0 8.0
> +uniform 8 float4 9.0 10.0 11.0 12.0
> +uniform 12 float4 13.0 14.0 15.0 16.0
> +todo draw quad
> +probe all rgba (1.0, 2.0, 10.0, 15.0)
> +
> +[pixel shader]
> +uniform row_major float4x4 m;
> +
> +float4 main() : SV_TARGET
> +{
> + return float4(m[0][0], m[1][0], m[1][2], m[2][3]);
> +}
> +
> +[test]
> +uniform 0 float4 1.0 2.0 3.0 4.0
> +uniform 4 float4 5.0 6.0 7.0 8.0
> +uniform 8 float4 9.0 10.0 11.0 12.0
> +uniform 12 float4 13.0 14.0 15.0 16.0
> +todo draw quad
> +probe all rgba (1.0, 5.0, 7.0, 12.0)
> -- 
> 2.35.2



More information about the wine-devel mailing list