Module: Mesa
Branch: main
Commit: 90dda3190177f7d8690da5eff366b1c0d2dad782
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=90dda3190177f7d8690da5eff366b1c0d2dad782

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Dec  7 12:02:34 2023 +0100

radv: simplify disabling MRT compaction for PS epilogs

If the fragment shader isn't compiled, the PS epilog key isn't used
at all with GPL.

Signed-off-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26563>

---

 src/amd/vulkan/radv_pipeline_graphics.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline_graphics.c 
b/src/amd/vulkan/radv_pipeline_graphics.c
index 89f2d7107ce..4d67f1e74dd 100644
--- a/src/amd/vulkan/radv_pipeline_graphics.c
+++ b/src/amd/vulkan/radv_pipeline_graphics.c
@@ -1933,14 +1933,10 @@ radv_generate_graphics_pipeline_key(const struct 
radv_device *device, const stru
    if (radv_pipeline_needs_ps_epilog(pipeline, lib_flags))
       key.ps.has_epilog = true;
 
-   /* Disable MRT compaction when it's not possible to know both the written 
color outputs and the
-    * color blend attachments.
+   /* Disable MRT compaction when a PS epilog is needed because we don't know 
the fragment output
+    * interface.
     */
-   bool disable_mrt_compaction =
-      key.ps.has_epilog || ((lib_flags & 
VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT) &&
-                            !(lib_flags & 
VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT));
-
-   key.ps.epilog = radv_pipeline_generate_ps_epilog_key(device, state, 
disable_mrt_compaction);
+   key.ps.epilog = radv_pipeline_generate_ps_epilog_key(device, state, 
key.ps.has_epilog);
 
    if (device->physical_device->rad_info.gfx_level >= GFX11) {
       /* On GFX11, alpha to coverage is exported via MRTZ when 
depth/stencil/samplemask are also

Reply via email to