vkd3d-shader/hlsl: Fold constant swizzles.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2022-06-27 17:22:38 +02:00
committed by Alexandre Julliard
parent 7682da58a8
commit 0ddaa80616
3 changed files with 34 additions and 3 deletions

View File

@@ -1946,7 +1946,8 @@ int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry
transform_ir(ctx, lower_casts_to_bool, body, NULL);
do
{
progress = transform_ir(ctx, hlsl_fold_constants, body, NULL);
progress = transform_ir(ctx, hlsl_fold_constant_exprs, body, NULL);
progress |= transform_ir(ctx, hlsl_fold_constant_swizzles, body, NULL);
progress |= copy_propagation_execute(ctx, body);
progress |= transform_ir(ctx, remove_trivial_swizzles, body, NULL);
}