Skip to content

dri: Epoch how no-error context creation works

The bug here is that the DRI context "flags" are intended to alias the GLX context flag values, and they don't, DRI's no-error flag is GLX's reset-isolation flag. GLX (and EGL!) treat no-error as a context attribute, and reset isolation predates Mesa's no-error implementation by several years. The GL_KHR_no_error spec does describe it as a "context flag", though, so maybe that's why we do it as a (DRI) context flag.

In order to unalias these we need a new contract with the driver. The loaders will now only expose the winsys no-error extension if the driver exposes __DRI2_NO_ERROR2, and the drivers now only expose that and not the old one. This new extension is a promise to expect no-error-ness as a context attribute, matching the GLX and EGL calling convention. We go ahead and define __DRI_CTX_FLAG_RESET_ISOLATION as well, and update the drivers to refuse it since we don't support it yet.

This means mismatched drivers/loaders will not be able to create no-error contexts. Too bad. If you want performance that badly you can build both things at once.

Merge request reports