mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
zink: use descriptor set index indirection in cache state updates
no functional changes Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16645>
This commit is contained in:
parent
5ce79c679d
commit
851e4d38cb
1 changed files with 2 additions and 1 deletions
|
|
@ -1672,6 +1672,7 @@ update_descriptor_state(struct zink_context *ctx, enum zink_descriptor_type type
|
||||||
static void
|
static void
|
||||||
zink_context_update_descriptor_states(struct zink_context *ctx, struct zink_program *pg)
|
zink_context_update_descriptor_states(struct zink_context *ctx, struct zink_program *pg)
|
||||||
{
|
{
|
||||||
|
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||||
if (pg->dd->push_usage && (!ctx->dd->push_valid[pg->is_compute] ||
|
if (pg->dd->push_usage && (!ctx->dd->push_valid[pg->is_compute] ||
|
||||||
pg->dd->push_usage != ctx->dd->last_push_usage[pg->is_compute])) {
|
pg->dd->push_usage != ctx->dd->last_push_usage[pg->is_compute])) {
|
||||||
uint32_t hash = 0;
|
uint32_t hash = 0;
|
||||||
|
|
@ -1698,7 +1699,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;
|
ctx->dd->last_push_usage[pg->is_compute] = pg->dd->push_usage;
|
||||||
}
|
}
|
||||||
for (unsigned i = 0; i < ZINK_DESCRIPTOR_TYPES; i++) {
|
for (unsigned i = 0; i < ZINK_DESCRIPTOR_TYPES; i++) {
|
||||||
if (pdd_cached(pg)->pool[i] && pdd_cached(pg)->cache_misses[i] < MAX_CACHE_MISSES &&
|
if (pdd_cached(pg)->pool[screen->desc_set_id[i] - 1] && pdd_cached(pg)->cache_misses[i] < MAX_CACHE_MISSES &&
|
||||||
!ctx->dd->descriptor_states[pg->is_compute].valid[i])
|
!ctx->dd->descriptor_states[pg->is_compute].valid[i])
|
||||||
update_descriptor_state(ctx, i, pg->is_compute);
|
update_descriptor_state(ctx, i, pg->is_compute);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue