mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 05:50:14 +01:00
nvk: Unref shaders on pipeline free
Fixes:d6a1e29ccd("nvk: pipeline shader cache") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130> (cherry picked from commitbe0f04f5bd)
This commit is contained in:
parent
ed75400a50
commit
2ff9219359
2 changed files with 6 additions and 1 deletions
|
|
@ -94,7 +94,7 @@
|
|||
"description": "nvk: Unref shaders on pipeline free",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "d6a1e29ccdc12461495e01b7dc0b510a9bb84c3d",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ nvk_pipeline_free(struct nvk_device *dev,
|
|||
struct nvk_pipeline *pipeline,
|
||||
const VkAllocationCallbacks *pAllocator)
|
||||
{
|
||||
for (uint32_t s = 0; s < ARRAY_SIZE(pipeline->shaders); s++) {
|
||||
if (pipeline->shaders[s] != NULL)
|
||||
vk_pipeline_cache_object_unref(&dev->vk, &pipeline->shaders[s]->base);
|
||||
}
|
||||
|
||||
vk_object_free(&dev->vk, pAllocator, pipeline);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue