Signed-off-by: Francisco Casas fcasas@codeweavers.com
I understand that this is necessary for the next patch. Albeit there may be an argument to squash them.
May 3, 2022 6:14 AM, "Giovanni Mascellani" gmascellani@codeweavers.com wrote:
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
libs/vkd3d-shader/hlsl_codegen.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 78b22910..7c401e14 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -474,18 +474,20 @@ static bool copy_propagation_transform_load(struct hlsl_ctx *ctx, return false; }
- if (!(new_node = copy_propagation_compute_replacement(ctx, state, &load->src, dimx, &swizzle)))
- return false;
- if (type->type != HLSL_CLASS_OBJECT)
- if ((new_node = copy_propagation_compute_replacement(ctx, state, &load->src, dimx, &swizzle)))
{
- if (!(swizzle_node = hlsl_new_swizzle(ctx, swizzle, dimx, new_node, &node->loc)))
- return false;
- list_add_before(&node->entry, &swizzle_node->node.entry);
- new_node = &swizzle_node->node;
- if (type->type != HLSL_CLASS_OBJECT)
- {
- if (!(swizzle_node = hlsl_new_swizzle(ctx, swizzle, dimx, new_node, &node->loc)))
- return false;
- list_add_before(&node->entry, &swizzle_node->node.entry);
- new_node = &swizzle_node->node;
- }
- hlsl_replace_node(node, new_node);
- return true;
}
- hlsl_replace_node(node, new_node);
- return true;
- return false;
}
static bool copy_propagation_transform_object_load(struct hlsl_ctx *ctx,
2.36.0