X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fvc4%2Fvc4_opt_copy_propagation.c;h=9a6320a9a203a924bc0def40afac450655d065e7;hb=ad1a4cb563f483a5767431adcc6a1a8f973326fd;hp=f8f1365f6589b5d26de24956670e9c075574083a;hpb=4e797bd98f3aaea8d295c661f7501053156d211a;p=mesa.git diff --git a/src/gallium/drivers/vc4/vc4_opt_copy_propagation.c b/src/gallium/drivers/vc4/vc4_opt_copy_propagation.c index f8f1365f658..9a6320a9a20 100644 --- a/src/gallium/drivers/vc4/vc4_opt_copy_propagation.c +++ b/src/gallium/drivers/vc4/vc4_opt_copy_propagation.c @@ -67,7 +67,7 @@ try_copy_prop(struct vc4_compile *c, struct qinst *inst, struct qinst **movs) bool debug = false; bool progress = false; - for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) { + for (int i = 0; i < qir_get_nsrc(inst); i++) { if (inst->src[i].file != QFILE_TEMP) continue; @@ -90,6 +90,14 @@ try_copy_prop(struct vc4_compile *c, struct qinst *inst, struct qinst **movs) continue; } + /* Mul rotation's source needs to be in an r0-r3 accumulator, + * so no uniforms or regfile-a/r4 unpacking allowed. + */ + if (inst->op == QOP_ROT_MUL && + (mov->src[0].file != QFILE_TEMP || + mov->src[0].pack)) + continue; + uint8_t unpack; if (mov->src[0].pack) { /* Make sure that the meaning of the unpack @@ -105,7 +113,7 @@ try_copy_prop(struct vc4_compile *c, struct qinst *inst, struct qinst **movs) * this instruction doesn't already use it. */ bool already_has_unpack = false; - for (int j = 0; j < qir_get_op_nsrc(inst->op); j++) { + for (int j = 0; j < qir_get_nsrc(inst); j++) { if (inst->src[j].pack) already_has_unpack = true; }