We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3100 - SetSwapInterval should now be enabled for ANGLE/EGL (2.0.4rc2)
Summary: SetSwapInterval should now be enabled for ANGLE/EGL (2.0.4rc2)
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.3
Hardware: x86 Windows 8
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-24 15:57 UTC by Mark Logan
Modified: 2017-01-09 18:10 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Logan 2015-08-24 15:57:50 UTC
In SDL_windowsopengles.c, WIN_GLES_SetSwapInterval is as follows:

WIN_GLES_SetSwapInterval(_THIS, int interval)
{
    /* FIXME: This should call SDL_EGL_SetSwapInterval, but ANGLE has a bug that prevents this
     * from working if we do (the window contents freeze and don't swap properly). So, we ignore
     * the request for now.
     */
    SDL_Log("WARNING: Ignoring SDL_GL_SetSwapInterval call due to ANGLE bug");
    return 0;
}

With a recent version of ANGLE (early July) calling SDL_EGL_SetSwapInterval with a D3D11 backend appears to work just fine. I am working on testing this with D3D9.
Comment 1 Alex Szpakowski 2015-08-29 14:49:51 UTC
Is there a way to detect the ANGLE version used, so it can be conditionally enabled?

It should also be enabled when ANGLE isn't used (e.g. when using the OpenGL ES 2 / EGL wrapper .dll's from the PowerVR SDK.)
Comment 2 Carles Pagès 2017-01-09 10:05:59 UTC
Would be nice to get this fixed. Is it really needed to enable it conditionally at this point? The original commit is from more than 3 years ago, and I cannot find any information regarding when the bug was fixed in angle. So even if we checked the angle version (with glGetString(GL_VERSION) for instance), I do not know from which version it would be safe to enable it.
Comment 3 Alex Szpakowski 2017-01-09 17:15:22 UTC
I found the bug, it was fixed in 2013. https://bugs.chromium.org/p/angleproject/issues/detail?id=481

In my opinion it should be safe to unconditionally use SetSwapInterval now. Anyone who encounters the bug should update their ANGLE to a version less than 3 years old, especially since they'd be using a SDL version that's 3+ years newer than their ANGLE version.
Comment 4 Sam Lantinga 2017-01-09 18:10:52 UTC
Okay, thanks guys!
https://hg.libsdl.org/SDL/rev/f3439b0eb486