mesa: Remove ClearIndex and IndexMask from device-driver interface
[mesa.git] / src / mesa / drivers / dri / nouveau / nouveau_util.h
index 076f225fedc6a50b624c1e49df3a7fb184effccb..d6007aba2b9e847b1cc50b63ffa2aeacd51c2085 100644 (file)
@@ -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