radv: do not lower color exports for FS that need an epilog
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 19 Jul 2022 11:37:10 +0000 (13:37 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 9 Sep 2022 06:26:27 +0000 (06:26 +0000)
When building the main FS with GPL we don't know the color export
formats.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18255>

src/amd/vulkan/radv_pipeline.c

index 2df56bd..285bf6d 100644 (file)
@@ -3291,6 +3291,9 @@ radv_lower_vs_input(nir_shader *nir, const struct radv_physical_device *pdevice,
 static bool
 radv_lower_fs_output(nir_shader *nir, const struct radv_pipeline_key *pipeline_key)
 {
+   if (pipeline_key->ps.has_epilog)
+      return false;
+
    nir_function_impl *impl = nir_shader_get_entrypoint(nir);
    bool progress = false;