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 2f08ff8112dfcfe2ba749494b3d05864e5ebc411..8fbbdab52fca2083642582bafd1f8adb4916904e 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 41cfff5551c124647351a8984647265214482bee..c6ff32e544c661e96e6f232b139d529005f7043a 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;