From 1772569449c07979487f95e2ab1a73d22fde4b5e Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 10 Mar 2021 11:18:17 +1100 Subject: [PATCH] Revert "glsl: default to compat shaders in compat profile" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6c8cc9be12dc5d6c0d2386d6addb69d8f2fb5399. A spec bug was resolved confirming the original behaviour. Also it seems the game Foundation no longer depends on the incorrect behaviour. Reviewed-by: Tapani Pälli Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl/glsl_parser_extras.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 6c735eaea04..7daf65bef6d 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -396,13 +396,14 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version, { bool es_token_present = false; bool compat_token_present = false; - bool core_token_present = false; if (ident) { if (strcmp(ident, "es") == 0) { es_token_present = true; } else if (version >= 150) { if (strcmp(ident, "core") == 0) { - core_token_present = true; + /* Accept the token. There's no need to record that this is + * a core profile shader since that's the only profile we support. + */ } else if (strcmp(ident, "compatibility") == 0) { compat_token_present = true; @@ -443,8 +444,7 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version, this->compat_shader = compat_token_present || (this->ctx->API == API_OPENGL_COMPAT && - this->language_version >= 140 && - !core_token_present) || + this->language_version == 140) || (!this->es_shader && this->language_version < 140); bool supported = false;