meta: Don't try to enable FF texturing when we're using GLSL.
authorEric Anholt <eric@anholt.net>
Wed, 5 Feb 2014 23:45:25 +0000 (15:45 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 14 Feb 2014 20:09:42 +0000 (12:09 -0800)
On a core context, this would throw an error.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/common/meta_blit.c

index 456fa16491efbcad82e1d2d9f1981ad0dfa6e0ab..a2b284b0d8f94a18ea6137c13a6bd5fa5ee55e8e 100644 (file)
@@ -211,7 +211,7 @@ blitframebuffer_texture(struct gl_context *ctx,
                               GL_SKIP_DECODE_EXT);
    }
 
-   if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) {
+   if (!glsl_version) {
       _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
       _mesa_set_enable(ctx, target, GL_TRUE);
    }
@@ -393,10 +393,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
 
    }
 
-   /* glEnable() in gles2 and gles3 doesn't allow GL_TEXTURE_{1D, 2D, etc.}
-    * tokens.
-    */
-   if (_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES)
+   if (!use_glsl_version)
       _mesa_set_enable(ctx, tex->Target, GL_TRUE);
 
    if (mask & GL_COLOR_BUFFER_BIT) {
@@ -490,7 +487,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
       /* XXX can't easily do stencil */
    }
 
-   if (_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES)
+   if (!use_glsl_version)
       _mesa_set_enable(ctx, tex->Target, GL_FALSE);
 
    _mesa_meta_end(ctx);