diff options
author | Jordan Justen <[email protected]> | 2014-11-24 13:56:29 -0800 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2014-12-01 16:20:21 -0800 |
commit | cd1b0f04be041fa1750cac332d5539c48a3f272d (patch) | |
tree | 091118cf6d832a467fa390e1ab3abfdaa16386df /src | |
parent | 307d22abb08f9433ae9a0a95b0225c2725ec50de (diff) |
main, glsl: Bump max known desktop glsl version to 4.50
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 10 | ||||
-rw-r--r-- | src/glsl/glsl_parser_extras.h | 2 | ||||
-rw-r--r-- | src/mesa/main/getstring.c | 6 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 5772d1389e1..6893c7b82cc 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -51,7 +51,7 @@ glsl_compute_version_string(void *mem_ctx, bool is_es, unsigned version) static const unsigned known_desktop_glsl_versions[] = - { 110, 120, 130, 140, 150, 330, 400, 410, 420, 430, 440 }; + { 110, 120, 130, 140, 150, 330, 400, 410, 420, 430, 440, 450 }; _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, @@ -142,6 +142,12 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, this->user_structures = NULL; this->num_user_structures = 0; + /* supported_versions should be large enough to support the known desktop + * GLSL versions plus 2 GLES versions (ES2 & ES3) + */ + STATIC_ASSERT((ARRAY_SIZE(known_desktop_glsl_versions) + 2) == + ARRAY_SIZE(this->supported_versions)); + /* Populate the list of supported GLSL versions */ /* FINISHME: Once the OpenGL 3.0 'forward compatible' context or * the OpenGL 3.2 Core context is supported, this logic will need @@ -169,8 +175,6 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, this->supported_versions[this->num_supported_versions].es = true; this->num_supported_versions++; } - assert(this->num_supported_versions - <= ARRAY_SIZE(this->supported_versions)); /* Create a string for use in error messages to tell the user which GLSL * versions are supported. diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index c14d74c9846..e9eb237b0b3 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -217,7 +217,7 @@ struct _mesa_glsl_parse_state { struct { unsigned ver; bool es; - } supported_versions[12]; + } supported_versions[14]; bool es_shader; unsigned language_version; diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index 431d60b031f..f9d13a7253a 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -58,6 +58,12 @@ shading_language_version(struct gl_context *ctx) return (const GLubyte *) "4.10"; case 420: return (const GLubyte *) "4.20"; + case 430: + return (const GLubyte *) "4.30"; + case 440: + return (const GLubyte *) "4.40"; + case 450: + return (const GLubyte *) "4.50"; default: _mesa_problem(ctx, "Invalid GLSL version in shading_language_version()"); |