mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
Fix shader tests on Linux
Signed-off-by: renderexpert <expert@renderconsulting.co.uk>
This commit is contained in:
committed by
Konstantin Pastbin
parent
6d0daf6fe7
commit
14b3e8fc8f
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user