summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-10-10 12:09:15 -0700
committerRob Clark <[email protected]>2019-10-18 21:11:54 +0000
commit07e9bf564f10affa32ee7beb995db4c78e9f0477 (patch)
treec4e59e08c3310583bcae86de05f4799336692f35 /src
parent2b93eb9c76f24785a3fbf4504f0157046041b1bc (diff)
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 <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/ir3/ir3_shader.c10
1 files changed, 10 insertions, 0 deletions
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);