diff options
author | Daniel Schürmann <daniel@schuermann.dev> | 2023-05-12 12:19:14 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-05-17 20:40:12 +0000 |
commit | 8bfd18b8c51f5e0170b9171cefbcb588a8b93d9e (patch) | |
tree | f5ebd250cf0aac3f8093762ecfe232c094dcd2fe | |
parent | 1df30b01ff151bbb5718270e49ca67b5e45e048d (diff) | |
download | mesa-8bfd18b8c51f5e0170b9171cefbcb588a8b93d9e.tar.gz |
vulkan/pipeline_cache: don't log warnings for client-invisible caches
Fixes: d3f06cf5ce0764b37a03a0f2bfbb109a4d75884d ('vulkan/pipeline_cache: don't log warnings for internal caches')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22986>
-rw-r--r-- | src/amd/vulkan/meta/radv_meta.c | 12 | ||||
-rw-r--r-- | src/amd/vulkan/radv_device.c | 4 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_device.cc | 4 | ||||
-rw-r--r-- | src/intel/vulkan/anv_device.c | 4 | ||||
-rw-r--r-- | src/intel/vulkan_hasvk/anv_device.c | 4 | ||||
-rw-r--r-- | src/vulkan/runtime/vk_pipeline_cache.c | 5 | ||||
-rw-r--r-- | src/vulkan/runtime/vk_pipeline_cache.h | 5 |
7 files changed, 9 insertions, 29 deletions
diff --git a/src/amd/vulkan/meta/radv_meta.c b/src/amd/vulkan/meta/radv_meta.c index 07819968ff4..d79c1864e6b 100644 --- a/src/amd/vulkan/meta/radv_meta.c +++ b/src/amd/vulkan/meta/radv_meta.c @@ -339,14 +339,11 @@ radv_load_meta_pipeline(struct radv_device *device) void *data = NULL; bool ret = false; int fd = -1; + VkResult result = VK_SUCCESS; VkPipelineCacheCreateInfo create_info = { .sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO, }; - struct vk_pipeline_cache_create_info info = { - .pCreateInfo = &create_info, - .internal = true, - }; if (!radv_builtin_cache_path(path)) goto fail; @@ -366,10 +363,9 @@ radv_load_meta_pipeline(struct radv_device *device) create_info.pInitialData = data; fail: - device->meta_state.cache = - vk_pipeline_cache_to_handle(vk_pipeline_cache_create(&device->vk, &info, NULL)); - - if (device->meta_state.cache) { + result = vk_common_CreatePipelineCache(radv_device_to_handle(device), &create_info, NULL, + &device->meta_state.cache); + if (result == VK_SUCCESS) { device->meta_state.initial_cache_entries = num_cache_entries(device->meta_state.cache); ret = device->meta_state.initial_cache_entries > 0; } diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index cce12516294..f5559ba2715 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1048,9 +1048,7 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr if (device->physical_device->rad_info.gfx_level >= GFX7) cik_create_gfx_config(device); - struct vk_pipeline_cache_create_info info = { - .internal = true, - }; + struct vk_pipeline_cache_create_info info = {0}; device->mem_cache = vk_pipeline_cache_create(&device->vk, &info, NULL); if (!device->mem_cache) goto fail_meta; diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc index 53b61289a3d..1ad80b1bb40 100644 --- a/src/freedreno/vulkan/tu_device.cc +++ b/src/freedreno/vulkan/tu_device.cc @@ -2055,9 +2055,7 @@ tu_CreateDevice(VkPhysicalDevice physicalDevice, struct tu6_global *global = NULL; uint32_t global_size = sizeof(struct tu6_global); - struct vk_pipeline_cache_create_info pcc_info = { - .internal = true, - }; + struct vk_pipeline_cache_create_info pcc_info = { }; for (unsigned i = 0; i < pCreateInfo->queueCreateInfoCount; i++) { const VkDeviceQueueCreateInfo *queue_create = diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 1c3b9c08c57..8dc7bead42f 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -3324,9 +3324,7 @@ VkResult anv_CreateDevice( if (result != VK_SUCCESS) goto fail_btd_fifo_bo; - struct vk_pipeline_cache_create_info pcc_info = { - .internal = true, - }; + struct vk_pipeline_cache_create_info pcc_info = { }; device->default_pipeline_cache = vk_pipeline_cache_create(&device->vk, &pcc_info, NULL); if (!device->default_pipeline_cache) { diff --git a/src/intel/vulkan_hasvk/anv_device.c b/src/intel/vulkan_hasvk/anv_device.c index d947e9f3caa..af4d759a2aa 100644 --- a/src/intel/vulkan_hasvk/anv_device.c +++ b/src/intel/vulkan_hasvk/anv_device.c @@ -2956,9 +2956,7 @@ VkResult anv_CreateDevice( if (result != VK_SUCCESS) goto fail_trivial_batch_bo_and_scratch_pool; - struct vk_pipeline_cache_create_info pcc_info = { - .internal = true, - }; + struct vk_pipeline_cache_create_info pcc_info = { }; device->default_pipeline_cache = vk_pipeline_cache_create(&device->vk, &pcc_info, NULL); if (!device->default_pipeline_cache) { diff --git a/src/vulkan/runtime/vk_pipeline_cache.c b/src/vulkan/runtime/vk_pipeline_cache.c index 59937d4ed3e..b16d5a08fd6 100644 --- a/src/vulkan/runtime/vk_pipeline_cache.c +++ b/src/vulkan/runtime/vk_pipeline_cache.c @@ -38,9 +38,7 @@ #include "util/set.h" #define vk_pipeline_cache_log(cache, ...) \ - if (cache->internal) \ - vk_logw(VK_LOG_OBJS(cache->base.device), __VA_ARGS__); \ - else \ + if (cache->base.client_visible) \ vk_logw(VK_LOG_OBJS(cache), __VA_ARGS__) static bool @@ -590,7 +588,6 @@ vk_pipeline_cache_create(struct vk_device *device, return NULL; cache->flags = pCreateInfo->flags; - cache->internal = info->internal; struct VkPhysicalDeviceProperties pdevice_props; device->physical->dispatch_table.GetPhysicalDeviceProperties( diff --git a/src/vulkan/runtime/vk_pipeline_cache.h b/src/vulkan/runtime/vk_pipeline_cache.h index bdb5f68d18c..8a621ede811 100644 --- a/src/vulkan/runtime/vk_pipeline_cache.h +++ b/src/vulkan/runtime/vk_pipeline_cache.h @@ -163,9 +163,6 @@ struct vk_pipeline_cache { /** Protects object_cache */ simple_mtx_t lock; - /* Whether this cache is created by the driver. */ - bool internal; - struct set *object_cache; }; @@ -181,8 +178,6 @@ struct vk_pipeline_cache_create_info { /** If true, ignore VK_ENABLE_PIPELINE_CACHE and enable anyway */ bool force_enable; - - bool internal; }; struct vk_pipeline_cache * |