Module: vkd3d Branch: master Commit: e1865cf98add49fe4572b69db47878cc8b37c365 URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=e1865cf98add49fe4572b69d...
Author: Matteo Bruni mbruni@codeweavers.com Date: Wed Mar 2 13:21:21 2022 +0100
vkd3d-shader/hlsl: Remove trivial swizzles after each copy prop pass.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Francisco Casas fcasas@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
Makefile.am | 1 - libs/vkd3d-shader/hlsl_codegen.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am index e4f92bb..f3db6d0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -315,7 +315,6 @@ XFAIL_TESTS = \ tests/hlsl-initializer-numeric.shader_test \ tests/hlsl-initializer-static-array.shader_test \ tests/hlsl-initializer-struct.shader_test \ - tests/hlsl-bool-cast.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \ tests/hlsl-for.shader_test \ tests/hlsl-function.shader_test \ diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 837d39e..62dbce5 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -1666,9 +1666,9 @@ int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry { progress = transform_ir(ctx, hlsl_fold_constants, body, NULL); progress |= copy_propagation_execute(ctx, body); + progress |= transform_ir(ctx, remove_trivial_swizzles, body, NULL); } while (progress); - transform_ir(ctx, remove_trivial_swizzles, body, NULL);
if (ctx->profile->major_version < 4) transform_ir(ctx, lower_division, body, NULL);