glsl2: Add the define for ARB_fragment_coord_conventions when present.
authorEric Anholt <eric@anholt.net>
Wed, 28 Jul 2010 21:58:31 +0000 (14:58 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 28 Jul 2010 22:00:29 +0000 (15:00 -0700)
Fixes:
glsl-arb-fragment-coord-conventions-define

src/glsl/glcpp/glcpp-parse.c
src/glsl/glcpp/glcpp-parse.y

index 2f08ff8..8fbbdab 100644 (file)
@@ -3242,6 +3242,14 @@ glcpp_parser_create (const struct gl_extensions *extensions)
                                     "GL_EXT_texture_array", list);
        }
 
+       if ((extensions != NULL) &&
+           extensions->ARB_fragment_coord_conventions) {
+               list = _token_list_create(parser);
+               _token_list_append(list, tok);
+               _define_object_macro(parser, NULL,
+                                    "GL_ARB_fragment_coord_conventions", list);
+       }
+
        talloc_unlink(parser, tok);
 
        return parser;
index 41cfff5..c6ff32e 100644 (file)
@@ -937,6 +937,14 @@ glcpp_parser_create (const struct gl_extensions *extensions)
                                     "GL_EXT_texture_array", list);
        }
 
+       if ((extensions != NULL) &&
+           extensions->ARB_fragment_coord_conventions) {
+               list = _token_list_create(parser);
+               _token_list_append(list, tok);
+               _define_object_macro(parser, NULL,
+                                    "GL_ARB_fragment_coord_conventions", list);
+       }
+
        talloc_unlink(parser, tok);
 
        return parser;