mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07: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).
This commit is contained in:
Notes:
Henri Verbeet
2025-08-21 16:34:35 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1648
@@ -1699,6 +1699,9 @@ struct hlsl_type *hlsl_new_stream_output_type(struct hlsl_ctx *ctx,
|
||||
struct hlsl_ir_node *hlsl_new_ternary_expr(struct hlsl_ctx *ctx, enum hlsl_ir_expr_op op,
|
||||
struct hlsl_ir_node *arg1, struct hlsl_ir_node *arg2, struct hlsl_ir_node *arg3);
|
||||
|
||||
bool hlsl_constant_is_zero(struct hlsl_ir_constant *c);
|
||||
bool hlsl_constant_is_one(struct hlsl_ir_constant *c);
|
||||
|
||||
void hlsl_init_simple_deref_from_var(struct hlsl_deref *deref, struct hlsl_ir_var *var);
|
||||
|
||||
struct hlsl_ir_load *hlsl_new_var_load(struct hlsl_ctx *ctx, struct hlsl_ir_var *var,
|
||||
|
||||
Reference in New Issue
Block a user