zink: add PERSISTENT for db buffer maps
Fixes: 13c6ad0038 ("zink: use a single descriptor buffer for all non-bindless types")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22907>
This commit is contained in:
committed by
Marge Bot
parent
8e75378a2d
commit
98c411a2a1
@@ -1560,7 +1560,7 @@ zink_batch_descriptor_init(struct zink_screen *screen, struct zink_batch_state *
|
|||||||
if (!pres)
|
if (!pres)
|
||||||
return false;
|
return false;
|
||||||
bs->dd.db = zink_resource(pres);
|
bs->dd.db = zink_resource(pres);
|
||||||
bs->dd.db_map = pipe_buffer_map(&bs->ctx->base, pres, PIPE_MAP_READ | PIPE_MAP_WRITE, &bs->dd.db_xfer);
|
bs->dd.db_map = pipe_buffer_map(&bs->ctx->base, pres, PIPE_MAP_READ | PIPE_MAP_WRITE | PIPE_MAP_PERSISTENT, &bs->dd.db_xfer);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1702,7 +1702,7 @@ zink_descriptors_init_bindless(struct zink_context *ctx)
|
|||||||
VKSCR(GetDescriptorSetLayoutSizeEXT)(screen->dev, screen->bindless_layout, &size);
|
VKSCR(GetDescriptorSetLayoutSizeEXT)(screen->dev, screen->bindless_layout, &size);
|
||||||
struct pipe_resource *pres = pipe_buffer_create(&screen->base, bind, 0, size);
|
struct pipe_resource *pres = pipe_buffer_create(&screen->base, bind, 0, size);
|
||||||
ctx->dd.db.bindless_db = zink_resource(pres);
|
ctx->dd.db.bindless_db = zink_resource(pres);
|
||||||
ctx->dd.db.bindless_db_map = pipe_buffer_map(&ctx->base, pres, PIPE_MAP_READ | PIPE_MAP_WRITE, &ctx->dd.db.bindless_db_xfer);
|
ctx->dd.db.bindless_db_map = pipe_buffer_map(&ctx->base, pres, PIPE_MAP_READ | PIPE_MAP_WRITE | PIPE_MAP_PERSISTENT, &ctx->dd.db.bindless_db_xfer);
|
||||||
zink_batch_bind_db(ctx);
|
zink_batch_bind_db(ctx);
|
||||||
for (unsigned i = 0; i < 4; i++) {
|
for (unsigned i = 0; i < 4; i++) {
|
||||||
VkDeviceSize offset;
|
VkDeviceSize offset;
|
||||||
|
|||||||
Reference in New Issue
Block a user