i965/vec4: Add auxiliary func to build a writemask from a component size
New method brw_writemask_for_size() will return a writemask with the first 'size' components activated. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
6e58fc56a5
commit
a5a3287f73
|
@ -950,6 +950,12 @@ brw_set_writemask(struct brw_reg reg, unsigned mask)
|
|||
return reg;
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
brw_writemask_for_size(unsigned n)
|
||||
{
|
||||
return (1 << n) - 1;
|
||||
}
|
||||
|
||||
static inline struct brw_reg
|
||||
negate(struct brw_reg reg)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue