mesa/src/gallium/frontends
Karol Herbst 423202cae4 rusticl/queue: Only take a weak ref to the last Event
This resolves a memory leak when the application drops its last reference
to the queue, but never waits explicitly.

The problem was, that the queue was refed by QueueState::last and that ref
only gets dropped on a blocking wait. This is problematic as non user
Event objects also hold a ref on the Queue they are created on, therefore
causing a cyclic ref relation.

In order to resolve it, just use a weak reference. A failure of upgrading
the Weak ref is not an issue as in this case we'd only wait on an already
destroyed or processed event. The worker thread already makes sure
everything stays in sync.

Fixes: 5b3ff7e3f3 ("rusticl/queue: overhaul of the queue+event handling")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25926>
(cherry picked from commit 9a3af6e1d8)
2023-10-30 15:48:28 +00:00
..
clover fix: clover: warning: ignoring return value of ‘int posix_memalign(…)’ [-Wunused-result] 2023-10-14 17:12:37 +00:00
d3d10umd gallium: move vertex stride to CSO 2023-08-14 01:23:25 +00:00
dri dri: Drop a duplicate mesa vs pipe format table. 2023-10-20 10:03:43 +00:00
glx/xlib glx: XFree visual info 2023-09-28 12:17:49 +00:00
hgl util: include "util/compiler.h" instead of "pipe/p_compiler.h" 2023-06-27 18:18:30 +08:00
lavapipe ci: bump DEQP_FRACTION for some jobs 2023-10-18 12:52:37 +00:00
nine gallium: move vertex stride to CSO 2023-08-14 01:23:25 +00:00
omx util/vl: Fix vl_rbsp parser with bitstreams without emulation bytes 2023-10-25 01:03:58 +00:00
osmesa treewide: Replace the usage of ubyte/ushort with uint8_t/uint16_t 2023-06-27 18:18:29 +08:00
rusticl rusticl/queue: Only take a weak ref to the last Event 2023-10-30 15:48:28 +00:00
va frontends/va: Fix parsing packed headers without emulation bytes 2023-10-25 01:03:58 +00:00
vdpau frontends/vdpau: Alloc interlaced surface for interlaced pics 2023-08-01 21:58:27 +00:00
wgl wgl: Fix depth/stencil image support when using zink kopper 2023-07-08 16:51:29 +00:00
xa pipe-loader: allow to load multiple zink devices 2023-10-14 01:01:16 +00:00