From 3accecebe12d34e74feae8149615c379bea54915 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Wed, 8 Sep 2010 15:27:24 +0400
Subject: [PATCH 5/7] mesa: hack support for EXT_texture_env_combine in texenv.c, avoid gl errors if only this extension enabled in  driver

---
 src/mesa/main/texenv.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 4442fb8..d8402da 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -320,7 +320,8 @@ set_combiner_operand(GLcontext *ctx,
       alpha = GL_FALSE;
       break;
    case GL_OPERAND2_RGB:
-      if (ctx->Extensions.ARB_texture_env_combine) {
+      if (ctx->Extensions.ARB_texture_env_combine || 
+    	    ctx->Extensions.EXT_texture_env_combine) {
          term = 2;
          alpha = GL_FALSE;
       }
@@ -348,7 +349,8 @@ set_combiner_operand(GLcontext *ctx,
       alpha = GL_TRUE;
       break;
    case GL_OPERAND2_ALPHA:
-      if (ctx->Extensions.ARB_texture_env_combine) {
+      if (ctx->Extensions.ARB_texture_env_combine || 
+    	    ctx->Extensions.EXT_texture_env_combine) {
          term = 2;
          alpha = GL_TRUE;
       }
-- 
1.7.0.2

