[Mesa-dev] [PATCH 11/11] meta: Don't try to enable FF texturing when we're using GLSL.
Eric Anholt
eric at anholt.net
Wed Feb 5 17:20:14 PST 2014
On a core context, this would throw an error.
---
src/mesa/drivers/common/meta_blit.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 46c8efd..4e48e74 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -389,7 +389,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);
}
@@ -579,10 +579,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) {
@@ -677,7 +674,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);
--
1.9.rc1
More information about the mesa-dev
mailing list