summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-11-26 17:37:45 -0500
committerEmil Velikov <[email protected]>2014-11-28 17:29:29 +0000
commit085de458123067cb61040c76e2fe0100532b42b5 (patch)
tree3cecd5f29319b599e03d4b2388726688ec409fef /src
parent31c7e6c51db2e5be9e3375b1d1fa0bfdf4c35236 (diff)
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 <[email protected]> Reviewed-by: Rob Clark <[email protected]> Cc: "10.3 10.4" <[email protected]> (cherry picked from commit 37fe347542aad40aac5be9066c21f65f55d0f48c)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
index aaf362d5a74..275eec3016c 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
@@ -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);