diff --git a/src/gallium/frontends/dri/drisw.c b/src/gallium/frontends/dri/drisw.c index 86469bf4af0..f7573c60f4a 100644 --- a/src/gallium/frontends/dri/drisw.c +++ b/src/gallium/frontends/dri/drisw.c @@ -582,6 +582,8 @@ drisw_init_screen(struct dri_screen *screen, bool driver_name_is_inferred) 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) { diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index 94615782247..7c3cba81e9c 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -116,6 +116,8 @@ kopper_init_screen(struct dri_screen *screen, bool driver_name_is_inferred) 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"