Mesa (master): freedreno/ir3: add pre-dispatch tex fetch to disasm

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 18 22:03:26 UTC 2019


Module: Mesa
Branch: master
Commit: 07e9bf564f10affa32ee7beb995db4c78e9f0477
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=07e9bf564f10affa32ee7beb995db4c78e9f0477

Author: Rob Clark <robdclark at chromium.org>
Date:   Thu Oct 10 12:09:15 2019 -0700

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 <robdclark at chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>

---

 src/freedreno/ir3/ir3_shader.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

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);




More information about the mesa-commit mailing list