| Summary: | SDL_GL_SetSwapInterval(0) is broken on macOS in hg tip (likely regression) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | foo.null |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | amaranth72, icculus |
| Version: | don't know | Keywords: | target-2.0.10 |
| Hardware: | x86 | ||
| OS: | macOS 10.13 | ||
|
Description
foo.null
2019-04-02 01:29:45 UTC
I put in a fix for SetSwapInterval(0) not working at https://hg.libsdl.org/SDL/rev/0ff5bbe35bf5 As for display link use in general, I'm not sure about multi-monitor issues with CVDisplayLink but it's worth mentioning its use enables "adaptive vsync" (SetSwapInterval(-1)) which isn't possible with NSOpenGLContextParameterSwapInterval. I wouldn't consider its loss a big deal if switching back to the NSOpenGLContext APIs fixes bugs though. SDL could let the developer decide if they want to use adaptive vsync or not rather than only provide adaptive vsync with a display link. SDL_GL_SetSwapInterval does take three different input possibilities. Default should be whatever the native API does in case the user doesn't explicitly enable/disable VSYNC, I'd think. (In reply to foo.null from comment #2) > SDL could let the developer decide if they want to use adaptive vsync or not > rather than only provide adaptive vsync with a display link. > SDL_GL_SetSwapInterval does take three different input possibilities. That's already the case. SetSwapInterval(1) enables standard vsync, and SetSwapInterval(-1) enables adaptive vsync, with SDL's display link implementation of vsync on macOS. If you mean SDL should use NSOpenGL's APIs for setting normal vsync and only use a display link when SetSwapInterval(-1), I suppose that's a possibility. It does have the downside of relying on two separate codepaths (and two separate places where macOS can break things itself) though. We did the CVDisplayLink stuff because 10.14.0 broke vsync for OpenGL apps. This has actually been fixed in the latest 10.14.x builds, and I think we should rip the CVDisplayLink stuff out entirely. (imho.) --ryan. Tagging a bunch of bugs with "target-2.0.10" so we have a clear list of things to address before a 2.0.10 release. Please note that "addressing" one of these bugs might mean deciding to defer on it until after 2.0.10, or resolving it as WONTFIX, etc. This is just here to tell us we should look at it carefully, and soon. If you have new information or feedback on this issue, this is a good time to add it to the conversation, as we're likely to be paying attention to this specific report in the next few days/weeks. Thanks! --ryan. I'm going to back out the CVDisplayLink code in the morning. I just don't think the -1 interval support is worth the headaches this causes. Alex, feel free to stop me if you feel strongly about this, though! --ryan. Sounds good to me. CVDisplayLink code is backed out in https://hg.libsdl.org/SDL/rev/1b6f67e84802, confirmed vsync is working again anyhow on 10.14.5. Resolving bug! --ryan. |