mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
freedreno/ir3: don't pass consts to madsh.m16 in MOD logic
madsh.m16 can't handle a const in src1, make sure to unconst it
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 37fe347542)
This commit is contained in:
parent
f097e21228
commit
4739c7766d
1 changed files with 3 additions and 0 deletions
|
|
@ -2374,6 +2374,9 @@ trans_idiv(const struct instr_translater *t,
|
|||
if (t->tgsi_opc == TGSI_OPCODE_MOD || t->tgsi_opc == TGSI_OPCODE_UMOD) {
|
||||
/* The division result will have ended up in q. */
|
||||
|
||||
if (is_rel_or_const(b))
|
||||
b = get_unconst(ctx, b);
|
||||
|
||||
/* mull.u r, q, b */
|
||||
instr = instr_create(ctx, 2, OPC_MULL_U);
|
||||
vectorize(ctx, instr, &r_dst, 2, q_src, 0, b, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue