tests: Test redefining intrinsic functions.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@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 2022-01-19 12:52:01 +01:00 committed by Alexandre Julliard
parent 8ced37058d
commit 6b5e44435f
2 changed files with 33 additions and 0 deletions

View File

@ -68,6 +68,7 @@ vkd3d_shader_tests = \
tests/hlsl-duplicate-modifiers.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \
tests/hlsl-for.shader_test \ tests/hlsl-for.shader_test \
tests/hlsl-function-overload.shader_test \ tests/hlsl-function-overload.shader_test \
tests/hlsl-intrinsic-override.shader_test \
tests/hlsl-invalid.shader_test \ tests/hlsl-invalid.shader_test \
tests/hlsl-majority-pragma.shader_test \ tests/hlsl-majority-pragma.shader_test \
tests/hlsl-majority-typedef.shader_test \ tests/hlsl-majority-typedef.shader_test \
@ -293,6 +294,7 @@ XFAIL_TESTS = \
tests/hlsl-duplicate-modifiers.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \
tests/hlsl-for.shader_test \ tests/hlsl-for.shader_test \
tests/hlsl-function-overload.shader_test \ tests/hlsl-function-overload.shader_test \
tests/hlsl-intrinsic-override.shader_test \
tests/hlsl-majority-pragma.shader_test \ tests/hlsl-majority-pragma.shader_test \
tests/hlsl-majority-typedef.shader_test \ tests/hlsl-majority-typedef.shader_test \
tests/hlsl-nested-arrays.shader_test \ tests/hlsl-nested-arrays.shader_test \

View File

@ -0,0 +1,31 @@
[pixel shader]
float2 max(float2 a, float2 b)
{
return a + b;
}
float4 main() : sv_target
{
return float4(max(0.1, 0.2), max(float2(0.1, 0.2), float2(0.3, 0.4)));
}
[test]
draw quad
probe all rgba (0.3, 0.3, 0.4, 0.6)
[pixel shader]
float2 max(float2 a, float3 b)
{
return a + b.xy;
}
float4 main() : sv_target
{
return float4(max(0.1, 0.2), max(float2(0.1, 0.2), float2(0.3, 0.4)));
}
[test]
draw quad
probe all rgba (0.3, 0.3, 0.3, 0.4)