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
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
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
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
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
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
glxconfig.h
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
glxhash.h
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
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
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