vc4: Add a safety check for setting flags.
authorEric Anholt <eric@anholt.net>
Wed, 16 Mar 2016 01:57:20 +0000 (18:57 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 16 Mar 2016 18:28:34 +0000 (11:28 -0700)
If a pack was on the src reg, should it be a float, int, or mul unpack?
Just complain, instead.

src/gallium/drivers/vc4/vc4_qir.c

index 65f0067..fd1192f 100644 (file)
@@ -488,6 +488,9 @@ qir_SF(struct vc4_compile *c, struct qreg src)
         if (!list_empty(&c->instructions))
                 last_inst = (struct qinst *)c->instructions.prev;
 
+        /* We don't have any way to guess which kind of MOV is implied. */
+        assert(!src.pack);
+
         if (src.file != QFILE_TEMP ||
             !c->defs[src.index] ||
             last_inst != c->defs[src.index] ||