diff --git a/libs/shaders/gl_program_pool.cpp b/libs/shaders/gl_program_pool.cpp index d44187091..d373bc559 100644 --- a/libs/shaders/gl_program_pool.cpp +++ b/libs/shaders/gl_program_pool.cpp @@ -14,7 +14,7 @@ GLProgramPool::GLProgramPool(dp::ApiVersion apiVersion) if (m_apiVersion == dp::ApiVersion::OpenGLES3) { -#if defined(OMIM_OS_DESKTOP) && !defined(OMIM_OS_LINUX) +#if defined(OMIM_OS_DESKTOP) m_baseDefines = std::string(GL3_SHADER_VERSION); #else m_baseDefines = std::string(GLES3_SHADER_VERSION); diff --git a/libs/shaders/shaders_tests/gl_shaders_mobile_compile_test.cpp b/libs/shaders/shaders_tests/gl_shaders_mobile_compile_test.cpp index 0285e0beb..a23fb6803 100644 --- a/libs/shaders/shaders_tests/gl_shaders_mobile_compile_test.cpp +++ b/libs/shaders/shaders_tests/gl_shaders_mobile_compile_test.cpp @@ -112,9 +112,23 @@ void TestShaders(dp::ApiVersion apiVersion, std::string const & defines, QString TEST(srcFile.open(), ("Temporary file can't be created!")); std::string fullSrc; if (apiVersion == dp::ApiVersion::OpenGLES3) - fullSrc = std::string(gpu::GLES3_SHADER_VERSION) + defines + src.second; + { + // Use desktop shader version for Linux +#ifdef OMIM_OS_LINUX + if (glslCompiler.contains(kCompilerOpenGLES.c_str())) + { + fullSrc = std::string(gpu::GL3_SHADER_VERSION) + defines + src.second; + } + else +#endif + { + fullSrc = std::string(gpu::GLES3_SHADER_VERSION) + defines + src.second; + } + } else + { fullSrc = defines + src.second; + } WriteShaderToFile(srcFile, fullSrc); RunShaderTest(apiVersion, src.first, glslCompiler, srcFile.fileName(), procPrepare, argsPrepare, successChecker, errorLog);