v3d: Reinstate the new shader-db output after v3d_compile() refactor.
authorEric Anholt <eric@anholt.net>
Thu, 3 Jan 2019 01:34:11 +0000 (17:34 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 4 Jan 2019 23:26:19 +0000 (15:26 -0800)
I misplaced it in the rebase conflicts.

src/broadcom/compiler/vir.c

index 8cf45630c4bf354ed9d8f523226af48eee83ef48..2f32359f384a538b601137f7952412cd295c4419 100644 (file)
@@ -961,7 +961,24 @@ uint64_t *v3d_compile(const struct v3d_compiler *compiler,
         v3d_set_prog_data(c, prog_data);
 
         *out_prog_data = prog_data;
-        return v3d_return_qpu_insts(c, final_assembly_size);
+
+        char *shaderdb;
+        int ret = asprintf(&shaderdb,
+                           "%s shader: %d inst, %d threads, %d loops, "
+                           "%d uniforms, %d:%d spills:fills",
+                           vir_get_stage_name(c),
+                           c->qpu_inst_count,
+                           c->threads,
+                           c->loops,
+                           c->num_uniforms,
+                           c->spills,
+                           c->fills);
+        if (ret >= 0) {
+                c->debug_output(shaderdb, c->debug_output_data);
+                free(shaderdb);
+        }
+
+       return v3d_return_qpu_insts(c, final_assembly_size);
 }
 
 void