mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Do not create a copy in add_assignment().
This commit is contained in:
parent
eb7f5f7f68
commit
f73a23f735
Notes:
Henri Verbeet
2024-09-23 15:55:59 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1071
@ -2063,7 +2063,6 @@ static bool add_assignment(struct hlsl_ctx *ctx, struct hlsl_block *block, struc
|
|||||||
enum parse_assign_op assign_op, struct hlsl_ir_node *rhs)
|
enum parse_assign_op assign_op, struct hlsl_ir_node *rhs)
|
||||||
{
|
{
|
||||||
struct hlsl_type *lhs_type = lhs->data_type;
|
struct hlsl_type *lhs_type = lhs->data_type;
|
||||||
struct hlsl_ir_node *copy;
|
|
||||||
unsigned int writemask = 0, width = 0;
|
unsigned int writemask = 0, width = 0;
|
||||||
bool matrix_writemask = false;
|
bool matrix_writemask = false;
|
||||||
|
|
||||||
@ -2274,12 +2273,7 @@ static bool add_assignment(struct hlsl_ctx *ctx, struct hlsl_block *block, struc
|
|||||||
hlsl_cleanup_deref(&deref);
|
hlsl_cleanup_deref(&deref);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't use the instruction itself as a source, as this makes structure
|
block->value = rhs;
|
||||||
* splitting easier. Instead copy it here. Since we retrieve sources from
|
|
||||||
* the last instruction in the list, we do need to copy. */
|
|
||||||
if (!(copy = hlsl_new_copy(ctx, rhs)))
|
|
||||||
return false;
|
|
||||||
hlsl_block_add_instr(block, copy);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user