summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau/nouveau_util.h
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-02-23 16:15:14 +0100
committerFrancisco Jerez <currojerez@riseup.net>2010-02-25 18:37:36 +0100
commit7269a30b86745a29bb575ce3545ab82e6514ce2a (patch)
tree7be861341897e4e66c1519cd77e922574b4ec30c /src/mesa/drivers/dri/nouveau/nouveau_util.h
parent323e6bbb052f37f91c7340e16c2352bb780a43d8 (diff)
downloadexternal_mesa3d-7269a30b86745a29bb575ce3545ab82e6514ce2a.zip
external_mesa3d-7269a30b86745a29bb575ce3545ab82e6514ce2a.tar.gz
external_mesa3d-7269a30b86745a29bb575ce3545ab82e6514ce2a.tar.bz2
dri/nouveau: Restructure the nv[12]0 regcombiner code, and fake A8/L8 support.
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 076f225..d6007ab 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