mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Fix number of components when creating a swizzle in copy-prop.
Otherwise we may create nodes of different dimensions than the ones we are replacing. "count" is the number of components of the source deref (without considering the swizzle), while "instr_component_count" is the actual number of components of the instruction to be replaced.
This commit is contained in:
committed by
Alexandre Julliard
parent
e7bc634307
commit
2142d31f13
Notes:
Alexandre Julliard
2023-02-20 22:45:02 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/96
@@ -1031,7 +1031,7 @@ static bool copy_propagation_replace_with_single_instr(struct hlsl_ctx *ctx,
|
||||
{
|
||||
struct hlsl_ir_swizzle *swizzle_node;
|
||||
|
||||
if (!(swizzle_node = hlsl_new_swizzle(ctx, ret_swizzle, count, new_instr, &instr->loc)))
|
||||
if (!(swizzle_node = hlsl_new_swizzle(ctx, ret_swizzle, instr_component_count, new_instr, &instr->loc)))
|
||||
return false;
|
||||
list_add_before(&instr->entry, &swizzle_node->node.entry);
|
||||
new_instr = &swizzle_node->node;
|
||||
|
Reference in New Issue
Block a user