[Mesa-dev] [PATCH (gles3) 11/20] glsl/ir_builder: Add `enum writemask`
Chad Versace
chad.versace at linux.intel.com
Mon Jan 21 00:49:23 PST 2013
Using this enum improves the readibility of calls to assign(), whose third
argument is a writemask.
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
src/glsl/ir_builder.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h
index f3aa0d7..82e3762 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
--
1.8.1.1
More information about the mesa-dev
mailing list