mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
zink: don't init batch descriptors for copy contexts
these are never used and waste memory Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37306>
This commit is contained in:
parent
2fe2ab2bd0
commit
a6918f1bed
1 changed files with 3 additions and 1 deletions
|
|
@ -1585,6 +1585,8 @@ zink_batch_descriptor_reset(struct zink_screen *screen, struct zink_batch_state
|
|||
bool
|
||||
zink_batch_descriptor_init(struct zink_screen *screen, struct zink_batch_state *bs)
|
||||
{
|
||||
if (bs->ctx->flags & ZINK_CONTEXT_COPY_ONLY)
|
||||
return true;
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_LAZY) {
|
||||
for (unsigned i = 0; i < ZINK_DESCRIPTOR_BASE_TYPES; i++)
|
||||
util_dynarray_init(&bs->dd.pools[i], bs);
|
||||
|
|
@ -1595,7 +1597,7 @@ zink_batch_descriptor_init(struct zink_screen *screen, struct zink_batch_state *
|
|||
util_dynarray_init(&bs->dd.push_pool[i].overflowed_pools[1], bs);
|
||||
}
|
||||
}
|
||||
} else if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB && !(bs->ctx->flags & ZINK_CONTEXT_COPY_ONLY)) {
|
||||
} else if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
unsigned bind = ZINK_BIND_DESCRIPTOR;
|
||||
struct pipe_resource *pres = pipe_buffer_create(&screen->base, bind, 0, bs->ctx->dd.db.max_db_size * screen->base_descriptor_size);
|
||||
if (!pres)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue