mesa/src
Adam Jackson 768238fdc0 glx: Fix drawable refcounting for naked Windows
driFetchDrawable is only ever called from the MakeCurrent path, which
means it has to handle the case of pre-GLX-1.3 Windows being named as
the drawable. When it finds the drawable in the hash, it increments its
refcount before returning it, so for a GLXWindow it would be 2 on first
return, one from glXCreateWindow and one from glXMakeCurrent. But when
it does not find the drawable and creates one for the naked Window, the
reference count on first return would only be 1. As a result, if this
context was then ever bound to a different drawable, the old Window's
DRI drawable state (like the back buffer) would be destroyed.

Fixes piglit's glx-multi-window-single-context and glx-make-current for
a variety of drivers.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6713
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17479>
2022-07-13 12:25:30 -04:00
..
amd radv: add a dynamic vertex format cache. 2022-07-13 01:10:09 +00:00
android_stub
asahi panfrost,asahi: Use util_sign_extend for unpacking 2022-07-06 11:23:18 +00:00
broadcom glx: Fix drawable refcounting for naked Windows 2022-07-13 12:25:30 -04:00
c11 c11: reinstate the original license and authorship 2022-06-27 11:46:22 +00:00
compiler nir/opt_algebraic: Optimize [ui](add|sub)_sat with 0. 2022-07-13 07:34:09 +00:00
drm-shim drm-shim: Cleanup on device file close 2022-05-02 19:50:33 +00:00
egl egl: Just include driconf.h instead of redefining its values. 2022-07-12 21:57:23 +00:00
etnaviv etnaviv: drm: rename etna_drm_table_lock 2022-07-03 17:41:55 +00:00
freedreno glx: Fix drawable refcounting for naked Windows 2022-07-13 12:25:30 -04:00
gallium glx: Fix drawable refcounting for naked Windows 2022-07-13 12:25:30 -04:00
gbm gallium: Learn about kopper 2022-04-07 00:17:40 +00:00
getopt
glx glx: Fix drawable refcounting for naked Windows 2022-07-13 12:25:30 -04:00
gtest gtest: Fix maybe-uninitialized compiler warning 2022-06-29 21:02:18 +00:00
hgl
imagination pvr: Implicitly assert that the correct sub-command type is present 2022-07-13 12:30:10 +01:00
imgui
intel glx: Fix drawable refcounting for naked Windows 2022-07-13 12:25:30 -04:00
loader loader: Just include driconf.h instead of redefining its values. 2022-07-12 21:57:23 +00:00
mapi mesa: Stub out GL_APPLE_object_purgeable 2022-07-11 16:37:34 -04:00
mesa mesa: Fix the error check for VertexAttrib*. 2022-07-12 17:15:43 +00:00
microsoft microsoft/spirv_to_dxil: Fix discard to demote + return pass 2022-07-12 20:22:52 +00:00
nouveau nouveau: Drop C++03 compat code 2022-07-05 13:23:12 +00:00
panfrost glx: Fix drawable refcounting for naked Windows 2022-07-13 12:25:30 -04:00
tool meson/pps: Check if libdrm exists to compile pps 2022-06-22 11:52:36 +03:00
util util: Don't block SIGSEGV for new threads 2022-07-13 06:51:27 +00:00
virtio venus: GetPhysicalDeviceSparseImageFormatProperties to match sparse support 2022-07-12 21:20:19 +00:00
vulkan venus: use updated tokens from vk.xml 2022-07-12 15:53:11 +00:00
meson.build meson: Use cc.get_argument_syntax instead cc.get_id when possible. 2022-06-16 19:59:58 +00:00