Skip to content

Commit

Permalink
disable shader cache by default on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Mar 20, 2020
1 parent ca43432 commit d006584
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cpp/desktop/DesktopMain.cpp
Expand Up @@ -361,7 +361,6 @@ QString inferDefaultRenderingEngine()
{
if (deviceString.find(item) != std::string::npos)
{
QCoreApplication::setAttribute(Qt::AA_DisableShaderDiskCache, true);
return QStringLiteral("software");
}
}
Expand Down Expand Up @@ -390,6 +389,13 @@ void initializeRenderingEngine(std::vector<char*>* pArguments)
engine = inferDefaultRenderingEngine();
}

#ifdef _WIN32
// disable the shader disk cache by default, as corrupt shaders can
// cause the IDE to hang and there is no simple way to detect or
// recover from that state
QCoreApplication::setAttribute(Qt::AA_DisableShaderDiskCache, true);
#endif

if (engine == QStringLiteral("desktop"))
{
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
Expand Down

0 comments on commit d006584

Please sign in to comment.