mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 699025 - Don't try to use more multisampling samples than is supported by the GL - r=jgilbert
This fixes "WebGL is broken unless I set webgl.msaa-level=0" issues.
This commit is contained in:
parent
94f1f84173
commit
3160e12587
@ -1037,8 +1037,11 @@ GLContext::ResizeOffscreenFBO(const gfxIntSize& aSize, const bool aUseReadFBO, c
|
||||
const int stencil = mCreationFormat.stencil;
|
||||
int samples = mCreationFormat.samples;
|
||||
|
||||
if (!SupportsFramebufferMultisample() || aDisableAA)
|
||||
samples = 0;
|
||||
GLint maxSamples = 0;
|
||||
if (SupportsFramebufferMultisample() && !aDisableAA)
|
||||
fGetIntegerv(LOCAL_GL_MAX_SAMPLES, &maxSamples);
|
||||
|
||||
samples = NS_MIN(samples, maxSamples);
|
||||
|
||||
const bool useDrawMSFBO = (samples > 0);
|
||||
|
||||
|
@ -3040,6 +3040,8 @@ typedef ptrdiff_t GLintptr;
|
||||
#define LOCAL_GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
|
||||
#define LOCAL_GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
|
||||
|
||||
#define LOCAL_GL_MAX_SAMPLES 0x8D57
|
||||
|
||||
#define LOCAL_GL_GUILTY_CONTEXT_RESET_ARB 0x8253
|
||||
#define LOCAL_GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
|
||||
#define LOCAL_GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
|
||||
|
Loading…
Reference in New Issue
Block a user