radv: only skip emitting the pipeline blend state if the FS uses an epilog

The blend state is emitted from the command buffer when the FS uses
an epilog (either compiled from a lib with GPL or compiled on-demand).

This shouldn't change anything but it will allow to disable using a
PS epilog when the fragment shader doesn't write any color outputs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21341>
This commit is contained in:
Samuel Pitoiset
2023-02-17 09:24:14 +01:00
committed by Marge Bot
parent 5a5a131127
commit 78c0fae08c

View File

@@ -3745,7 +3745,9 @@ radv_pipeline_emit_blend_state(struct radeon_cmdbuf *ctx_cs,
const struct radv_graphics_pipeline *pipeline,
const struct radv_blend_state *blend)
{
if (pipeline->ps_epilog || radv_pipeline_needs_dynamic_ps_epilog(pipeline))
struct radv_shader *ps = pipeline->base.shaders[MESA_SHADER_FRAGMENT];
if (ps->info.ps.has_epilog)
return;
radeon_set_context_reg(ctx_cs, R_028714_SPI_SHADER_COL_FORMAT, blend->spi_shader_col_format);