Skip to content
Snippets Groups Projects
Commit 37fe3475 authored by Ilia Mirkin's avatar Ilia Mirkin
Browse files

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: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
parent b340469f
No related branches found
No related tags found
No related merge requests found
......@@ -2350,6 +2350,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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment