mesa/st: move compute pbo shutdown to compute pbo file

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>
This commit is contained in:
Mike Blumenkrantz 2022-08-12 12:25:15 -04:00 committed by Marge Bot
parent 7f9dfcd2bf
commit 6b8339fa54
3 changed files with 12 additions and 5 deletions

View file

@ -739,9 +739,5 @@ st_destroy_pbo_helpers(struct st_context *st)
st->pbo.vs = NULL;
}
if (st->pbo.shaders) {
hash_table_foreach(st->pbo.shaders, entry)
st->pipe->delete_compute_state(st->pipe, entry->data);
_mesa_hash_table_destroy(st->pbo.shaders, NULL);
}
st_pbo_compute_deinit(st);
}

View file

@ -129,5 +129,7 @@ st_init_pbo_helpers(struct st_context *st);
extern void
st_destroy_pbo_helpers(struct st_context *st);
void
st_pbo_compute_deinit(struct st_context *st);
#endif /* ST_PBO_H */

View file

@ -1167,3 +1167,12 @@ st_GetTexSubImage_shader(struct gl_context * ctx,
return true;
}
void
st_pbo_compute_deinit(struct st_context *st)
{
if (!st->pbo.shaders)
return;
hash_table_foreach(st->pbo.shaders, entry)
st->pipe->delete_compute_state(st->pipe, entry->data);
_mesa_hash_table_destroy(st->pbo.shaders, NULL);
}