From: Rob Clark Date: Thu, 10 Oct 2019 19:09:15 +0000 (-0700) Subject: freedreno/ir3: add pre-dispatch tex fetch to disasm X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=07e9bf564f10affa32ee7beb995db4c78e9f0477;p=mesa.git freedreno/ir3: add pre-dispatch tex fetch to disasm Useful to see in disassembly listing texture fetches that were moved to pre-dispatch. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen --- diff --git a/src/freedreno/ir3/ir3_shader.c b/src/freedreno/ir3/ir3_shader.c index 45d8c909649..344e15f38f8 100644 --- a/src/freedreno/ir3/ir3_shader.c +++ b/src/freedreno/ir3/ir3_shader.c @@ -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);