aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-04-08 13:38:54 -0700
committerKenneth Graunke <[email protected]>2016-04-09 21:10:11 -0700
commitb790232524d46ef888a3657d205aa18502b09d3f (patch)
tree8b633d5c73fe8b52d1f8e4d6160065a1f024ac63 /src
parent9b5bd20eb2d09e1ec2319b55c83ad7f28b6fefee (diff)
i965/disasm: Simplify the URB opcode printing with ?:.
Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_disasm.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index 09eb2392836..0ae237d9782 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -1509,13 +1509,12 @@ brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo,
format(file, " %ld", brw_inst_urb_global_offset(devinfo, inst));
space = 1;
- if (devinfo->gen >= 7) {
- err |= control(file, "urb opcode", gen7_urb_opcode,
- brw_inst_urb_opcode(devinfo, inst), &space);
- } else if (devinfo->gen >= 5) {
- err |= control(file, "urb opcode", gen5_urb_opcode,
- brw_inst_urb_opcode(devinfo, inst), &space);
- }
+
+ err |= control(file, "urb opcode",
+ devinfo->gen >= 7 ? gen7_urb_opcode
+ : gen5_urb_opcode,
+ brw_inst_urb_opcode(devinfo, inst), &space);
+
err |= control(file, "urb swizzle", urb_swizzle,
brw_inst_urb_swizzle_control(devinfo, inst), &space);
if (devinfo->gen < 7) {