[Mesa-dev] [WIP 12/25] i965: Add helper telling if a register is scalar
Topi Pohjolainen
topi.pohjolainen at intel.com
Thu Oct 16 05:24:24 PDT 2014
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at 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
More information about the mesa-dev
mailing list