void *data = NULL;
bool ret = false;
int fd = -1;
- VkResult result = VK_SUCCESS;
+ struct vk_pipeline_cache *cache = NULL;
VkPipelineCacheCreateInfo create_info = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO,
};
+ struct vk_pipeline_cache_create_info info = {
+ .pCreateInfo = &create_info,
+ .skip_disk_cache = true,
+ };
+
if (!radv_builtin_cache_path(path))
goto fail;
create_info.pInitialData = data;
fail:
- result = vk_common_CreatePipelineCache(radv_device_to_handle(device), &create_info, NULL, &device->meta_state.cache);
- if (result == VK_SUCCESS) {
+ cache = vk_pipeline_cache_create(&device->vk, &info, NULL);
+
+ if (cache) {
+ device->meta_state.cache = vk_pipeline_cache_to_handle(cache);
device->meta_state.initial_cache_entries = num_cache_entries(device->meta_state.cache);
ret = device->meta_state.initial_cache_entries > 0;
}
uint8_t hash[SHA1_DIGEST_LENGTH];
_mesa_sha1_compute(binary, binary->total_size, hash);
- /* TODO: Skip disk-cache for meta-shaders because they are stored in a different cache file */
-
struct vk_pipeline_cache_object *shader_obj;
shader_obj = vk_pipeline_cache_create_and_insert_object(cache, hash, SHA1_DIGEST_LENGTH, binary, binary->total_size,
&radv_shader_ops);