summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nouveau_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_util.h')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_util.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h
index 076f225fed..d6007aba2b 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_util.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h
@@ -173,4 +173,22 @@ OUT_RINGm(struct nouveau_channel *chan, float m[16])
OUT_RINGf(chan, m[4*j + i]);
}
+static inline GLboolean
+is_color_operand(int op)
+{
+ return op == GL_SRC_COLOR || op == GL_ONE_MINUS_SRC_COLOR;
+}
+
+static inline GLboolean
+is_negative_operand(int op)
+{
+ return op == GL_ONE_MINUS_SRC_COLOR || op == GL_ONE_MINUS_SRC_ALPHA;
+}
+
+static inline GLboolean
+is_texture_source(int s)
+{
+ return s == GL_TEXTURE || (s >= GL_TEXTURE0 && s <= GL_TEXTURE31);
+}
+
#endif