pan/midgard: Disassemble UBO index explicitly
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 13 Aug 2019 18:10:06 +0000 (11:10 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 14 Aug 2019 23:57:24 +0000 (16:57 -0700)
It's a bit of a special case but that's fine.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/disassemble.c

index 1c061eb6df7e86e56db7ae76819f75558558fd60..be8c66fe2cc492686dc578e73b04c6b60b0bc377 100644 (file)
@@ -1034,7 +1034,9 @@ print_load_store_instr(uint64_t data,
 
         int address = word->address;
 
-        if (OP_IS_UBO_READ(word->op)) {
+        bool is_ubo = OP_IS_UBO_READ(word->op);
+
+        if (is_ubo) {
                 /* UBOs use their own addressing scheme */
 
                 int lo = word->varying_parameters >> 7;
@@ -1049,7 +1051,12 @@ print_load_store_instr(uint64_t data,
         print_swizzle_vec4(word->swizzle, false, false);
 
         printf(", ");
-        print_load_store_arg(word->arg_1, 0);
+
+        if (is_ubo)
+                printf("ubo%d", word->arg_1);
+        else
+                print_load_store_arg(word->arg_1, 0);
+
         printf(", ");
         print_load_store_arg(word->arg_2, 1);
         printf(" /* %X */\n", word->varying_parameters);