mesa/src/gallium/drivers/virgl
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
..
ci glx: Fix drawable refcounting for naked Windows 2022-07-13 12:25:30 -04:00
tests virgl: Disable nir_op_ffloor to avoid sending DFLR to virglrenderer. 2022-04-08 17:17:16 +00:00
meson.build virgl: Add support for NIR shaders when VIRGL_DEBUG=nir. 2021-10-06 03:44:18 +00:00
virgl_buffer.c virgl/drm: New optimization for uploading textures 2021-12-08 14:01:48 +00:00
virgl_context.c virgl: Submit the TGSI_PROPERTY_SEPARABLE_PROGRAM when the host understands it 2022-07-07 09:46:53 +00:00
virgl_context.h virgl: Submit the TGSI_PROPERTY_SEPARABLE_PROGRAM when the host understands it 2022-07-07 09:46:53 +00:00
virgl_driinfo.h.in virgl: Add driconf tweak to force-enable reading back R8_SRGB textures 2021-11-02 10:22:52 +00:00
virgl_encode.c Change all debug_assert calls to assert 2022-07-10 00:50:35 +00:00
virgl_encode.h virgl: Link shader program 2021-11-23 16:14:16 +00:00
virgl_public.h
virgl_query.c gallivm/st/lvp: add flags arg to get_query_result_resource api. 2022-02-15 10:12:01 +10:00
virgl_resource.c virgl: replace opencoded slab_zalloc 2022-03-21 09:47:58 +01:00
virgl_resource.h virgl: Fix texture transfers by using a staging resource 2022-03-08 23:39:27 +01:00
virgl_screen.c virgl: Only progagate the uniform numbers if the numbers are actually right 2022-07-08 12:58:20 +00:00
virgl_screen.h virgl: Switch to nir-to-tgsi by default. 2022-04-21 18:27:35 +00:00
virgl_staging_mgr.c virgl/vtest: implement resource_create_front 2021-12-11 17:49:00 +00:00
virgl_staging_mgr.h
virgl_streamout.c gallium: remove structure u_resource 2021-05-21 17:38:04 +00:00
virgl_texture.c virgl: Fix texture transfers by using a staging resource 2022-03-08 23:39:27 +01:00
virgl_tgsi.c virgl: Submit the TGSI_PROPERTY_SEPARABLE_PROGRAM when the host understands it 2022-07-07 09:46:53 +00:00
virgl_transfer_queue.c
virgl_transfer_queue.h
virgl_winsys.h virgl: Add support for passing the supported number of components from virgl 2022-07-06 13:12:38 +00:00