-
4c37800f
by Shaun Ren at 2025-08-21T15:32:27+02:00
vkd3d-shader/hlsl: Check whether "expr" has more than 2 operands in hlsl_normalize_binary_exprs().
-
b8776bb6
by Shaun Ren at 2025-08-21T15:32:37+02:00
vkd3d-shader/glsl: Implement VSIR_OP_UGE.
-
45e549c1
by Shaun Ren at 2025-08-21T15:32:37+02:00
vkd3d-shader/msl: Implement VSIR_OP_UGE.
-
24543000
by Shaun Ren at 2025-08-21T16:00:46+02:00
vkd3d-shader/hlsl: Fold some general unary identities.
The following unary identities are applied:
||x|| -> |x|
|-x| -> |x|
~(~x) -> x
f(g(x)) -> g(x), where f(), g() are floor() or ceil() functions.
-(-x) -> x
!!x -> x
!(x == y) -> x != y, !(x < y) -> x >= y, etc (for integers).
-
320c3c96
by Shaun Ren at 2025-08-21T16:00:51+02:00
vkd3d-shader/hlsl: Fold some general conditional identities.
The following conditional identities are applied:
c ? x : x -> x
false ? x : y -> y; true ? x : y -> x
c ? true : false -> c; c ? false : true -> !c
!c ? x : y -> c ? y : x
Lastly, for expression chains x, y in a conditional expression
c ? x : y,
we evaluate all conditionals in the expression chains with the
condition c, assuming c is true (for x), or false (for y).