Mesa (staging/22.1): kopper: pass the current context to dri_flush

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 9 18:19:53 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 8b806828ad1f75a623eb38002e85d612bfea4c3e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b806828ad1f75a623eb38002e85d612bfea4c3e

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
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 <ajax at redhat.com>
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;



More information about the mesa-commit mailing list