Mesa (master): i965/disasm: Decode "channel mask present" bit correctly.

Kenneth Graunke kwg at kemper.freedesktop.org
Sun Apr 10 04:19:36 UTC 2016


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Apr  8 13:48:46 2016 -0700

i965/disasm: Decode "channel mask present" bit correctly.

Bit 15 means "interleave" for most messages, but for SIMD8 messages it
means "use channel masks".

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ben Widawsky <ben at bwidawsk.net>

---

 src/mesa/drivers/dri/i965/brw_disasm.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index 0ae237d..0848657 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -1505,7 +1505,9 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo,
             break;
          }
 
-         case BRW_SFID_URB:
+         case BRW_SFID_URB: {
+            unsigned opcode = brw_inst_urb_opcode(devinfo, inst);
+
             format(file, " %ld", brw_inst_urb_global_offset(devinfo, inst));
 
             space = 1;
@@ -1513,10 +1515,18 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo,
             err |= control(file, "urb opcode",
                            devinfo->gen >= 7 ? gen7_urb_opcode
                                              : gen5_urb_opcode,
-                           brw_inst_urb_opcode(devinfo, inst), &space);
+                           opcode, &space);
+
+            if (opcode == GEN8_URB_OPCODE_SIMD8_WRITE ||
+                opcode == GEN8_URB_OPCODE_SIMD8_READ) {
+               if (brw_inst_urb_channel_mask_present(devinfo, inst))
+                  string(file, " masked");
+            } else {
+               err |= control(file, "urb swizzle", urb_swizzle,
+                              brw_inst_urb_swizzle_control(devinfo, inst),
+                              &space);
+            }
 
-            err |= control(file, "urb swizzle", urb_swizzle,
-                           brw_inst_urb_swizzle_control(devinfo, inst), &space);
             if (devinfo->gen < 7) {
                err |= control(file, "urb allocate", urb_allocate,
                               brw_inst_urb_allocate(devinfo, inst), &space);
@@ -1528,6 +1538,7 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo,
                               brw_inst_urb_complete(devinfo, inst), &space);
             }
             break;
+         }
          case BRW_SFID_THREAD_SPAWNER:
             break;
 




More information about the mesa-commit mailing list