[Mesa-dev] [PATCH v2 1/3] mesa: setup_glsl_generate_mipmap(): meta program compile failed

Oliver McFadden oliver.mcfadden at linux.intel.com
Thu Oct 4 04:21:30 PDT 2012


Discovered while attempting to run GLBenchMark 2.5 with test
GLB25_TriangleTexVertexLitTestC24Z16 on an ES2.0 context.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
---
 src/mesa/drivers/common/meta.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index d0bb5e0..eda72da 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3074,7 +3074,7 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
    const char *extension_mode;
    GLuint vs, fs;
 
-   if (ctx->Const.GLSLVersion < 130) {
+   if (ctx->API == API_OPENGLES2 || ctx->Const.GLSLVersion < 130) {
       vs_source =
          "attribute vec2 position;\n"
          "attribute vec3 textureCoords;\n"
@@ -3143,7 +3143,7 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
 
    mem_ctx = ralloc_context(NULL);
 
-   if (ctx->Const.GLSLVersion < 130) {
+   if (ctx->API == API_OPENGLES2 || ctx->Const.GLSLVersion < 130) {
       extension_mode = ((target == GL_TEXTURE_1D_ARRAY) ||
                         (target == GL_TEXTURE_2D_ARRAY)) ?
                        "require" : "disable";
-- 
1.7.8.6



More information about the mesa-dev mailing list