diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_reg.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h index 7eab7b51e38..5b427b22230 100644 --- a/src/mesa/drivers/dri/i965/brw_reg.h +++ b/src/mesa/drivers/dri/i965/brw_reg.h @@ -972,6 +972,13 @@ brw_writemask_for_size(unsigned n) return (1 << n) - 1; } +static inline unsigned +brw_writemask_for_component_packing(unsigned n, unsigned first_component) +{ + assert(first_component + n <= 4); + return (((1 << n) - 1) << first_component); +} + static inline struct brw_reg negate(struct brw_reg reg) { |