panvk: Avoid allocating sysvals UBOs when the pipeline has one

The static sysval UBO attached to the pipeline will be used anyway,
so let's not waste memory for sysvals if we can avoid it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>
This commit is contained in:
Boris Brezillon 2021-09-23 09:58:41 +02:00 committed by Marge Bot
parent ac89873125
commit 9c60de9b57
1 changed files with 1 additions and 1 deletions

View File

@ -326,7 +326,7 @@ panvk_cmd_prepare_sysvals(struct panvk_cmd_buffer *cmdbuf,
for (unsigned i = 0; i < ARRAY_SIZE(desc_state->sysvals); i++) {
unsigned sysval_count = pipeline->sysvals[i].ids.sysval_count;
if (!sysval_count ||
if (!sysval_count || pipeline->sysvals[i].ubo ||
(desc_state->sysvals[i] &&
!(cmdbuf->state.dirty & pipeline->sysvals[i].dirty_mask)))
continue;