mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 17:40:11 +01:00
zink: reorder commands more aggressively
by starting resources in the unordered state in a given batch, they gain more opportunities to be promoted to the barrier cmdbuf and avoid breaking renderpasses Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20890>
This commit is contained in:
parent
1a29f3dfdb
commit
87a9018ff9
2 changed files with 4 additions and 2 deletions
|
|
@ -29,8 +29,8 @@ reset_obj(struct zink_screen *screen, struct zink_batch_state *bs, struct zink_r
|
||||||
/* if no batch usage exists after removing the usage from 'bs', this resource is considered fully idle */
|
/* if no batch usage exists after removing the usage from 'bs', this resource is considered fully idle */
|
||||||
if (!zink_resource_object_usage_unset(obj, bs)) {
|
if (!zink_resource_object_usage_unset(obj, bs)) {
|
||||||
/* the resource is idle, so reset all access/reordering info */
|
/* the resource is idle, so reset all access/reordering info */
|
||||||
obj->unordered_read = false;
|
obj->unordered_read = true;
|
||||||
obj->unordered_write = false;
|
obj->unordered_write = true;
|
||||||
obj->access = 0;
|
obj->access = 0;
|
||||||
obj->access_stage = 0;
|
obj->access_stage = 0;
|
||||||
/* also prune dead view objects */
|
/* also prune dead view objects */
|
||||||
|
|
|
||||||
|
|
@ -597,6 +597,8 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
||||||
return NULL;
|
return NULL;
|
||||||
simple_mtx_init(&obj->view_lock, mtx_plain);
|
simple_mtx_init(&obj->view_lock, mtx_plain);
|
||||||
util_dynarray_init(&obj->views, NULL);
|
util_dynarray_init(&obj->views, NULL);
|
||||||
|
obj->unordered_read = true;
|
||||||
|
obj->unordered_write = true;
|
||||||
obj->last_dt_idx = obj->dt_idx = UINT32_MAX; //TODO: unionize
|
obj->last_dt_idx = obj->dt_idx = UINT32_MAX; //TODO: unionize
|
||||||
|
|
||||||
VkMemoryRequirements reqs = {0};
|
VkMemoryRequirements reqs = {0};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue