diff --git a/docs/features.txt b/docs/features.txt index fd485bd23cc..c6e24875dd0 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -561,7 +561,7 @@ Khronos extensions that are not part of any Vulkan version: VK_KHR_maintenance9 DONE (anv, hk, lvp, nvk, panvk, radv) VK_KHR_maintenance10 DONE (anv, nvk, radv) VK_KHR_performance_query DONE (anv, radv/gfx10.3+, tu, v3dv) - VK_KHR_pipeline_binary DONE (anv, nvk, panvk, radv) + VK_KHR_pipeline_binary DONE (anv, hk, nvk, panvk, radv) VK_KHR_pipeline_executable_properties DONE (anv, hk, nvk, panvk, hasvk, radv, tu, v3dv) VK_KHR_pipeline_library DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn) VK_KHR_present_id DONE (anv, hk, nvk, radv, tu, vn) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 4a220f89c48..e8e80d980f3 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -20,3 +20,4 @@ VK_KHR_surface_maintenance1 promotion everywhere EXT is exposed VK_KHR_swapchain_maintenance1 promotion everywhere EXT is exposed VK_KHR_dynamic_rendering on PowerVR VK_EXT_multisampled_render_to_single_sampled on panvk +VK_KHR_pipeline_binary on HoneyKrisp diff --git a/src/asahi/vulkan/hk_physical_device.c b/src/asahi/vulkan/hk_physical_device.c index 7c9e82a2513..944a22b7835 100644 --- a/src/asahi/vulkan/hk_physical_device.c +++ b/src/asahi/vulkan/hk_physical_device.c @@ -92,6 +92,7 @@ hk_get_device_extensions(const struct hk_instance *instance, .KHR_maintenance9 = true, .KHR_map_memory2 = true, .KHR_multiview = true, + .KHR_pipeline_binary = true, .KHR_pipeline_executable_properties = true, .KHR_pipeline_library = true, #ifdef HK_USE_WSI_PLATFORM @@ -405,6 +406,9 @@ hk_get_device_features( /* VK_KHR_maintenance9 */ .maintenance9 = true, + /* VK_KHR_pipeline_binary */ + .pipelineBinaries = true, + /* VK_KHR_pipeline_executable_properties */ .pipelineExecutableInfo = true, @@ -951,6 +955,13 @@ hk_get_device_properties(const struct agx_device *dev, /* VK_EXT_multi_draw */ .maxMultiDrawCount = UINT16_MAX, + /* VK_KHR_pipeline_binary + * + * InternalCache properties are set by + * hk_physical_device_init_pipeline_cache() + */ + .pipelineBinaryCompressedData = false, + /* VK_EXT_pipeline_robustness */ .defaultRobustnessStorageBuffers = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT, @@ -1102,6 +1113,12 @@ hk_physical_device_init_pipeline_cache(struct hk_physical_device *pdev) const uint64_t driver_flags = hk_physical_device_compiler_flags(pdev); pdev->vk.disk_cache = disk_cache_create(renderer, timestamp, driver_flags); + if (pdev->vk.disk_cache != NULL) { + pdev->vk.properties.pipelineBinaryInternalCache = true; + pdev->vk.properties.pipelineBinaryInternalCacheControl = true; + pdev->vk.properties.pipelineBinaryPrefersInternalCache = true; + pdev->vk.properties.pipelineBinaryPrecompiledInternalCache = true; + } #endif }