Mesa (main): zink: set subdata hook as PIPE_MAP_ONCE

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 16 15:02:21 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri May  7 19:08:30 2021 -0400

zink: set subdata hook as PIPE_MAP_ONCE

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11401>

---

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

diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index efb7c033d5c..576ea0080e6 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -1204,7 +1204,7 @@ zink_buffer_subdata(struct pipe_context *ctx, struct pipe_resource *buffer,
    struct pipe_box box;
    uint8_t *map = NULL;
 
-   usage |= PIPE_MAP_WRITE;
+   usage |= PIPE_MAP_WRITE | PIPE_MAP_ONCE;
 
    if (!(usage & PIPE_MAP_DIRECTLY))
       usage |= PIPE_MAP_DISCARD_RANGE;



More information about the mesa-commit mailing list