mesa/src/glx
Adam Jackson 5feb926e05 drisw: Cache the depth of the X drawable
This is not always ->rgbBits, because there are cases where that could
be 32 but we're (legally) bound to a depth-24 pixmap. The important
thing to have match here is the actual server-side notion of depth.  You
can look this up (at modest expense) from the xlib visual info if the
fbconfig has a visual. But it might not, so if not, fetch it (at
slightly greater expense) from XGetGeometry. Do this at GLX drawable
creation so you don't have to do it on the SwapBuffers path.

Apparently this fixes glx/glx-swap-singlebuffer, which is unintentional
but quite pleasant.

Fixes: mesa/mesa#2291
Fixes: 90d58286 ("drisw: Fix and simplify drawable setup")
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3305>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3305>
(cherry picked from commit 2fc11e8a05)

Conflicts:
	.gitlab-ci/piglit/quick_gl.txt

This testing doesn't exist in the 19.3 branch, so I've deleted the file.

Dylan
2020-01-28 08:54:25 -08:00
..
apple glx: Fix up glXQueryGLXPbufferSGIX on macOS. 2019-08-23 11:05:23 -04:00
tests Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
windows glx/windows: Fix compilation with -Werror-format 2019-06-07 11:28:48 -07:00
applegl_glx.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
clientattrib.c
clientinfo.c
compsize.c
create_context.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
dri2.c
dri2.h
dri2_glx.c dri: Avoid swapbuffer throttling in glXCopySubBufferMESA 2019-10-05 13:19:37 +00:00
dri2_priv.h glx: Add missing include guards 2018-10-30 06:19:10 -06:00
dri3_glx.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
dri3_priv.h dri3: Return the current swap interval from glXGetSwapIntervalMESA(). 2019-04-01 16:06:38 -07:00
dri_common.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
dri_common.h glx: add support for GLX_ARB_create_context_no_error (v3) 2019-03-12 19:12:21 -04:00
dri_common_interop.c glx/meson: use full include path for dri_interface.h 2019-03-08 18:00:19 +00:00
dri_common_query_renderer.c glx/meson: use full include path for dri_interface.h 2019-03-08 18:00:19 +00:00
dri_glx.c glx: Move DRI extensions pointer loading to driOpenDriver(). 2018-11-16 15:38:18 -08:00
dri_sarea.h
drisw_glx.c drisw: Cache the depth of the X drawable 2020-01-28 08:54:25 -08:00
drisw_priv.h drisw: Cache the depth of the X drawable 2020-01-28 08:54:25 -08:00
driwindows_glx.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
eval.c
g_glxglvnddispatchfuncs.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
g_glxglvnddispatchindices.h
glx_error.c Revert "glx: Fix synthetic error generation in __glXSendError" 2019-05-08 13:16:44 +10:00
glx_error.h glx: Add missing include guards 2018-10-30 06:19:10 -06:00
glx_pbuffer.c glx: Make __glXGetDrawableAttribute return true sometimes 2019-08-22 13:29:06 -04:00
glx_query.c glx: Fix SEGV due to dereferencing a NULL ptr from XCB-GLX. 2019-09-04 16:00:10 +00:00
glxclient.h glx: Remove unused indirection for glx_context->fillImage 2019-09-12 13:23:32 -04:00
glxcmds.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
glxconfig.c glx: Eliminate glx_config::{rgb,float,colorIndex}Mode 2019-08-20 14:05:07 -04:00
glxconfig.h glx: Add fields for color shifts 2019-08-21 18:36:57 +00:00
glxcurrent.c Revert "glx: Lift sending the MakeCurrent request to top-level code" 2019-09-26 11:07:42 -04:00
glxext.c glx: Avoid atof() when computing the server's GLX version 2019-09-19 20:50:01 -04:00
glxextensions.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
glxextensions.h Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
glxglvnd.c glx: fix glvnd pointer types 2019-06-20 17:21:37 +01:00
glxglvnd.h
glxglvnddispatchfuncs.h
glxhash.c meson: Test for random_r() 2019-07-30 11:49:09 -07:00
glxhash.h
indirect_glx.c Revert "glx: Lift sending the MakeCurrent request to top-level code" 2019-09-26 11:07:42 -04: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 meson: replace last uses of libxmlconfig with idep_xmlconfig 2019-08-03 00:08:37 +00:00
packrender.h
packsingle.h
pixel.c
pixelstore.c
query_renderer.c
render2.c
renderpix.c glx: Remove unused indirection for glx_context->fillImage 2019-09-12 13:23:32 -04:00
SConscript glx: make xf86vidmode mandatory for direct rendering 2018-11-20 11:13:20 +00:00
single2.c
singlepix.c
vertarr.c
XF86dri.c
xf86dri.h
xf86dristr.h
xfont.c glx: Fix drawable lookup bugs in glXUseXFont 2019-09-19 21:06:01 -04:00