Skip to content

vulkan/pipeline_cache: small improvements

Daniel Schürmann requested to merge daniel-schuermann/mesa:vk_cache into main

Just some small things, I came across reading the code. Untested as RADV doesn't use this infrastructure (yet).

vulkan/pipeline_cache: implement vk_pipeline_cache_create_and_insert_object()
vulkan/pipeline_cache: add cache parameter to deserialize() function
vulkan/pipeline_cache: move vk_log on failed deserialization to vk_pipeline_cache_load()

are required for !22030 (merged)

Two more questions I had: (answered: !21967 (comment 1833535))

The deserialization of pipeline cache objects found in the cache data
provided via VkPipelineCacheCreateInfo::pInitialData happens during
vk_pipeline_cache_lookup() rather than during vkCreatePipelineCache().
  • I don't see that anywhere reflected in the code. Quite the opposite: vk_pipeline_cache_load() seems to deserialize() everything.
  • Why does vk_pipeline_cache_add_nir() call nir_serialize() before cache insertion? Wouldn't it make more sense to cache the in-memory representation? If it's about data modification, I think nir_clone() would be better suited? but not sure, honestly.

@gfxstrand

Edited by Daniel Schürmann

Merge request reports

Loading