From 8d361fd58f6c5543f398aeb2a8eaff596bf721d8 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Wed, 8 Sep 2010 06:50:04 +0400
Subject: [PATCH 4/7] nouveau: Add GL_EXT_texture_env_combine and GL_NV_texture_env_combine4 into common extension list, currently fail piglit tests, need more testing!

---
 src/mesa/drivers/dri/nouveau/nouveau_context.c |    2 ++
 src/mesa/drivers/dri/nouveau/nv04_state_frag.c |   10 +++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index e9e7bbf..0b735df 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -56,8 +56,10 @@ static const struct dri_extension nouveau_extensions[] = {
 	{ "GL_EXT_framebuffer_object",	GL_EXT_framebuffer_object_functions },
 	{ "GL_EXT_secondary_color",	GL_EXT_secondary_color_functions },
 	{ "GL_EXT_stencil_wrap",	NULL },
+	{ "GL_EXT_texture_env_combine",     NULL },
 	{ "GL_EXT_texture_lod_bias",	NULL },
 	{ "GL_NV_blend_square",         NULL },
+	{ "GL_NV_texture_env_combine4",    NULL },
 	{ "GL_SGIS_generate_mipmap",	NULL },
 	{ NULL,				NULL }
 };
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
index d7c86d4..d95ac97 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
@@ -89,13 +89,13 @@ get_input_source(struct combiner_state *rc, int source)
 	case GL_TEXTURE1:
 		return COMBINER_SOURCE(TEXTURE1);
 
-	case GL_CONSTANT:
+	case GL_CONSTANT_EXT:
 		return COMBINER_SOURCE(CONSTANT);
 
-	case GL_PRIMARY_COLOR:
+	case GL_PRIMARY_COLOR_EXT:
 		return COMBINER_SOURCE(PRIMARY_COLOR);
 
-	case GL_PREVIOUS:
+	case GL_PREVIOUS_EXT:
 		return rc->unit ? COMBINER_SOURCE(PREVIOUS) :
 			COMBINER_SOURCE(PRIMARY_COLOR);
 
@@ -202,7 +202,7 @@ setup_combiner(struct combiner_state *rc)
 		UNSIGNED_OP(rc);
 		break;
 
-	case GL_INTERPOLATE:
+	case GL_INTERPOLATE_EXT:
 		INPUT_ARG(rc, 0, 0, 0);
 		INPUT_ARG(rc, 1, 2, 0);
 		INPUT_ARG(rc, 2, 1, 0);
@@ -210,7 +210,7 @@ setup_combiner(struct combiner_state *rc)
 		UNSIGNED_OP(rc);
 		break;
 
-	case GL_ADD_SIGNED:
+	case GL_ADD_SIGNED_EXT:
 		INPUT_ARG(rc, 0, 0, 0);
 		INPUT_SRC(rc, 1, ZERO, INVERT);
 		INPUT_ARG(rc, 2, 1, 0);
-- 
1.7.0.2

