From: Eric Anholt Date: Wed, 28 Jul 2010 21:58:31 +0000 (-0700) Subject: glsl2: Add the define for ARB_fragment_coord_conventions when present. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c7b37c8367e72e7b4295cd249561e5c3079d161;p=mesa.git glsl2: Add the define for ARB_fragment_coord_conventions when present. Fixes: glsl-arb-fragment-coord-conventions-define --- diff --git a/src/glsl/glcpp/glcpp-parse.c b/src/glsl/glcpp/glcpp-parse.c index 2f08ff8112d..8fbbdab52fc 100644 --- a/src/glsl/glcpp/glcpp-parse.c +++ b/src/glsl/glcpp/glcpp-parse.c @@ -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; diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 41cfff5551c..c6ff32e544c 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -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;