Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenGL] Add KHR_no_error support #2520

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

[OpenGL] Add KHR_no_error support #2520

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments


Copy link

@SDLBugzilla SDLBugzilla commented Feb 11, 2021

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: All, All

Comments on the original bug report:

On 2017-08-01 15:17:34 +0000, Ethan Lee wrote:

The KHR_no_error extension was formally included in OpenGL 4.6:

On the surface it's pretty easy, we just add to SDL_GLcontextFlag to support the new value. We may want to check for conflicts with the DEBUG flag though...?

On 2017-08-02 21:55:18 +0000, Ryan C. Gordon wrote:

Wait, how does this work? The new context flag has the same value as GLX_CONTEXT_RESET_ISOLATION_BIT_ARB; is there a non-glX interface for creating contexts we need to make this work? Is this EGL only or something?

I'm confused.


On 2017-08-02 22:05:11 +0000, Ethan Lee wrote:

It looks like part of the extension also includes another extension for WGL/GLX called ARB_create_context_no_error and an EGL extension called EGL_KHR_create_context_no_error:

So that's what we're actually adding, I think.

On 2017-08-02 22:50:31 +0000, Alex Szpakowski wrote:

FWIW the nvidia driver (the only one to implement this currently) currently just doesn't post the error it detects, rather than running a separate codepath that doesn't bother checking errors, so performance gains are (right now) negligible.

On 2017-08-25 01:31:32 +0000, Ryan C. Gordon wrote:

I've implemented this in, but it's totally untested as I have nothing here that can use this extension at the moment. Please test and report back!!


On 2017-08-25 02:31:56 +0000, Ethan Lee wrote:

I still need to try this out as well but it looks like the EGL implementation needs to use "EGL_KHR_create_context_no_error" for both the ifdef and SDL_EGL_HasExtension check, rather than GL_KHR_no_error. Will report back once I've actually tested it on a supported driver.

On 2017-08-25 02:44:52 +0000, Ethan Lee wrote:

Created attachment 2887
EGL KHR_no_error fix

Right, so the current revision doesn't work but the fix is really simple: Just move the attrib check to CreateContext rather than CreateVisual (or whatever the equivalent is). Attached is the EGL version of that fix, along with that extension check fix I mentioned earlier.

On 2017-08-25 03:01:23 +0000, Ethan Lee wrote:

Created attachment 2888
KHR_no_error fix

Sorry for posting a whole bunch at once but it turns out this was easier to work on that I was expecting. Here's a patch for EGL/WGL/GLX, works on my NVIDIA PC just fine!

On 2017-08-25 05:29:55 +0000, Ryan C. Gordon wrote:

(In reply to Ethan Lee from comment # 7)

Here's a patch for EGL/WGL/GLX, works on my NVIDIA PC just fine!

This patch is now, thanks!


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant