zink: remove PIPE_MAP_ONCE from subdata
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 30 Jul 2021 13:22:09 +0000 (09:22 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 17 Aug 2021 19:40:27 +0000 (19:40 +0000)
subdata calls that happen once for a buffer are likely to happen again,
so just leave them mapped

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

src/gallium/drivers/zink/zink_resource.c

index 8436f07..3bef1b2 100644 (file)
@@ -1441,7 +1441,7 @@ zink_buffer_subdata(struct pipe_context *ctx, struct pipe_resource *buffer,
    struct pipe_box box;
    uint8_t *map = NULL;
 
-   usage |= PIPE_MAP_WRITE | PIPE_MAP_ONCE;
+   usage |= PIPE_MAP_WRITE;
 
    if (!(usage & PIPE_MAP_DIRECTLY))
       usage |= PIPE_MAP_DISCARD_RANGE;