vulkan/pipeline_cache: don't log warnings for client-invisible caches

Fixes: d3f06cf5ce ('vulkan/pipeline_cache: don't log warnings for internal caches')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22986>
This commit is contained in:
Daniel Schürmann
2023-05-12 12:19:14 +02:00
committed by Marge Bot
parent 1df30b01ff
commit 8bfd18b8c5
7 changed files with 9 additions and 29 deletions
+4 -8
View File
@@ -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;
}
+1 -3
View File
@@ -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;
+1 -3
View File
@@ -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 =
+1 -3
View File
@@ -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) {
+1 -3
View File
@@ -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) {
+1 -4
View File
@@ -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(
-5
View File
@@ -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 *