diff options
author | Semjon Kravtsenko <semjon.00@gmail.com> | 2023-06-21 10:50:44 +0300 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2023-07-18 22:38:07 +0100 |
commit | 747564ab091090a3eaf42186c7b284b940b70e13 (patch) | |
tree | f74167072e28d9d37e0b5ffabcbcef349dd96faf /src/glx | |
parent | 506a84dc94bee57fe1a4c11f35ee57695aee063f (diff) | |
download | mesa-747564ab091090a3eaf42186c7b284b940b70e13.tar.gz mesa-747564ab091090a3eaf42186c7b284b940b70e13.tar.bz2 mesa-747564ab091090a3eaf42186c7b284b940b70e13.zip |
glx: Assign unique serial number to GLXBadFBConfig error
Fixes: e89e1f5049d ("glx: Fix error handling yet again in CreateContextAttribs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9171
Tested-by: yan12125
Co-authored-by: XRevan86
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23762>
(cherry picked from commit 39824457283bf194c2e2773c19708848027121e1)
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/create_context.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glx/create_context.c b/src/glx/create_context.c index f89ceec30be..1c2bbb1cfd1 100644 --- a/src/glx/create_context.c +++ b/src/glx/create_context.c @@ -115,6 +115,11 @@ glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config, #endif if (gc == NULL) { + /* Increment dpy->request in order to give a unique serial number to the error. + * This may break creating contexts on some video cards, if libx11 <1.7.4 is used. + * However, this fixes creating contexts (on some video cards) if libx11 >=1.7.4 is used. + */ + XNoOp(dpy); /* -1 isn't a legal XID, which is sort of the point, we've failed * before we even got to XID allocation. */ |