Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com>
---
 src/mesa/drivers/dri/i965/brw_reg.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_reg.h 
b/src/mesa/drivers/dri/i965/brw_reg.h
index cf2ef13..7cf748f 100644
--- a/src/mesa/drivers/dri/i965/brw_reg.h
+++ b/src/mesa/drivers/dri/i965/brw_reg.h
@@ -802,6 +802,14 @@ brw_abs(struct brw_reg reg)
    return reg;
 }
 
+static inline bool
+brw_is_scalar(struct brw_reg reg)
+{
+   return reg.width == BRW_WIDTH_1 &&
+          reg.hstride == BRW_HORIZONTAL_STRIDE_0 &&
+          reg.vstride == BRW_VERTICAL_STRIDE_0;
+}
+
 /************************************************************************/
 
 static inline struct brw_reg
-- 
1.8.3.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to