Module: Mesa Branch: main Commit: 49b8f72e3d84891ebf09a09578c4623a42c9e56f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=49b8f72e3d84891ebf09a09578c4623a42c9e56f
Author: Mike Blumenkrantz <[email protected]> Date: Thu May 5 13:19:51 2022 -0400 kopper: pass the current context to dri_flush passing the drawable's context leads to desync and crashing if the app is using multiple threads and multiple contexts Reviewed-by: Adam Jackson <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16351> --- src/gallium/frontends/dri/kopper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index b7e84ff3156..ef6e2585fa6 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -913,7 +913,7 @@ kopperSwapBuffers(__DRIdrawable *dPriv) return 0; drawable->texture_stamp = dPriv->lastStamp - 1; - dri_flush(dPriv->driContextPriv, dPriv, __DRI2_FLUSH_DRAWABLE | __DRI2_FLUSH_CONTEXT, __DRI2_THROTTLE_SWAPBUFFER); + dri_flush(ctx->cPriv, dPriv, __DRI2_FLUSH_DRAWABLE | __DRI2_FLUSH_CONTEXT, __DRI2_THROTTLE_SWAPBUFFER); kopper_copy_to_front(ctx->st->pipe, dPriv, ptex); if (kdraw->is_window && !zink_kopper_check(ptex)) return -1;
