i965: Add notification register
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 5 Nov 2014 01:52:42 +0000 (17:52 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Fri, 12 Jun 2015 22:12:40 +0000 (15:12 -0700)
This will be used by the wait instruction when implementing the barrier()
function.

v2:
 * Changes suggested by mattst88

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_reg.h

index 81a932063a734f4c44fd7c671df65810b5b03d18..c8b134103bba3cd1b83eb9654fe50b825a8dab22 100644 (file)
@@ -764,6 +764,22 @@ brw_ip_reg(void)
                   WRITEMASK_XYZW); /* NOTE! */
 }
 
+static inline struct brw_reg
+brw_notification_reg(void)
+{
+   return brw_reg(BRW_ARCHITECTURE_REGISTER_FILE,
+                  BRW_ARF_NOTIFICATION_COUNT,
+                  0,
+                  0,
+                  0,
+                  BRW_REGISTER_TYPE_UD,
+                  BRW_VERTICAL_STRIDE_0,
+                  BRW_WIDTH_1,
+                  BRW_HORIZONTAL_STRIDE_0,
+                  BRW_SWIZZLE_XXXX,
+                  WRITEMASK_X);
+}
+
 static inline struct brw_reg
 brw_acc_reg(unsigned width)
 {