zink: flag all cached descriptors as needing update on program change

programs have different usages of descriptors, so forcing a recalc on program
change ensures that the right hash values are always set, especially for compact
sets where there's more descriptors going into each hash value

this can (ideally) be optimized later to check for matching interfaces between old
program and new program to avoid recalc if both programs have identical descriptor
usage for a given set

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16755>
This commit is contained in:
Mike Blumenkrantz 2022-05-27 15:37:20 -04:00 committed by Marge Bot
parent 9d34cab4a8
commit 517894e819
1 changed files with 5 additions and 0 deletions

View File

@ -1474,6 +1474,11 @@ zink_descriptors_update(struct zink_context *ctx, bool is_compute)
for (int h = 0; h < ZINK_DESCRIPTOR_TYPES; h++) {
if (pg->dd->real_binding_usage & BITFIELD_BIT(h))
ctx->dd->changed[is_compute][h] = true;
ctx->dd->descriptor_states[is_compute].valid[h] = false;
if (!is_compute) {
for (unsigned i = 0; i < ZINK_SHADER_COUNT; i++)
ctx->dd->gfx_descriptor_states[i].valid[h] = false;
}
}
}
zink_context_update_descriptor_states(ctx, pg);