mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Ensure that TERNARY condition is always bool.
Also, properly casting it to float in lower_ternary() for SM1 avoids creating ABS and NEG on bool types.
This commit is contained in:
committed by
Alexandre Julliard
parent
9c0d04c862
commit
19fd43214b
Notes:
Alexandre Julliard
2024-04-09 15:44:37 -05:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/744
@@ -13,7 +13,7 @@ uniform 0 float4 5.0 15.0 0.0 0.0
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (20.0, -10.0, 75.0, 0.33333333) 1
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float2 a;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
@@ -25,10 +25,10 @@ float4 main() : SV_TARGET
|
||||
|
||||
[test]
|
||||
uniform 0 float4 5.0 15.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (5.0, 5.0, -5.0, 3.0) 1
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float2 a;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
@@ -40,10 +40,10 @@ float4 main() : SV_TARGET
|
||||
|
||||
[test]
|
||||
uniform 0 float4 42.0 5.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (2.0, -2.0, 2.0, -2.0) 16
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float2 a;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
@@ -55,10 +55,10 @@ float4 main() : SV_TARGET
|
||||
|
||||
[test]
|
||||
uniform 0 float4 45.0 5.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (0.0, 0.0, 0.0, 0.0)
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
float4 x, y;
|
||||
|
||||
float4 main() : sv_target
|
||||
@@ -69,7 +69,7 @@ float4 main() : sv_target
|
||||
[test]
|
||||
uniform 0 float4 5.0 -42.1 4.0 45.0
|
||||
uniform 4 float4 15.0 -5.0 4.1 5.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (5.0, -2.1, 4.0, 0.0) 6
|
||||
|
||||
[require]
|
||||
|
Reference in New Issue
Block a user