From f13a6ac8ab62599fa439a2b1e4f3c48942ed9380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 30 Sep 2023 16:34:19 -0700 Subject: [PATCH] shaderc: Fixed GLSL profile downgrade. --- tools/shaderc/shaderc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/shaderc/shaderc.cpp b/tools/shaderc/shaderc.cpp index eb7cd559b..9da606082 100644 --- a/tools/shaderc/shaderc.cpp +++ b/tools/shaderc/shaderc.cpp @@ -2234,7 +2234,7 @@ namespace bgfx const bool usesTextureArray = !bx::findIdentifierMatch(input, s_textureArray).isEmpty(); const bool usesPacking = !bx::findIdentifierMatch(input, s_ARB_shading_language_packing).isEmpty(); const bool usesViewportLayerArray = !bx::findIdentifierMatch(input, s_ARB_shader_viewport_layer_array).isEmpty(); - const bool usesUnsignedVecs = !bx::findIdentifierMatch(preprocessedInput, s_unsignedVecs).isEmpty(); + const bool usesUnsignedVecs = !bx::findIdentifierMatch(preprocessedInput, s_unsignedVecs).isEmpty(); if (profile->lang != ShadingLang::ESSL) { @@ -2246,7 +2246,6 @@ namespace bgfx ) ); bx::stringPrintf(code, "#version %d\n", need130 ? 130 : glsl_profile); - glsl_profile = 130; if (need130) { @@ -2370,7 +2369,8 @@ namespace bgfx } else { - if ((glsl_profile < 300) && usesUnsignedVecs) + if (glsl_profile < 300 + && usesUnsignedVecs) { glsl_profile = 300; }