Lines Matching defs:mask
125 * Return the result of applying swizzle \p swz to shuffle the bits of \p mask
129 brw_apply_swizzle_to_mask(unsigned swz, unsigned mask)
134 if (mask & (1 << BRW_GET_SWZ(swz, i)))
143 * bits of \p mask (AKA preimage). Useful to find out which components are
147 brw_apply_inv_swizzle_to_mask(unsigned swz, unsigned mask)
152 if (mask & (1 << i))
161 * mask. The result will only reference channels enabled in the provided \p
162 * mask, assuming that \p mask is non-zero. The constructed swizzle will
163 * satisfy the property that for any instruction OP and any mask:
165 * brw_OP(p, brw_writemask(dst, mask),
166 * brw_swizzle(src, brw_swizzle_for_mask(mask)));
170 * brw_OP(p, brw_writemask(dst, mask), src);
173 brw_swizzle_for_mask(unsigned mask)
175 unsigned last = (mask ? ffs(mask) - 1 : 0);
179 last = swz[i] = (mask & (1 << i) ? i : last);
197 * Converse of brw_swizzle_for_mask(). Returns the mask of components
912 * Return the mask register present in Gfx4-5, or the related register present
1093 brw_writemask(struct brw_reg reg, unsigned mask)
1096 reg.writemask &= mask;
1101 brw_set_writemask(struct brw_reg reg, unsigned mask)
1104 reg.writemask = mask;