From 0c7b37c8367e72e7b4295cd249561e5c3079d161 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 28 Jul 2010 14:58:31 -0700 Subject: glsl2: Add the define for ARB_fragment_coord_conventions when present. Fixes: glsl-arb-fragment-coord-conventions-define --- src/glsl/glcpp/glcpp-parse.c | 8 ++++++++ src/glsl/glcpp/glcpp-parse.y | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'src/glsl') 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; -- cgit v1.2.3