zink: skip hash updates for descriptor types which aren't used

this is pointless and hurts drawoverhead perf

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11188>
This commit is contained in:
Mike Blumenkrantz
2021-03-29 15:51:08 -04:00
parent d8c11ebe29
commit 7348a083ed
+1 -1
View File
@@ -1577,7 +1577,7 @@ zink_context_update_descriptor_states(struct zink_context *ctx, struct zink_prog
ctx->dd->last_push_usage[pg->is_compute] = pg->dd->push_usage;
}
for (unsigned i = 0; i < ZINK_DESCRIPTOR_TYPES; i++) {
if (!ctx->dd->descriptor_states[pg->is_compute].valid[i])
if (pdd_cached(pg)->pool[i] && !ctx->dd->descriptor_states[pg->is_compute].valid[i])
update_descriptor_state(ctx, i, pg->is_compute);
}
}