mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
Avoid using the same ir_constant 0.0 multiple times in mat constructors.
This commit is contained in:
parent
bc1097d151
commit
02fc4b34e4
1 changed files with 1 additions and 2 deletions
|
|
@ -359,10 +359,9 @@ generate_mat_body_from_scalar(exec_list *instructions,
|
|||
inst = new ir_assignment(lhs, rhs, NULL);
|
||||
instructions->push_tail(inst);
|
||||
|
||||
ir_constant *const zero = new ir_constant(0.0f);
|
||||
|
||||
for (unsigned i = 1; i < column_type->vector_elements; i++) {
|
||||
ir_dereference *const lhs_ref = new ir_dereference_variable(column);
|
||||
ir_constant *const zero = new ir_constant(0.0f);
|
||||
|
||||
ir_swizzle *lhs = new ir_swizzle(lhs_ref, i, 0, 0, 0, 1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue