mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests/hlsl: Test ternary operations with integral vector operands.
This commit is contained in:
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
@@ -70,6 +70,41 @@ uniform 8 float4 5.0 6.0 7.0 8.0
|
||||
draw quad
|
||||
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
|
||||
% long as they are numeric.
|
||||
|
Reference in New Issue
Block a user