radv: disable MRT compaction with dual-source blending

Fixes crucible tests func.shader.dualsrc_mrt0_undef on navi21 and
func.shader.dualsrc_mrt1_undef on polaris10.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: 22.3 mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19806>
This commit is contained in:
Rhys Perry
2022-11-16 15:08:34 +00:00
committed by Marge Bot
parent 68652dca0c
commit ea0ae17fc4

View File

@@ -5745,7 +5745,8 @@ radv_graphics_pipeline_init(struct radv_graphics_pipeline *pipeline, struct radv
pipeline->col_format_non_compacted = blend.spi_shader_col_format;
struct radv_shader *ps = pipeline->base.shaders[MESA_SHADER_FRAGMENT];
if (!ps->info.ps.has_epilog) {
bool enable_mrt_compaction = !blend.mrt0_is_dual_src && !ps->info.ps.has_epilog;
if (enable_mrt_compaction) {
blend.spi_shader_col_format = radv_compact_spi_shader_col_format(ps, &blend);
}
@@ -5772,7 +5773,7 @@ radv_graphics_pipeline_init(struct radv_graphics_pipeline *pipeline, struct radv
}
}
if (!ps->info.ps.has_epilog) {
if (enable_mrt_compaction) {
/* In presense of MRT holes (ie. the FS exports MRT1 but not MRT0), the compiler will remap
* them, so that only MRT0 is exported and the driver will compact SPI_SHADER_COL_FORMAT to
* match what the FS actually exports. Though, to make sure the hw remapping works as