tests: Import HLSL struct varying 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:
Zebediah Figura 2020-10-03 16:24:24 -05:00 committed by Alexandre Julliard
parent ce7c964935
commit 2c4d4277dd
2 changed files with 31 additions and 0 deletions

View File

@ -58,6 +58,7 @@ vkd3d_shader_tests = \
tests/hlsl-return-implicit-conversion.shader_test \
tests/hlsl-return-void.shader_test \
tests/hlsl-struct-assignment.shader_test \
tests/hlsl-struct-varying.shader_test \
tests/hlsl-vector-indexing.shader_test \
tests/hlsl-vector-indexing-uniform.shader_test \
tests/math.shader_test \
@ -197,6 +198,7 @@ XFAIL_TESTS = \
tests/hlsl-return-implicit-conversion.shader_test \
tests/hlsl-return-void.shader_test \
tests/hlsl-struct-assignment.shader_test \
tests/hlsl-struct-varying.shader_test \
tests/hlsl-vector-indexing.shader_test \
tests/hlsl-vector-indexing-uniform.shader_test \
tests/math.shader_test \

View File

@ -0,0 +1,29 @@
[pixel shader]
struct input
{
struct
{
float4 pos : sv_position;
} m;
};
struct output
{
struct
{
float4 color : sv_target;
} m;
};
struct output main(struct input i)
{
struct output o;
o.m.color = i.m.pos;
return o;
}
[test]
draw quad
probe rgba (0, 1) (0.5, 1.5, 0.0, 1.0)
probe rgba (1, 0) (1.5, 0.5, 0.0, 1.0)
probe rgba (3, 5) (3.5, 5.5, 0.0, 1.0)