[05/18] panfrost/midgard/disasm: Use texture op name bare

Submitted by Alyssa Rosenzweig on June 10, 2019, 10:01 p.m.

Details

Message ID 20190610220146.7832-6-alyssa.rosenzweig@collabora.com
State New
Headers show
Series "panfrost/midgard: Decode GLES3 texture op" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Alyssa Rosenzweig June 10, 2019, 10:01 p.m.
This allows us to show a call to textureLod in a reasonable way.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
---
 src/gallium/drivers/panfrost/midgard/disassemble.c | 11 ++++-------
 src/gallium/drivers/panfrost/midgard/midgard.h     |  5 +++--
 2 files changed, 7 insertions(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/panfrost/midgard/disassemble.c b/src/gallium/drivers/panfrost/midgard/disassemble.c
index 8d21afeac1c..58a07e4535c 100644
--- a/src/gallium/drivers/panfrost/midgard/disassemble.c
+++ b/src/gallium/drivers/panfrost/midgard/disassemble.c
@@ -1043,12 +1043,12 @@  print_texture_format(int format)
 static void
 print_texture_op(int format)
 {
-        /* Act like a modifier */
-        printf(".");
+        /* Act like a bare name, like ESSL functions */
 
         switch (format) {
-                DEFINE_CASE(TEXTURE_OP_NORMAL, "normal");
-                DEFINE_CASE(TEXTURE_OP_TEXEL_FETCH, "texelfetch");
+                DEFINE_CASE(TEXTURE_OP_NORMAL, "texture");
+                DEFINE_CASE(TEXTURE_OP_LOD, "textureLod");
+                DEFINE_CASE(TEXTURE_OP_TEXEL_FETCH, "texelFetch");
 
         default:
                 printf("op_%d", format);
@@ -1067,9 +1067,6 @@  print_texture_word(uint32_t *word, unsigned tabs)
                 printf("\t %08X ", word[i]);
         printf("\n");
 
-        /* Instruction family, like ALU words have theirs */
-        printf("texture");
-
         /* Broad category of texture operation in question */
         print_texture_op(texture->op);
 
diff --git a/src/gallium/drivers/panfrost/midgard/midgard.h b/src/gallium/drivers/panfrost/midgard/midgard.h
index 4354efc97b8..743fdf3811a 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard.h
+++ b/src/gallium/drivers/panfrost/midgard/midgard.h
@@ -490,8 +490,9 @@  midgard_load_store;
 #define REG_TEX_BASE 28
 
 /* Texture opcodes... maybe? */
-#define TEXTURE_OP_NORMAL 0x11
-#define TEXTURE_OP_TEXEL_FETCH 0x14
+#define TEXTURE_OP_NORMAL 0x11          /* texture */
+#define TEXTURE_OP_LOD 0x12             /* textureLod */
+#define TEXTURE_OP_TEXEL_FETCH 0x14     /* texelFetch */
 
 /* Texture format types, found in format */
 #define TEXTURE_CUBE 0x00