mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 10:20:20 +01:00
loader: unregister special event in loader_dri3_drawable_fini
This was inadvertently removed in98a6cfd395and causes continuous memory leaks as events are being received after the context has been unbound. Fixes:3170b63314("loader: Add infrastructure for tracking active CRTC resources") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8238 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21128> (cherry picked from commit27a89a0903)
This commit is contained in:
parent
73aa5be27e
commit
7a979fc2dd
2 changed files with 10 additions and 1 deletions
|
|
@ -256,7 +256,7 @@
|
|||
"description": "loader: unregister special event in loader_dri3_drawable_fini",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "3170b63314f14f0031cb95bd5ee3a4726f26b43b"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -357,6 +357,15 @@ loader_dri3_drawable_fini(struct loader_dri3_drawable *draw)
|
|||
for (i = 0; i < ARRAY_SIZE(draw->buffers); i++)
|
||||
dri3_free_render_buffer(draw, i);
|
||||
|
||||
if (draw->special_event) {
|
||||
xcb_void_cookie_t cookie =
|
||||
xcb_present_select_input_checked(draw->conn, draw->eid, draw->drawable,
|
||||
XCB_PRESENT_EVENT_MASK_NO_EVENT);
|
||||
|
||||
xcb_discard_reply(draw->conn, cookie.sequence);
|
||||
xcb_unregister_for_special_event(draw->conn, draw->special_event);
|
||||
}
|
||||
|
||||
if (draw->region)
|
||||
xcb_xfixes_destroy_region(draw->conn, draw->region);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue