pan/midgard: Specialize mod checking by type when checking constants
[mesa.git] / src / panfrost / midgard / midgard_compile.c
index b49f50dc584a9d9cd69df0418f47491e3f860cb6..48f7bbd38b5784063e225eea328f3fa213be1263 100644 (file)
@@ -1902,7 +1902,8 @@ embedded_to_inline_constant(compiler_context *ctx)
 
                         /* We don't know how to handle these with a constant */
 
-                        if (src->mod || src->half || src->rep_low || src->rep_high) {
+                        bool is_int = midgard_is_integer_op(ins->alu.op);
+                        if (mir_nontrivial_raw_mod(*src, is_int) || src->half || src->rep_low || src->rep_high) {
                                 DBG("Bailing inline constant...\n");
                                 continue;
                         }