1
0
forked from mirrors/0ad

Fixes MSAA on macOS GL drivers for textures with incorrect sample count, fixes #6480

Refs #5969

Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4581
This was SVN commit r26737.
This commit is contained in:
vladislavbelov
2022-03-31 07:04:51 +00:00
parent a3248ac04b
commit 02b87cdb46
+2 -2
View File
@@ -555,7 +555,7 @@ void CPostprocManager::UpdateAntiAliasingTechnique()
// We don't want to enable MSAA in Atlas, because it uses wxWidgets and its canvas.
if (g_AtlasGameLoop && g_AtlasGameLoop->running)
return;
if (!g_VideoMode.GetBackendDevice()->GetCapabilities().multisampling && !m_AllowedSampleCounts.empty())
if (!g_VideoMode.GetBackendDevice()->GetCapabilities().multisampling || m_AllowedSampleCounts.empty())
{
LOGWARNING("MSAA is unsupported.");
return;
@@ -565,7 +565,7 @@ void CPostprocManager::UpdateAntiAliasingTechnique()
if (std::find(std::begin(m_AllowedSampleCounts), std::end(m_AllowedSampleCounts), m_MultisampleCount) ==
std::end(m_AllowedSampleCounts))
{
m_MultisampleCount = 4;
m_MultisampleCount = std::min(4u, g_VideoMode.GetBackendDevice()->GetCapabilities().maxSampleCount);
LOGWARNING("Wrong MSAA sample count: %s.", m_AAName.EscapeToPrintableASCII().c_str());
}
m_UsingMultisampleBuffer = true;