panfrost/midgard/disasm: Use texture op name bare
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 10 Jun 2019 18:51:16 +0000 (11:51 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 11 Jun 2019 15:44:18 +0000 (08:44 -0700)
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
src/gallium/drivers/panfrost/midgard/midgard.h

index 084064eb6158b2c7c92ccfa83fe0f8eb1b38dc2a..49e2042f7fdbd6f373926e5941e51c3dfab9300d 100644 (file)
@@ -1045,12 +1045,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);
@@ -1065,9 +1065,6 @@ print_texture_word(uint32_t *word, unsigned tabs)
 {
         midgard_texture_word *texture = (midgard_texture_word *) word;
 
-        /* Instruction family, like ALU words have theirs */
-        printf("texture");
-
         /* Broad category of texture operation in question */
         print_texture_op(texture->op);
 
index c8331f64a679791dc4a6c300fc0f03c8fc4ec5c9..bc283bb365197dbba3d0687b632052153633d1c4 100644 (file)
@@ -493,8 +493,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