tests: Test shader compilation with default values.

This commit is contained in:
Francisco Casas 2024-08-15 17:38:09 -04:00 committed by Henri Verbeet
parent 9fa8921b50
commit 56cd64ccba
Notes: Henri Verbeet 2024-08-20 21:34:57 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1006

View File

@ -183,6 +183,42 @@ float4 main() : sv_target
return 0; return 0;
} }
% Default values are allowed for uniform variables.
[pixel shader todo fail(sm>=6)]
float4 fun(uniform float4 a, uniform float4 b = {1, 2, 3, 4}) : sv_target
{
return 8*a + b;
}
technique10 T1
{
pass P1
{
PixelShader = compile ps_4_0 fun(5);
}
}
float4 main() : sv_target { return 0; }
[pixel shader todo fail(sm>=6)]
float4 fun(float4 a : COLOR0 = {-1, -2, -3, -4}, uniform float4 b = {1, 2, 3, 4}) : sv_target
{
return 8*a + b;
}
technique10 T1
{
pass P1
{
PixelShader = compile ps_4_0 fun();
}
}
float4 main() : sv_target { return 0; }
[require] [require]
shader model >= 5.0 shader model >= 5.0
shader model < 6.0 shader model < 6.0