mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-02 22:54:05 +08:00
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 <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21834>
This commit is contained in:
parent
532d63993f
commit
4d03bf0f9d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user