1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Limit maxMSAALevel by 16.

This commit is contained in:
Sergey Lipskiy 2020-12-26 10:03:34 +07:00
parent ddec3866a7
commit 192317955e

View File

@ -1,3 +1,4 @@
#include <algorithm>
#include <assert.h>
#include <Log.h>
#include <Config.h>
@ -20,6 +21,10 @@
#include <Graphics/OpenGLContext/GraphicBuffer/GraphicBufferWrapper.h>
#endif
#ifdef min
#undef min
#endif
using namespace opengl;
ContextImpl::ContextImpl()
@ -528,7 +533,9 @@ s32 ContextImpl::getMaxMSAALevel()
{
GLint maxMSAALevel = 0;
glGetIntegerv(GL_MAX_SAMPLES, &maxMSAALevel);
return maxMSAALevel;
// Limit maxMSAALevel by 16.
// Graphics driver may return 32 for max samples, but pixel format with 32 samples is not supported.
return std::min(maxMSAALevel, 16);
}
bool ContextImpl::isError() const