[Mesa-dev] [PATCH 1/3] glsl: recognize GLSL 4.60
Ian Romanick
idr at freedesktop.org
Mon Aug 7 22:29:55 UTC 2017
In case you feel like handling it... there is one other GLSL 4.60
feature that is not covered by any extension. It was previously illegal
to have an extra ; at global scope, but this is now allowed. So things
like,
uniform int i;;;;;;;;
are valid, but they previously should have generated an error.
On 08/01/2017 03:26 AM, Samuel Pitoiset wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/compiler/glsl/glsl_parser_extras.cpp | 4 ++--
> src/compiler/glsl/glsl_parser_extras.h | 2 +-
> src/compiler/glsl/standalone.cpp | 2 ++
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
> index 68af6baafa..8f1651d494 100644
> --- a/src/compiler/glsl/glsl_parser_extras.cpp
> +++ b/src/compiler/glsl/glsl_parser_extras.cpp
> @@ -54,9 +54,9 @@ 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, 450 };
> + { 110, 120, 130, 140, 150, 330, 400, 410, 420, 430, 440, 450, 460 };
> static const unsigned known_desktop_gl_versions[] =
> - { 20, 21, 30, 31, 32, 33, 40, 41, 42, 43, 44, 45 };
> + { 20, 21, 30, 31, 32, 33, 40, 41, 42, 43, 44, 45, 46 };
>
>
> _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
> diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
> index be6c8dce6b..fb35813087 100644
> --- a/src/compiler/glsl/glsl_parser_extras.h
> +++ b/src/compiler/glsl/glsl_parser_extras.h
> @@ -354,7 +354,7 @@ struct _mesa_glsl_parse_state {
> unsigned ver;
> uint8_t gl_ver;
> bool es;
> - } supported_versions[16];
> + } supported_versions[17];
>
> bool es_shader;
> bool compat_shader;
> diff --git a/src/compiler/glsl/standalone.cpp b/src/compiler/glsl/standalone.cpp
> index 52554bb92a..8e5bc352fc 100644
> --- a/src/compiler/glsl/standalone.cpp
> +++ b/src/compiler/glsl/standalone.cpp
> @@ -253,6 +253,7 @@ initialize_context(struct gl_context *ctx, gl_api api)
> case 430:
> case 440:
> case 450:
> + case 460:
> ctx->Const.MaxClipPlanes = 8;
> ctx->Const.MaxDrawBuffers = 8;
> ctx->Const.MinProgramTexelOffset = -8;
> @@ -418,6 +419,7 @@ standalone_compile_shader(const struct standalone_options *_options,
> case 430:
> case 440:
> case 450:
> + case 460:
> glsl_es = false;
> break;
> default:
>
More information about the mesa-dev
mailing list