broadcom/compiler: handle implicit uniform loads when optimizing constant alu
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9681>
This commit is contained in:
committed by
Marge Bot
parent
92764abc82
commit
b189409a46
@@ -71,10 +71,12 @@ opt_constant_add(struct v3d_compile *c, struct qinst *inst, uint32_t *values)
|
||||
}
|
||||
|
||||
/* Remove the original ALU instruction and replace it with a uniform
|
||||
* load.
|
||||
* load. If the original instruction loaded an implicit uniform we
|
||||
* need to replicate that in the new instruction.
|
||||
*/
|
||||
struct qreg dst = inst->dst;
|
||||
struct qinst *mov = vir_MOV_dest(c, dst, unif);
|
||||
mov->uniform = inst->uniform;
|
||||
vir_remove_instruction(c, inst);
|
||||
if (dst.file == QFILE_TEMP)
|
||||
c->defs[dst.index] = mov;
|
||||
|
||||
Reference in New Issue
Block a user