freedreno/ir3: we can't store immediate values
authorRob Clark <robclark@freedesktop.org>
Mon, 4 Apr 2016 21:33:19 +0000 (17:33 -0400)
committerRob Clark <robclark@freedesktop.org>
Tue, 5 Apr 2016 00:18:18 +0000 (20:18 -0400)
Fixes some transform-feedback piglits, like:

bin/ext_transform_feedback-nonflat-integral

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3_cp.c

index 48870074514ee2a9669dc0324e56324fee50e9d3..00fa3538cc040b672b8f47175a707ae758b4ee61 100644 (file)
@@ -111,6 +111,19 @@ static bool valid_flags(struct ir3_instruction *instr, unsigned n,
                valid_flags = IR3_REG_IMMED;
                if (flags & ~valid_flags)
                        return false;
+
+               if (flags & IR3_REG_IMMED) {
+                       /* doesn't seem like we can have immediate src for store
+                        * instructions:
+                        *
+                        * TODO this restriction could also apply to load instructions,
+                        * but for load instructions this arg is the address (and not
+                        * really sure any good way to test a hard-coded immed addr src)
+                        */
+                       if (is_store(instr) && (n == 1))
+                               return false;
+               }
+
                break;
        case 2:
                valid_flags = ir3_cat2_absneg(instr->opc) |