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
@@ -3,7 +3,7 @@
|
||||
shader model < 6.0
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float4 x;
|
||||
|
||||
float4 main() : sv_target
|
||||
@@ -13,14 +13,14 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 2.0 3.0 4.0 5.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (2.0, 3.0, 4.0, 5.0)
|
||||
uniform 0 float4 0.0 10.0 11.0 12.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (-1.0, 9.0, 10.0, 11.0)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
uniform float4 x;
|
||||
|
||||
float4 main() : sv_target
|
||||
@@ -35,11 +35,11 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 1.1 3.0 4.0 5.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (1.1, 2.0, 0.0, 0.0)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
float4 f;
|
||||
|
||||
float4 main() : sv_target
|
||||
@@ -51,7 +51,7 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 1.0 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (0.5, 0.6, 0.7, 0.0)
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ todo(glsl) draw quad
|
||||
probe all rgba (3.0, 3.0, 3.0, 3.0)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
|
||||
uniform float cond;
|
||||
uniform float4 a, b;
|
||||
@@ -260,7 +260,7 @@ float4 main() : sv_target
|
||||
uniform 0 float4 1.0 0.0 0.0 0.0
|
||||
uniform 4 float4 1.0 2.0 3.0 4.0
|
||||
uniform 8 float4 5.0 6.0 7.0 8.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
todo(glsl) draw quad
|
||||
probe all rgba (1.0, 2.0, 3.0, 4.0)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user