Mesa (main): zink: use MAP_ONCE for qbo readback

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 28 00:52:11 UTC 2021


Module: Mesa
Branch: main
Commit: de2da3dadfce31671a3b863924f0bdc147dfe55d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=de2da3dadfce31671a3b863924f0bdc147dfe55d

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon May 17 14:40:19 2021 -0400

zink: use MAP_ONCE for qbo readback

this implies that the buffer can be unmapped

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12090>

---

 src/gallium/drivers/zink/zink_query.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index 08b3723a4f4..f1082236192 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -428,7 +428,7 @@ get_query_result(struct pipe_context *pctx,
 {
    struct zink_screen *screen = zink_screen(pctx->screen);
    struct zink_query *query = (struct zink_query *)q;
-   unsigned flags = PIPE_MAP_READ;
+   unsigned flags = PIPE_MAP_READ | PIPE_MAP_ONCE;
 
    if (!wait)
       flags |= PIPE_MAP_DONTBLOCK;



More information about the mesa-commit mailing list