Mesa (master): panfrost/midgard/disasm: Print LOD for texelFetch

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 11 15:45:04 UTC 2019


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Mon Jun 10 13:13:51 2019 -0700

panfrost/midgard/disasm: Print LOD for texelFetch

Its encoding differs slightly from the LOD used in normal texture calls.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/gallium/drivers/panfrost/midgard/disassemble.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/gallium/drivers/panfrost/midgard/disassemble.c b/src/gallium/drivers/panfrost/midgard/disassemble.c
index fafa2d4e74a..7b0972efb8c 100644
--- a/src/gallium/drivers/panfrost/midgard/disassemble.c
+++ b/src/gallium/drivers/panfrost/midgard/disassemble.c
@@ -1137,6 +1137,15 @@ print_texture_word(uint32_t *word, unsigned tabs)
         if (texture->lod_register) {
                 /* TODO: Decode */
                 printf("lod/bias/grad reg 0x%X (%X), ", texture->bias, texture->bias_int);
+        } else if (texture->op == TEXTURE_OP_TEXEL_FETCH) {
+                /* For texel fetch, the int LOD is in the fractional place and
+                 * there is no fraction / possibility of bias. We *always* have
+                 * an explicit LOD, even if it's zero. */
+
+                if (texture->bias_int)
+                        printf(" /* bias_int = 0x%X */ ", texture->bias_int);
+
+                printf("lod = %d, ", texture->bias);
         } else if (texture->bias || texture->bias_int) {
                 int bias_int = texture->bias_int;
                 float bias_frac = texture->bias / 256.0f;




More information about the mesa-commit mailing list