[Mesa-dev] [PATCH 2/2] mesa: glsl: allow ES2 to report support for GLSL versions >= 1.20

Oliver McFadden oliver.mcfadden at linux.intel.com
Fri May 25 06:16:30 PDT 2012


This bug was discovered while running the Khronos conformance test suite
on i965 classic driver and receiving "implementation error: meta program
compile failed."

This bug was recently introduced by the i965 clear patch set and would
not be visible while using the GL API (only ES2 API) and only on gen6+
hardware (which claims support for GLSL 1.30)

Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
---
 src/glsl/glsl_parser_extras.cpp |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 46f21dd..0c3c5ab 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -91,12 +91,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
    this->Const.GLSL_100ES = (ctx->API == API_OPENGLES2)
       || ctx->Extensions.ARB_ES2_compatibility;
    this->Const.GLSL_110 = (ctx->API == API_OPENGL);
-   this->Const.GLSL_120 = (ctx->API == API_OPENGL)
-      && (ctx->Const.GLSLVersion >= 120);
-   this->Const.GLSL_130 = (ctx->API == API_OPENGL)
-      && (ctx->Const.GLSLVersion >= 130);
-   this->Const.GLSL_140 = (ctx->API == API_OPENGL)
-      && (ctx->Const.GLSLVersion >= 140);
+   this->Const.GLSL_120 = ctx->Const.GLSLVersion >= 120;
+   this->Const.GLSL_130 = ctx->Const.GLSLVersion >= 130;
+   this->Const.GLSL_140 = ctx->Const.GLSLVersion >= 140;
 
    const unsigned lowest_version =
       (ctx->API == API_OPENGLES2) || ctx->Extensions.ARB_ES2_compatibility
-- 
1.7.8



More information about the mesa-dev mailing list