From d5a1314114dbe7d3063f37333b9ac7e8e1530909 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 14 Sep 2023 11:42:35 -0400 Subject: [PATCH] zink: flag db maps as unsynchronized these otherwise can be created using the wrong slab Fixes: 98c411a2a19 ("zink: add PERSISTENT for db buffer maps") Reviewed-by: Dave Airlie Part-of: (cherry picked from commit b73ebc6bfc3ab6efa2d2ae497d155e8326fad542) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_descriptors.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index bf0082a8bd8..06d90e563b6 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1057,7 +1057,7 @@ "description": "zink: flag db maps as unsynchronized", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "98c411a2a19156f4e9171469122acda4ae536e41" }, diff --git a/src/gallium/drivers/zink/zink_descriptors.c b/src/gallium/drivers/zink/zink_descriptors.c index d656b2ea7dd..bfa7793ba9a 100644 --- a/src/gallium/drivers/zink/zink_descriptors.c +++ b/src/gallium/drivers/zink/zink_descriptors.c @@ -1571,7 +1571,7 @@ zink_batch_descriptor_init(struct zink_screen *screen, struct zink_batch_state * if (!pres) return false; bs->dd.db = zink_resource(pres); - bs->dd.db_map = pipe_buffer_map(&bs->ctx->base, pres, PIPE_MAP_READ | PIPE_MAP_WRITE | PIPE_MAP_PERSISTENT, &bs->dd.db_xfer); + bs->dd.db_map = pipe_buffer_map(&bs->ctx->base, pres, PIPE_MAP_READ | PIPE_MAP_WRITE | PIPE_MAP_PERSISTENT | PIPE_MAP_THREAD_SAFE, &bs->dd.db_xfer); } return true; }