Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com> Btw, I realized the split copies passes do something very similar to the initialize_var_components() function in the "Support all complex initializers." patch. The reuse of code may be worth exploring. April 22, 2022 6:25 AM, "Giovanni Mascellani" <gmascellani(a)codeweavers.com> wrote:
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> --- libs/vkd3d-shader/hlsl_codegen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 73e3b73f..f22841fb 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -567,8 +567,10 @@ static bool fold_redundant_casts(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst return false; }
-/* Helper for split_array_copies() and split_struct_copies(). Inserts new - * instructions right before "store". */ +/* Copy an element of a complex variable. Helper for + * split_array_copies(), split_struct_copies() and + * split_matrix_copies(). Inserts new instructions right before + * "store". */ static bool split_copy(struct hlsl_ctx *ctx, struct hlsl_ir_store *store, const struct hlsl_ir_load *load, const unsigned int offset, struct hlsl_type *type) { -- 2.35.2