freedreno/ir3: hack for old compiler
authorRob Clark <robclark@freedesktop.org>
Wed, 31 Dec 2014 00:56:56 +0000 (19:56 -0500)
committerRob Clark <robclark@freedesktop.org>
Thu, 8 Jan 2015 00:37:28 +0000 (19:37 -0500)
Old compiler doesn't have ir3_block's.. so we need a special path.  This
hack can be dropped when ir3_compiler_old is retired.

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

index f28ce27a00dba9035eb6f3f6b13b0ef025c3b786..081143d5d6e3cc00ce5f03aaa8abc2aa85c9ce8f 100644 (file)
@@ -59,6 +59,7 @@ static void dump_info(struct ir3_shader_variant *so, const char *str)
 
                debug_printf("; %s: %s\n", type, str);
 
+if (block) {
                for (i = 0; i < block->ninputs; i++) {
                        if (!block->inputs[i])
                                continue;
@@ -81,6 +82,28 @@ static void dump_info(struct ir3_shader_variant *so, const char *str)
                                        (reg->flags & IR3_REG_HALF) ? "h" : "",
                                        (regid >> 2), "xyzw"[regid & 0x3], i);
                }
+} else {
+               /* hack to deal w/ old compiler:
+                * TODO maybe we can just keep this path?  I guess should
+                * be good enough (other than not able to deal w/ half)
+                */
+               for (i = 0; i < so->inputs_count; i++) {
+                       unsigned j, regid = so->inputs[i].regid;
+                       for (j = 0; j < so->inputs[i].ncomp; j++) {
+                               debug_printf("@in(r%d.%c)\tin%d\n",
+                                               (regid >> 2), "xyzw"[regid & 0x3], (i * 4) + j);
+                               regid++;
+                       }
+               }
+               for (i = 0; i < so->outputs_count; i++) {
+                       unsigned j, regid = so->outputs[i].regid;
+                       for (j = 0; j < 4; j++) {
+                               debug_printf("@out(r%d.%c)\tout%d\n",
+                                               (regid >> 2), "xyzw"[regid & 0x3], (i * 4) + j);
+                               regid++;
+                       }
+               }
+}
 
                disasm_a3xx(bin, info.sizedwords, 0, so->type);