aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-31 10:00:43 +0200
committermarha <marha@users.sourceforge.net>2012-07-31 10:00:43 +0200
commitbd27b3d008b0abf9ae2edcb127302728808533e4 (patch)
treea73a74f04a31a0f44465ed82bcf58b180ca53dbd /mesalib/src/glsl/glsl_parser_extras.cpp
parent2ff5448bcca8cba4b62026d5493cb08aaf2838d8 (diff)
downloadvcxsrv-bd27b3d008b0abf9ae2edcb127302728808533e4.tar.gz
vcxsrv-bd27b3d008b0abf9ae2edcb127302728808533e4.tar.bz2
vcxsrv-bd27b3d008b0abf9ae2edcb127302728808533e4.zip
fontconfig libXext mesa xserver pixman git update 31 Jul 2012
Diffstat (limited to 'mesalib/src/glsl/glsl_parser_extras.cpp')
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp
index d9ee406cf..7a9b22197 100644
--- a/mesalib/src/glsl/glsl_parser_extras.cpp
+++ b/mesalib/src/glsl/glsl_parser_extras.cpp
@@ -27,6 +27,7 @@
extern "C" {
#include "main/core.h" /* for struct gl_context */
+#include "main/context.h"
}
#include "ralloc.h"
@@ -90,19 +91,17 @@ _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);
+ bool is_desktop_gl = _mesa_is_desktop_gl(ctx);
+ this->Const.GLSL_110 = is_desktop_gl;
+ this->Const.GLSL_120 = is_desktop_gl && (ctx->Const.GLSLVersion >= 120);
+ this->Const.GLSL_130 = is_desktop_gl && (ctx->Const.GLSLVersion >= 130);
+ this->Const.GLSL_140 = is_desktop_gl && (ctx->Const.GLSLVersion >= 140);
const unsigned lowest_version =
(ctx->API == API_OPENGLES2) || ctx->Extensions.ARB_ES2_compatibility
? 100 : 110;
const unsigned highest_version =
- (ctx->API == API_OPENGL) ? ctx->Const.GLSLVersion : 100;
+ is_desktop_gl ? ctx->Const.GLSLVersion : 100;
char *supported = ralloc_strdup(this, "");
for (unsigned ver = lowest_version; ver <= highest_version; ver += 10) {
@@ -773,6 +772,7 @@ ast_declarator_list::ast_declarator_list(ast_fully_specified_type *type)
{
this->type = type;
this->invariant = false;
+ this->ubo_qualifiers_valid = false;
}
void