Henri Verbeet pushed to branch master at wine / vkd3d
Commits: 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).
- - - - -
10 changed files:
- libs/vkd3d-shader/glsl.c - libs/vkd3d-shader/hlsl.c - libs/vkd3d-shader/hlsl.h - libs/vkd3d-shader/hlsl_codegen.c - libs/vkd3d-shader/hlsl_constant_ops.c - libs/vkd3d-shader/msl.c - tests/hlsl/arithmetic-float-uniform.shader_test - tests/hlsl/arithmetic-uint.shader_test - tests/hlsl/logic-operations.shader_test - tests/hlsl/ternary.shader_test
View it on GitLab: https://gitlab.winehq.org/wine/vkd3d/-/compare/d964d55b4a70e2f044dfdebeb8c5f...