aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-09-30 08:58:27 +0200
committermarha <marha@users.sourceforge.net>2013-09-30 08:58:27 +0200
commita12cf779e828ec70da714832e1eaa730119fe10c (patch)
treedc99a80ba8d23ac18d2a33ebaa4cbdeef65ffb72 /mesalib/src/glsl
parent14718f10dcda487178690de9a51cc5acdf21e468 (diff)
downloadvcxsrv-a12cf779e828ec70da714832e1eaa730119fe10c.tar.gz
vcxsrv-a12cf779e828ec70da714832e1eaa730119fe10c.tar.bz2
vcxsrv-a12cf779e828ec70da714832e1eaa730119fe10c.zip
git update fontconfig mesa libXau pixman xkeyboard-config 30 Sep 2013
xkeyboard-config commit fe5c2416314fd1df423c8ce53cac2d28b00420e7 libXau commit 304a11be4727c5a7feeb2501e8e001466f8ce84e pixman commit b513b3dffe979056dbbbdc8e0659f8018c51c5f5 fontconfig commit 9161ed1e4a3f4afaee6dbcfc0b84a279ad99b397 mesa commit 868791f0baa0b51f4255c839448d3ca87ab1aa35
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/ast_to_hir.cpp2
-rw-r--r--mesalib/src/glsl/glsl_parser.yy8
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.cpp8
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.h10
4 files changed, 15 insertions, 13 deletions
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp
index 2316cf8e5..0859d9e00 100644
--- a/mesalib/src/glsl/ast_to_hir.cpp
+++ b/mesalib/src/glsl/ast_to_hir.cpp
@@ -2842,7 +2842,7 @@ ast_declarator_list::hir(exec_list *instructions,
* any extension that adds the 'layout' keyword.
*/
if (!state->is_version(130, 300)
- && !state->ARB_explicit_attrib_location_enable
+ && !state->has_explicit_attrib_location()
&& !state->ARB_fragment_coord_conventions_enable) {
if (this->type->qualifier.flags.q.out) {
_mesa_glsl_error(& loc, state,
diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy
index fa6e2053a..912931a47 100644
--- a/mesalib/src/glsl/glsl_parser.yy
+++ b/mesalib/src/glsl/glsl_parser.yy
@@ -1200,7 +1200,7 @@ layout_qualifier_id:
}
/* See also interface_block_layout_qualifier. */
- if (!$$.flags.i && state->ARB_uniform_buffer_object_enable) {
+ if (!$$.flags.i && state->has_uniform_buffer_objects()) {
if (strcmp($1, "std140") == 0) {
$$.flags.q.std140 = 1;
} else if (strcmp($1, "shared") == 0) {
@@ -1262,7 +1262,7 @@ layout_qualifier_id:
{
memset(& $$, 0, sizeof($$));
- if (state->ARB_explicit_attrib_location_enable) {
+ if (state->has_explicit_attrib_location()) {
if (strcmp("location", $1) == 0) {
$$.flags.q.explicit_location = 1;
@@ -1328,7 +1328,7 @@ layout_qualifier_id:
{
$$ = $1;
/* Layout qualifiers for ARB_uniform_buffer_object. */
- if ($$.flags.q.uniform && !state->ARB_uniform_buffer_object_enable) {
+ if ($$.flags.q.uniform && !state->has_uniform_buffer_objects()) {
_mesa_glsl_error(& @1, state,
"#version 140 / GL_ARB_uniform_buffer_object "
"layout qualifier `%s' is used", $1);
@@ -2138,7 +2138,7 @@ basic_interface_block:
block->declarations.push_degenerate_list_at_head(& $4->link);
if ($1.flags.q.uniform) {
- if (!state->ARB_uniform_buffer_object_enable) {
+ if (!state->has_uniform_buffer_objects()) {
_mesa_glsl_error(& @1, state,
"#version 140 / GL_ARB_uniform_buffer_object "
"required for defining uniform blocks");
diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp
index cac5a18e4..e9922fc14 100644
--- a/mesalib/src/glsl/glsl_parser_extras.cpp
+++ b/mesalib/src/glsl/glsl_parser_extras.cpp
@@ -299,14 +299,6 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version,
break;
}
}
-
- if (this->language_version >= 140) {
- this->ARB_uniform_buffer_object_enable = true;
- }
-
- if (this->language_version == 300 && this->es_shader) {
- this->ARB_explicit_attrib_location_enable = true;
- }
}
extern "C" {
diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h
index 364a98345..cef4436f6 100644
--- a/mesalib/src/glsl/glsl_parser_extras.h
+++ b/mesalib/src/glsl/glsl_parser_extras.h
@@ -121,6 +121,16 @@ struct _mesa_glsl_parse_state {
return check_version(130, 300, locp, "bit-wise operations are forbidden");
}
+ bool has_explicit_attrib_location() const
+ {
+ return ARB_explicit_attrib_location_enable || is_version(330, 300);
+ }
+
+ bool has_uniform_buffer_objects() const
+ {
+ return ARB_uniform_buffer_object_enable || is_version(140, 300);
+ }
+
void process_version_directive(YYLTYPE *locp, int version,
const char *ident);