From 7269a30b86745a29bb575ce3545ab82e6514ce2a Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Tue, 23 Feb 2010 16:15:14 +0100 Subject: dri/nouveau: Restructure the nv[12]0 regcombiner code, and fake A8/L8 support. --- src/mesa/drivers/dri/nouveau/nouveau_util.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mesa/drivers/dri/nouveau/nouveau_util.h') 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 -- cgit v1.2.3