summaryrefslogtreecommitdiff
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-07-01 10:09:58 -0700
committerEric Anholt <eric@anholt.net>2010-07-01 11:07:23 -0700
commit8a1f186cc55979bb9df0a88b48da8d81460c3e7c (patch)
tree7a39126f77b75f94c09f441fdbca6c2be57d34cb /src/glsl/ir.h
parent9acf618f24428eba72650c0e328e7ed52986728e (diff)
glsl2: Add a pass to convert mod(a, b) to b * fract(a/b).
This is used by the Mesa IR backend to implement mod, fixing glsl-fs-mod.
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index f47813786b..c19bd417c3 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -551,6 +551,15 @@ enum ir_expression_operation {
ir_binop_sub,
ir_binop_mul,
ir_binop_div,
+
+ /**
+ * Takes one of two combinations of arguments:
+ *
+ * - mod(vecN, vecN)
+ * - mod(vecN, float)
+ *
+ * Does not take integer types.
+ */
ir_binop_mod,
/**