mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Import HLSL majority tests from Wine.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d0b13d51ca
commit
ec6fe1cc9d
@ -53,6 +53,8 @@ vkd3d_shader_tests = \
|
||||
tests/conditional.shader_test \
|
||||
tests/hlsl-array-dimension.shader_test \
|
||||
tests/hlsl-comma.shader_test \
|
||||
tests/hlsl-majority-pragma.shader_test \
|
||||
tests/hlsl-majority-typedef.shader_test \
|
||||
tests/hlsl-return-implicit-conversion.shader_test \
|
||||
tests/hlsl-return-void.shader_test \
|
||||
tests/hlsl-vector-indexing.shader_test \
|
||||
@ -189,6 +191,8 @@ XFAIL_TESTS = \
|
||||
tests/conditional.shader_test \
|
||||
tests/hlsl-array-dimension.shader_test \
|
||||
tests/hlsl-comma.shader_test \
|
||||
tests/hlsl-majority-pragma.shader_test \
|
||||
tests/hlsl-majority-typedef.shader_test \
|
||||
tests/hlsl-return-implicit-conversion.shader_test \
|
||||
tests/hlsl-return-void.shader_test \
|
||||
tests/hlsl-vector-indexing.shader_test \
|
||||
|
21
tests/hlsl-majority-pragma.shader_test
Normal file
21
tests/hlsl-majority-pragma.shader_test
Normal file
@ -0,0 +1,21 @@
|
||||
[pixel shader]
|
||||
#pragma pack_matrix(row_major)
|
||||
uniform float2x2 r;
|
||||
#pragma pack_matrix(column_major)
|
||||
uniform float2x2 c;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float4 ret;
|
||||
ret.xy = mul(r, float2(0.5, 0.6));
|
||||
ret.zw = mul(c, float2(0.5, 0.6));
|
||||
return ret;
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 0.1 0.2 0.0 0.0
|
||||
uniform 4 float4 0.3 0.4 0.0 0.0
|
||||
uniform 8 float4 0.1 0.3 0.0 0.0
|
||||
uniform 12 float4 0.2 0.4 0.0 0.0
|
||||
draw quad
|
||||
probe all rgba (0.17, 0.39, 0.17, 0.39) 1
|
22
tests/hlsl-majority-typedef.shader_test
Normal file
22
tests/hlsl-majority-typedef.shader_test
Normal file
@ -0,0 +1,22 @@
|
||||
[pixel shader]
|
||||
typedef float2x2 matrix_t;
|
||||
typedef row_major matrix_t row_matrix_t;
|
||||
typedef column_major matrix_t col_matrix_t;
|
||||
uniform row_matrix_t r;
|
||||
uniform col_matrix_t c;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float4 ret;
|
||||
ret.xy = mul(r, float2(0.5, 0.6));
|
||||
ret.zw = mul(c, float2(0.5, 0.6));
|
||||
return ret;
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 0.1 0.2 0.0 0.0
|
||||
uniform 4 float4 0.3 0.4 0.0 0.0
|
||||
uniform 8 float4 0.1 0.3 0.0 0.0
|
||||
uniform 12 float4 0.2 0.4 0.0 0.0
|
||||
draw quad
|
||||
probe all rgba (0.17, 0.39, 0.17, 0.39) 1
|
Loading…
Reference in New Issue
Block a user