Module: Mesa Branch: main Commit: 4d03bf0f9d6f4380df0bbc0dc668b596223f8926 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d03bf0f9d6f4380df0bbc0dc668b596223f8926
Author: Samuel Pitoiset <[email protected]> Date: Wed Feb 8 16:29:11 2023 +0100 radv: allow to cache optimized (LTO) pipelines with GPL This should be working now, except PS epilogs that are still not added to the cache. Signed-off-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21834> --- src/amd/vulkan/radv_pipeline.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index baa2a91710f..ad6c4ac618c 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3503,11 +3503,9 @@ radv_graphics_pipeline_compile(struct radv_graphics_pipeline *pipeline, * - fast-linking is enabled because it's useless to cache unoptimized pipelines * - shaders are captured because it's for debugging purposes * - libraries are created with GPL - * - optimized (LTO) pipelines are created with GPL */ if (fast_linking_enabled || keep_executable_info || - (pCreateInfo->flags & VK_PIPELINE_CREATE_LIBRARY_BIT_KHR) || - (lib_flags & ALL_GRAPHICS_LIB_FLAGS) != ALL_GRAPHICS_LIB_FLAGS) { + (pCreateInfo->flags & VK_PIPELINE_CREATE_LIBRARY_BIT_KHR)) { skip_shaders_cache = true; } @@ -3543,6 +3541,11 @@ radv_graphics_pipeline_compile(struct radv_graphics_pipeline *pipeline, &found_in_application_cache)) { if (found_in_application_cache) pipeline_feedback.flags |= VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT; + + /* TODO: Add PS epilogs to the cache. */ + if (!radv_pipeline_create_ps_epilog(pipeline, pipeline_key, lib_flags, noop_fs)) + return VK_ERROR_OUT_OF_DEVICE_MEMORY; + result = VK_SUCCESS; goto done; }
