zink: assert compute descriptor key is valid before hashing it

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350>
This commit is contained in:
Mike Blumenkrantz 2021-10-12 15:16:14 -04:00 committed by Marge Bot
parent 497ce3c38a
commit 75e51138b1

View file

@ -723,8 +723,10 @@ populate_zds_key(struct zink_context *ctx, enum zink_descriptor_type type, bool
key->exists[0] = true;
if (type == ZINK_DESCRIPTOR_TYPES)
key->state[0] = ctx->dd->push_state[is_compute];
else
else {
assert(ctx->dd->descriptor_states[is_compute].valid[type]);
key->state[0] = ctx->dd->descriptor_states[is_compute].state[type];
}
} else if (type == ZINK_DESCRIPTOR_TYPES) {
/* gfx only */
for (unsigned i = 0; i < ZINK_SHADER_COUNT; i++) {