Too much boilerplate for no benefit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
pipeline->stages[i].shader = &radv_shader_ref(pipeline_obj->shaders[idx++])->base;
} else if (is_library) {
pipeline->stages[i].shader =
- radv_pipeline_cache_search_nir(device, cache, pipeline->stages[i].sha1, NULL);
+ radv_pipeline_cache_search_nir(device, cache, pipeline->stages[i].sha1);
complete &= pipeline->stages[i].shader != NULL;
}
}
struct vk_pipeline_cache_object *
radv_pipeline_cache_search_nir(struct radv_device *device, struct vk_pipeline_cache *cache,
- const uint8_t *sha1, bool *found_in_application_cache)
+ const uint8_t *sha1)
{
- *found_in_application_cache = false;
-
if (radv_is_cache_disabled(device))
return NULL;
- if (!cache) {
+ if (!cache)
cache = device->mem_cache;
- found_in_application_cache = NULL;
- }
- return vk_pipeline_cache_lookup_object(
- cache, sha1, SHA1_DIGEST_LENGTH, &vk_raw_data_cache_object_ops, found_in_application_cache);
+ return vk_pipeline_cache_lookup_object(cache, sha1, SHA1_DIGEST_LENGTH,
+ &vk_raw_data_cache_object_ops, NULL);
}
struct nir_shader *
radv_hash_shaders(shader_sha1, &stage, 1, NULL, key, radv_get_hash_flags(device, false));
/* lookup the stage in cache */
- bool found_in_application_cache = false;
- stages[idx].shader =
- radv_pipeline_cache_search_nir(device, cache, shader_sha1, &found_in_application_cache);
-
- if (stages[idx].shader) {
- if (found_in_application_cache)
- stage.feedback.flags |=
- VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT;
+ stages[idx].shader = radv_pipeline_cache_search_nir(device, cache, shader_sha1);
+
+ if (stages[idx].shader)
goto feedback;
- }
if (pCreateInfo->flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT)
return VK_PIPELINE_COMPILE_REQUIRED;
struct vk_pipeline_cache_object *radv_pipeline_cache_search_nir(struct radv_device *device,
struct vk_pipeline_cache *cache,
- const unsigned char *sha1,
- bool *found_in_application_cache);
+ const unsigned char *sha1);
struct vk_pipeline_cache_object *
radv_pipeline_cache_nir_to_handle(struct radv_device *device, struct vk_pipeline_cache *cache,