i965: add helper for creating packing writemask
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 23 Jun 2016 02:52:05 +0000 (12:52 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 21 Jul 2016 02:06:11 +0000 (12:06 +1000)
commit138aad06b3bc577f7ee2970ad02f3381da451896
tree0c54f66957e1f95a3e0c8b9c5055bb9357570222
parent4b57b53f85a7b125fa19508b5dcdd92b9e00c25f
i965: add helper for creating packing writemask

For example where n=3 first_component=1 this will give us
0xE (WRITEMASK_YZW).

V2:
Add assert to check first component is <= 4 (Suggested by Ken)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/mesa/drivers/dri/i965/brw_reg.h