Module: Mesa Branch: main Commit: 84d006ef11b76002fff8c3d84ef74f857bed26cf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=84d006ef11b76002fff8c3d84ef74f857bed26cf
Author: Samuel Pitoiset <[email protected]> Date: Mon Feb 6 16:02:45 2023 +0100 radv: simplify determining when the fragment shader needs an epilog Signed-off-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21140> --- src/amd/vulkan/radv_pipeline.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index b60d9fe0ba7..baa61b0e10b 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2413,15 +2413,15 @@ radv_generate_graphics_pipeline_key(const struct radv_graphics_pipeline *pipelin if (radv_pipeline_needs_dynamic_ps_epilog(pipeline)) key.ps.dynamic_ps_epilog = true; + /* The fragment shader needs an epilog when both: + * - it's compiled without the fragment output interface with GPL + * - it's compiled on-demand because some dynamic states are enabled + */ key.ps.has_epilog = - (!!(pipeline->active_stages & VK_SHADER_STAGE_FRAGMENT_BIT) && !!pipeline->ps_epilog) || - key.ps.dynamic_ps_epilog; - - /* Compile the main FS only when the fragment shader output interface is missing. */ - if ((lib_flags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT) && - !(lib_flags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT)) { - key.ps.has_epilog = true; - } + (pipeline->active_stages & VK_SHADER_STAGE_FRAGMENT_BIT) && + (((lib_flags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT) && + !(lib_flags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT)) || + key.ps.dynamic_ps_epilog); key.dynamic_patch_control_points = !!(pipeline->dynamic_states & RADV_DYNAMIC_PATCH_CONTROL_POINTS);
