diff options
author | Kenneth Graunke <[email protected]> | 2013-06-07 22:04:23 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-06-10 10:54:56 -0700 |
commit | 603940d5bb69933543b41221ae5b4511fcde3eeb (patch) | |
tree | 4abc4b98a56eef6e378f11a93ce46ac5b50636fc /src/glsl/glcpp | |
parent | e203919a4ede4edd519fc28cb69ec5f00d058bcd (diff) |
glcpp: Automatically #define GL_core_profile 1 on GLSL 1.50+.
Page 17 of the GLSL 1.50.11 specification states:
"There is a built-in macro definition for each profile the
implementation supports. All implementations provide the following
macro:
Reviewed-by: Matt Turner <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/glcpp')
-rw-r--r-- | src/glsl/glcpp/glcpp-parse.y | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 81ba04bcc0e..fe36c124d1c 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -2064,6 +2064,9 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio add_builtin_define (parser, "GL_ES", 1); } + if (version >= 150) + add_builtin_define(parser, "GL_core_profile", 1); + /* Currently, all ES2/ES3 implementations support highp in the * fragment shader, so we always define this macro in ES2/ES3. * If we ever get a driver that doesn't support highp, we'll |