From 78c0fae08c45fecc85897b640112d378078e3560 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 17 Feb 2023 09:24:14 +0100 Subject: [PATCH] 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 Part-of: --- src/amd/vulkan/radv_pipeline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index c164abe94cf..c83b7c879f1 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -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);