Fixes random dEQP-VK.transform_feedback.fuzz.* crashes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 2dc550202e82c5da198ad0a416a5d24dd89addd8
('aco: copy-propagate p_create_vector copies of vectors')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4730>
switch (instr->opcode) {
case aco_opcode::p_create_vector: {
- if (instr->operands.size() == 1 && instr->operands[0].isTemp())
+ bool copy_prop = instr->operands.size() == 1 && instr->operands[0].isTemp();
+ if (copy_prop)
ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
- else
- ctx.info[instr->definitions[0].tempId()].set_vec(instr.get());
unsigned num_ops = instr->operands.size();
for (const Operand& op : instr->operands) {
}
assert(k == num_ops);
}
+
+ if (!copy_prop)
+ ctx.info[instr->definitions[0].tempId()].set_vec(instr.get());
break;
}
case aco_opcode::p_split_vector: {