1/* 2 * Copyright © 2021 Collabora Ltd. 3 * 4 * Derived from tu_pipeline.c which is: 5 * Copyright © 2016 Red Hat. 6 * Copyright © 2016 Bas Nieuwenhuizen 7 * Copyright © 2015 Intel Corporation 8 * 9 * Permission is hereby granted, free of charge, to any person obtaining a 10 * copy of this software and associated documentation files (the "Software"), 11 * to deal in the Software without restriction, including without limitation 12 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 * and/or sell copies of the Software, and to permit persons to whom the 14 * Software is furnished to do so, subject to the following conditions: 15 * 16 * The above copyright notice and this permission notice (including the next 17 * paragraph) shall be included in all copies or substantial portions of the 18 * Software. 19 * 20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 * DEALINGS IN THE SOFTWARE. 27 */ 28 29#include "panvk_cs.h" 30#include "panvk_private.h" 31 32#include "pan_bo.h" 33 34#include "nir/nir.h" 35#include "nir/nir_builder.h" 36#include "spirv/nir_spirv.h" 37#include "util/debug.h" 38#include "util/mesa-sha1.h" 39#include "util/u_atomic.h" 40#include "vk_format.h" 41#include "vk_util.h" 42 43 44void 45panvk_DestroyPipeline(VkDevice _device, 46 VkPipeline _pipeline, 47 const VkAllocationCallbacks *pAllocator) 48{ 49 VK_FROM_HANDLE(panvk_device, device, _device); 50 VK_FROM_HANDLE(panvk_pipeline, pipeline, _pipeline); 51 52 panfrost_bo_unreference(pipeline->binary_bo); 53 panfrost_bo_unreference(pipeline->state_bo); 54 vk_object_free(&device->vk, pAllocator, pipeline); 55} 56