---
src/mesa/drivers/dri/i965/brw_fs.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h
b/src/mesa/drivers/dri/i965/brw_fs.h
index 491fc4d..fe450a8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -161,6 +161,16 @@ offset(fs_reg reg, unsigned delta)
return reg;
}
+static inline fs_reg
+component(fs_reg reg, unsigned idx)
+{
+ assert(reg.subreg_offset == 0);
+ assert(idx < reg.width);
+ reg.subreg_offset = idx * type_sz(reg.type);
+ reg.width = 1;
+ return reg;
+}
+
/**
* Get either of the 8-component halves of a 16-component register.
*
--
2.1.0
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev