freedreno/ir3: add pre-dispatch tex fetch to disasm
authorRob Clark <robdclark@chromium.org>
Thu, 10 Oct 2019 19:09:15 +0000 (12:09 -0700)
committerRob Clark <robdclark@gmail.com>
Fri, 18 Oct 2019 21:11:54 +0000 (21:11 +0000)
Useful to see in disassembly listing texture fetches that were moved to
pre-dispatch.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/freedreno/ir3/ir3_shader.c

index 45d8c909649b1a0ea83b1440a9ed37c6e0e20d28..344e15f38f891dea308f3ce1877b8f1b393f731e 100644 (file)
@@ -396,6 +396,16 @@ ir3_shader_disasm(struct ir3_shader_variant *so, uint32_t *bin, FILE *out)
                                (regid >> 2), "xyzw"[regid & 0x3], i);
        }
 
+       /* print pre-dispatch texture fetches: */
+       for (i = 0; i < so->num_sampler_prefetch; i++) {
+               const struct ir3_sampler_prefetch *fetch = &so->sampler_prefetch[i];
+               fprintf(out, "@tex(%sr%d.%c)\tsrc=%u, samp=%u, tex=%u, wrmask=%x, cmd=%u\n",
+                               fetch->half_precision ? "h" : "",
+                               fetch->dst >> 2, "xyzw"[fetch->dst & 0x3],
+                               fetch->src, fetch->samp_id, fetch->tex_id,
+                               fetch->wrmask, fetch->cmd);
+       }
+
        for (i = 0; i < ir->noutputs; i++) {
                if (!ir->outputs[i]) {
                        fprintf(out, "; out%d unused\n", i);