nvk: Use implicit pipeline cache

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28851>
This commit is contained in:
Echo J
2024-04-22 10:55:00 +03:00
committed by Faith Ekstrand
parent 59bba821ef
commit be940a7dc6
2 changed files with 4 additions and 6 deletions
+4 -4
View File
@@ -249,8 +249,8 @@ nvk_CreateDevice(VkPhysicalDevice physicalDevice,
struct vk_pipeline_cache_create_info cache_info = {
.weak_ref = true,
};
dev->mem_cache = vk_pipeline_cache_create(&dev->vk, &cache_info, NULL);
if (dev->mem_cache == NULL) {
dev->vk.mem_cache = vk_pipeline_cache_create(&dev->vk, &cache_info, NULL);
if (dev->vk.mem_cache == NULL) {
result = VK_ERROR_OUT_OF_HOST_MEMORY;
goto fail_queue;
}
@@ -264,7 +264,7 @@ nvk_CreateDevice(VkPhysicalDevice physicalDevice,
return VK_SUCCESS;
fail_mem_cache:
vk_pipeline_cache_destroy(dev->mem_cache, NULL);
vk_pipeline_cache_destroy(dev->vk.mem_cache, NULL);
fail_queue:
nvk_queue_finish(dev, &dev->queue);
fail_vab_memory:
@@ -302,7 +302,7 @@ nvk_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator)
nvk_device_finish_meta(dev);
vk_pipeline_cache_destroy(dev->mem_cache, NULL);
vk_pipeline_cache_destroy(dev->vk.mem_cache, NULL);
nvk_queue_finish(dev, &dev->queue);
if (dev->vab_memory)
nouveau_ws_bo_destroy(dev->vab_memory);
-2
View File
@@ -47,8 +47,6 @@ struct nvk_device {
struct nvk_queue queue;
struct vk_pipeline_cache *mem_cache;
struct vk_meta_device meta;
};