mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 12:50:25 +01:00
frontends/dri: always init opencl_func_mutex in InitScreen hooks
this otherwise leads to a mismatch where some types of screen may have
the mutex initialized while others don't, in which case dri_release_screen()
will attempt to destroy an uninitialized mutex
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29021>
(cherry picked from commit bc15c95c7a)
This commit is contained in:
parent
b397496ee8
commit
1b9927bc48
3 changed files with 5 additions and 1 deletions
|
|
@ -414,7 +414,7 @@
|
|||
"description": "frontends/dri: always init opencl_func_mutex in InitScreen hooks",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -582,6 +582,8 @@ drisw_init_screen(struct dri_screen *screen, bool implicit)
|
|||
struct pipe_screen *pscreen = NULL;
|
||||
const struct drisw_loader_funcs *lf = &drisw_lf;
|
||||
|
||||
(void) mtx_init(&screen->opencl_func_mutex, mtx_plain);
|
||||
|
||||
screen->swrast_no_present = debug_get_option_swrast_no_present();
|
||||
|
||||
if (loader->base.version >= 4) {
|
||||
|
|
|
|||
|
|
@ -116,6 +116,8 @@ kopper_init_screen(struct dri_screen *screen, bool implicit)
|
|||
const __DRIconfig **configs;
|
||||
struct pipe_screen *pscreen = NULL;
|
||||
|
||||
(void) mtx_init(&screen->opencl_func_mutex, mtx_plain);
|
||||
|
||||
if (!screen->kopper_loader) {
|
||||
fprintf(stderr, "mesa: Kopper interface not found!\n"
|
||||
" Ensure the versions of %s built with this version of Zink are\n"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue