glsl/ir_builder: Add `enum writemask`

Using this enum improves the readibility of calls to assign(), whose third
argument is a writemask.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
Chad Versace 2013-01-11 14:54:28 -08:00
parent a6479ef968
commit a32bc53029
1 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,15 @@
namespace ir_builder {
#ifndef WRITEMASK_X
enum writemask {
WRITEMASK_X = 0x1,
WRITEMASK_Y = 0x2,
WRITEMASK_Z = 0x4,
WRITEMASK_W = 0x8,
};
#endif
/**
* This little class exists to let the helper expression generators
* take either an ir_rvalue * or an ir_variable * to be automatically