summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-12-30 19:56:56 -0500
committerRob Clark <[email protected]>2015-01-07 19:37:28 -0500
commit063e2ef76a450f7b08ac942a0ca3842b9498f31b (patch)
treeba139a5087bb09ff9ba3bf83c8eab97d9e7b3c71 /src/gallium
parent18899d1b8078d2c16b7b3f105e0b39d3ea70a4cc (diff)
freedreno/ir3: hack for old compiler
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_cmdline.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
index f28ce27a00d..081143d5d6e 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
@@ -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);