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;
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;
}
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;
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 =
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) {
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) {
#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
return NULL;
cache->flags = pCreateInfo->flags;
- cache->internal = info->internal;
struct VkPhysicalDeviceProperties pdevice_props;
device->physical->dispatch_table.GetPhysicalDeviceProperties(
/** Protects object_cache */
simple_mtx_t lock;
- /* Whether this cache is created by the driver. */
- bool internal;
-
struct set *object_cache;
};
/** If true, ignore VK_ENABLE_PIPELINE_CACHE and enable anyway */
bool force_enable;
-
- bool internal;
};
struct vk_pipeline_cache *