aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser.ypp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-27 11:19:53 +0000
committermarha <marha@users.sourceforge.net>2011-01-27 11:19:53 +0000
commit7bbe9d92dfcc704e5017809c7e922025ff33bd53 (patch)
treea10f27e2f1f92671623d5e2d5b5391665e33c2fc /mesalib/src/glsl/glsl_parser.ypp
parent458542c76bf19b6bb24c397c3a567b64c88842c2 (diff)
parentdc9d750132f95783d2db6fb8e08271fc0878576d (diff)
downloadvcxsrv-7bbe9d92dfcc704e5017809c7e922025ff33bd53.tar.gz
vcxsrv-7bbe9d92dfcc704e5017809c7e922025ff33bd53.tar.bz2
vcxsrv-7bbe9d92dfcc704e5017809c7e922025ff33bd53.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/glsl/glsl_parser.ypp')
-rw-r--r--mesalib/src/glsl/glsl_parser.ypp39
1 files changed, 31 insertions, 8 deletions
diff --git a/mesalib/src/glsl/glsl_parser.ypp b/mesalib/src/glsl/glsl_parser.ypp
index 3982167c4..3955648eb 100644
--- a/mesalib/src/glsl/glsl_parser.ypp
+++ b/mesalib/src/glsl/glsl_parser.ypp
@@ -1018,7 +1018,8 @@ layout_qualifier_id:
memset(& $$, 0, sizeof($$));
- if (state->ARB_fragment_coord_conventions_enable) {
+ /* Layout qualifiers for ARB_fragment_coord_conventions. */
+ if (!got_one && state->ARB_fragment_coord_conventions_enable) {
if (strcmp($1, "origin_upper_left") == 0) {
got_one = true;
$$.flags.q.origin_upper_left = 1;
@@ -1026,19 +1027,41 @@ layout_qualifier_id:
got_one = true;
$$.flags.q.pixel_center_integer = 1;
}
+
+ if (got_one && state->ARB_fragment_coord_conventions_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "GL_ARB_fragment_coord_conventions layout "
+ "identifier `%s' used\n", $1);
+ }
+ }
+
+ /* Layout qualifiers for AMD_conservative_depth. */
+ if (!got_one && state->AMD_conservative_depth_enable) {
+ if (strcmp($1, "depth_any") == 0) {
+ got_one = true;
+ $$.flags.q.depth_any = 1;
+ } else if (strcmp($1, "depth_greater") == 0) {
+ got_one = true;
+ $$.flags.q.depth_greater = 1;
+ } else if (strcmp($1, "depth_less") == 0) {
+ got_one = true;
+ $$.flags.q.depth_less = 1;
+ } else if (strcmp($1, "depth_unchanged") == 0) {
+ got_one = true;
+ $$.flags.q.depth_unchanged = 1;
+ }
+
+ if (got_one && state->AMD_conservative_depth_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "GL_AMD_conservative_depth "
+ "layout qualifier `%s' is used\n", $1);
+ }
}
- /* If the identifier didn't match any known layout identifiers,
- * emit an error.
- */
if (!got_one) {
_mesa_glsl_error(& @1, state, "unrecognized layout identifier "
"`%s'\n", $1);
YYERROR;
- } else if (state->ARB_fragment_coord_conventions_warn) {
- _mesa_glsl_warning(& @1, state,
- "GL_ARB_fragment_coord_conventions layout "
- "identifier `%s' used\n", $1);
}
}
| IDENTIFIER '=' INTCONSTANT