zink: force push descriptors cache update if hashing detects changes

this was previously only forced if the program pointer changed,
but programs can be freed and reused, and these are definite cases
where the last set cannot be reused, so jam it in

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15591>
(cherry picked from commit d415c28e64)
This commit is contained in:
Mike Blumenkrantz 2022-03-25 18:11:54 -04:00 committed by Dylan Baker
parent 26d695c5de
commit 1928268fb3
2 changed files with 3 additions and 1 deletions

View file

@ -1692,7 +1692,7 @@
"description": "zink: force push descriptors cache update if hashing detects changes",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"because_sha": null
},
{

View file

@ -1710,6 +1710,8 @@ zink_context_update_descriptor_states(struct zink_context *ctx, struct zink_prog
first = false;
}
}
ctx->dd->changed[pg->is_compute][ZINK_DESCRIPTOR_TYPES] |= ctx->dd->push_state[pg->is_compute] != hash;
ctx->dd->changed[pg->is_compute][ZINK_DESCRIPTOR_TYPES] |= pg->dd->push_usage != ctx->dd->last_push_usage[pg->is_compute];
ctx->dd->push_state[pg->is_compute] = hash;
ctx->dd->push_valid[pg->is_compute] = true;
ctx->dd->last_push_usage[pg->is_compute] = pg->dd->push_usage;