radv: Enable the null export workaround with POPS
authorVitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Mon, 3 Apr 2023 19:23:11 +0000 (22:23 +0300)
committerMarge Bot <emma+marge@anholt.net>
Mon, 26 Jun 2023 15:58:04 +0000 (15:58 +0000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22250>

src/amd/vulkan/radv_pipeline_graphics.c

index 2eb1b7a..fdb9917 100644 (file)
@@ -3812,8 +3812,11 @@ radv_needs_null_export_workaround(const struct radv_device *device, const struct
     * instructions if any are present.
     *
     * GFX11 requires one color output, otherwise the DCC decompression does nothing.
+    *
+    * Primitive Ordered Pixel Shading also requires an export, otherwise interlocking doesn't work
+    * correctly before GFX11, and a hang happens on GFX11.
     */
-   return (gfx_level <= GFX9 || ps->info.ps.can_discard ||
+   return (gfx_level <= GFX9 || ps->info.ps.can_discard || ps->info.ps.pops ||
            (custom_blend_mode == V_028808_CB_DCC_DECOMPRESS_GFX11 && gfx_level >= GFX11)) &&
           !ps->info.ps.writes_z && !ps->info.ps.writes_stencil && !ps->info.ps.writes_sample_mask;
 }