Revert "glsl: default to compat shaders in compat profile"

This reverts commit 6c8cc9be12.

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 <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9486>
This commit is contained in:
Timothy Arceri 2021-03-10 11:18:17 +11:00 committed by Marge Bot
parent 217d6594de
commit 1772569449
1 changed files with 4 additions and 4 deletions

View File

@ -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;