nvk: Free pipeline shader BOs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand 2023-01-30 20:11:52 -06:00 committed by Marge Bot
parent c2f636861a
commit ae0d8edc1d

View file

@ -11,6 +11,11 @@ nvk_pipeline_destroy(struct nvk_device *device,
struct nvk_pipeline *pipeline,
const VkAllocationCallbacks *pAllocator)
{
for (uint32_t s = 0; s < ARRAY_SIZE(pipeline->shaders); s++) {
if (pipeline->shaders[s].bo)
nouveau_ws_bo_destroy(pipeline->shaders[s].bo);
}
vk_object_free(&device->vk, pAllocator, pipeline);
}