tests/hlsl: Test ternary operations with integral vector operands.

This commit is contained in:
Shaun Ren
2025-08-26 21:41:03 -04:00
committed by Henri Verbeet
parent f9f37e2973
commit df5ccd3ff0
Notes: Henri Verbeet 2025-09-04 14:11:18 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1703

View File

@@ -70,6 +70,41 @@ uniform 8 float4 5.0 6.0 7.0 8.0
draw quad draw quad
probe (0, 0) rgba (5.0, 2.0, 7.0, 4.0) probe (0, 0) rgba (5.0, 2.0, 7.0, 4.0)
[pixel shader todo(sm<4)]
int4 x, y, z;
float4 main() : sv_target
{
return x ? y : z;
}
[test]
if(sm<4) uniform 0 float4 0.0 1.0 0.0 -3.0
if(sm<4) uniform 4 float4 1.0 2.0 3.0 4.0
if(sm<4) uniform 8 float4 5.0 6.0 7.0 8.0
if(sm>=4) uniform 0 int4 0 1 0 -3
if(sm>=4) uniform 4 int4 1 2 3 4
if(sm>=4) uniform 8 int4 5 6 7 8
todo(sm<4) draw quad
probe (0, 0) f32(5.0, 2.0, 7.0, 4.0)
[pixel shader todo(sm<4)]
uint4 x, y, z;
float4 main() : sv_target
{
return x ? y : z;
}
[test]
if(sm<4) uniform 0 float4 0.0 1.0 0.0 3.0
if(sm<4) uniform 4 float4 1.0 2.0 3.0 4.0
if(sm<4) uniform 8 float4 5.0 6.0 7.0 8.0
if(sm>=4) uniform 0 uint4 0 1 0 3
if(sm>=4) uniform 4 uint4 1 2 3 4
if(sm>=4) uniform 8 uint4 5 6 7 8
todo(sm<4) draw quad
probe (0, 0) f32(5.0, 2.0, 7.0, 4.0)
% The usual type conversion is applied to the first and second expression, as % The usual type conversion is applied to the first and second expression, as
% long as they are numeric. % long as they are numeric.