diff options
author | Chad Versace <[email protected]> | 2013-01-11 14:54:28 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2013-01-24 21:24:10 -0800 |
commit | a32bc53029414ec952c9adcb21da52c021687f08 (patch) | |
tree | bd8ada2a7dd781b170b564a2f647bad76ae2687b /src/glsl/ir_builder.h | |
parent | a6479ef9687b8d996a908127fccad0ec897bb9ee (diff) |
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 <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/glsl/ir_builder.h')
-rw-r--r-- | src/glsl/ir_builder.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h index f3aa0d76220..82e37628ec7 100644 --- a/src/glsl/ir_builder.h +++ b/src/glsl/ir_builder.h @@ -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 |