From: Ian Romanick <ian.d.roman...@intel.com>

   text    data     bss     dec     hex filename
7034243  235248   37280 7306771  6f7e13 32-bit i965_dri.so before
7034243  235248   37280 7306771  6f7e13 32-bit i965_dri.so after
6676063  303400   50608 7030071  6b4537 64-bit i965_dri.so before
6676047  303400   50608 7030055  6b4527 64-bit i965_dri.so after

Signed-off-by: Ian Romanick <ian.d.roman...@intel.com>
---
 src/mesa/main/texenv.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index d1705e9..956cc1c 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -256,7 +256,8 @@ set_combiner_operand(struct gl_context *ctx,
                      GLenum pname, GLenum param)
 {
    GLuint term;
-   GLboolean alpha, legal;
+   bool alpha;
+   bool legal;
 
    /* The enums were given sequential values for a reason.
     */
@@ -266,22 +267,20 @@ set_combiner_operand(struct gl_context *ctx,
    case GL_OPERAND2_RGB:
    case GL_OPERAND3_RGB_NV:
       term = pname - GL_OPERAND0_RGB;
-      alpha = GL_FALSE;
+      alpha = false;
       break;
    case GL_OPERAND0_ALPHA:
    case GL_OPERAND1_ALPHA:
    case GL_OPERAND2_ALPHA:
    case GL_OPERAND3_ALPHA_NV:
       term = pname - GL_OPERAND0_ALPHA;
-      alpha = GL_TRUE;
+      alpha = true;
       break;
    default:
-      TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
-      return;
+      unreachable("invalid pname");
    }
 
-   if ((term == 3) && (ctx->API != API_OPENGL_COMPAT
-                       || !ctx->Extensions.NV_texture_env_combine4)) {
+   if (term == 3 && !_mesa_has_NV_texture_env_combine4(ctx)) {
       TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
       return;
    }
@@ -311,10 +310,10 @@ set_combiner_operand(struct gl_context *ctx,
         || ctx->Extensions.NV_texture_env_combine4;
       break;
    case GL_SRC_ALPHA:
-      legal = GL_TRUE;
+      legal = true;
       break;
    default:
-      legal = GL_FALSE;
+      legal = false;
    }
 
    if (!legal) {
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to