mesa/src/glx
Adam Jackson e89e1f5049 glx: Fix error handling yet again in CreateContextAttribs
Unlike the legacy CreateContext path, we would try to send the
GLXCreateContextAttribs request regardless of whether we'd successfully
created the client context state. And there's not a lot on the server
side to go wrong besides BadAlloc, so if the request succeeded but
the client side didn't we'd need to destroy the server context and
synthesize an X error. Since that itself involves more X protocol it's
tricky to get the request number right in the error, and tests and apps
can notice when you get it wrong.

Since we have now fixed client-side validation to generate the right
errors at the right times, this patch does something simpler, we match
CreateContext and fail early if the client-side setup fails. Now there's
no question of what request number to use, because we haven't sent any
protocol, the error is for the request as if it'd been sent.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4763
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12006>
2023-04-06 21:29:54 +00:00
..
apple glapi: #include "util/glheader.h" in glapi_priv.h and glapitable.h directly 2022-11-03 16:07:31 +00:00
tests meson: inline gtest_test_protocol now that it's always 'gtest' 2023-03-10 07:20:29 +00:00
windows
applegl_glx.c glx: Clean up some funny business from context bind/unbind 2023-01-13 19:59:26 +00:00
clientattrib.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
clientinfo.c glx: Only compute client GL extensions for indirect contexts 2023-01-03 23:36:26 +00:00
compsize.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
create_context.c glx: Fix error handling yet again in CreateContextAttribs 2023-04-06 21:29:54 +00:00
dri2.c replace 0 with NULL for NULL pointers 2022-01-10 22:53:32 +00:00
dri2.h
dri2_glx.c glx/dri: Fix error generation for invalid GLX_RENDER_TYPE 2023-04-06 21:29:54 +00:00
dri2_priv.h dri: Introduce internal Mesa DRI driver loader extension. 2022-12-05 19:26:41 +00:00
dri3_glx.c glx/dri: Fix error generation for invalid GLX_RENDER_TYPE 2023-04-06 21:29:54 +00:00
dri3_priv.h glx: remove is_different_gpu variable from struct dri_screen 2023-01-24 12:51:35 +00:00
dri_common.c glx/dri: Use X/GLX error codes for our create_context_attribs 2023-04-06 21:29:54 +00:00
dri_common.h glx/dri: Use X/GLX error codes for our create_context_attribs 2023-04-06 21:29:54 +00:00
dri_common_interop.c glx: Implement the new flush method 2022-11-02 18:11:41 +00:00
dri_common_query_renderer.c loader,glx: add render_gpu tag psc->driScreen and psc->fd 2023-01-24 12:51:35 +00:00
drisw_glx.c glx/dri: Fix error generation for invalid GLX_RENDER_TYPE 2023-04-06 21:29:54 +00:00
drisw_priv.h dri: Introduce internal Mesa DRI driver loader extension. 2022-12-05 19:26:41 +00:00
driwindows_glx.c glx: Clean up some funny business from context bind/unbind 2023-01-13 19:59:26 +00:00
eval.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
g_glxglvnddispatchfuncs.c
g_glxglvnddispatchindices.h
glx_error.c
glx_error.h
glx_pbuffer.c glx: Harmonize glXCreateGLXPixmap with glXCreatePixmap 2023-01-13 19:59:26 +00:00
glx_query.c
glxclient.h glx/dri: Use X/GLX error codes for our create_context_attribs 2023-04-06 21:29:54 +00:00
glxcmds.c glx: Fix glXGetFBConfigFromVisualSGIX 2023-03-06 11:16:48 +00:00
glxconfig.c glx: set max values for pbuffer width / height 2022-05-17 07:21:34 +00:00
glxconfig.h glx: Fix GLX_NV_float_buffer fbconfig handling 2021-12-16 22:05:20 +00:00
glxcurrent.c glx: Reflow MakeContextCurrent a little 2023-01-13 19:59:26 +00:00
glxext.c glx: fix memory leak related to __glXCloseDisplay() 2023-03-20 21:12:54 +00:00
glxextensions.c glx: Remove the GetProcAddress special case for indirect rendering 2023-01-03 23:36:26 +00:00
glxextensions.h glx: Remove the GetProcAddress special case for indirect rendering 2023-01-03 23:36:26 +00:00
glxglvnd.c
glxglvnd.h
glxglvnddispatchfuncs.h
glxhash.c Revert "glx: Use XSaveContext, delete glxhash.c" 2022-09-12 21:18:15 +00:00
glxhash.h Revert "glx: Use XSaveContext, delete glxhash.c" 2022-09-12 21:18:15 +00:00
indirect_glx.c glx/dri: Use X/GLX error codes for our create_context_attribs 2023-04-06 21:29:54 +00:00
indirect_init.h
indirect_texture_compression.c
indirect_transpose_matrix.c
indirect_vertex_array.c glapi: remove EXT and ARB suffixes from Draw functions 2022-10-19 04:23:05 +00:00
indirect_vertex_array.h
indirect_vertex_array_priv.h
indirect_vertex_program.c
indirect_window_pos.c
meson.build glx: include directly the useful vulkan header, instead of including everything 2023-02-23 18:31:22 +00:00
packrender.h glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
packsingle.h glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
pixel.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
pixelstore.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
query_renderer.c replace 0 with NULL for NULL pointers 2022-01-10 22:53:32 +00:00
render2.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
renderpix.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
single2.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
singlepix.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
vertarr.c glx: Replace FreeB 2.0 text with SPDX-License-Identifier: SGI-B-2.0 2023-01-03 23:36:26 +00:00
xfont.c glx: Remove glx_context::screen 2023-01-13 19:59:26 +00:00