From df7a730b4f694f6a07e7d6fd673453b8315ae867 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 30 Oct 2019 15:50:51 -0500 Subject: [PATCH] anv: Don't delete fragment shaders that write sample mask Also, use color_outputs_valid rather than nr_color_outputs since it should be a bit more accurate. Reviewed-by: Rafael Antognolli --- src/intel/vulkan/anv_pipeline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 68a8ca0c026..1a2eb4599c8 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -1056,8 +1056,10 @@ anv_pipeline_compile_fs(const struct brw_compiler *compiler, (uint32_t)fs_stage->prog_data.wm.dispatch_16 + (uint32_t)fs_stage->prog_data.wm.dispatch_32; - if (fs_stage->key.wm.nr_color_regions == 0 && + if (fs_stage->key.wm.color_outputs_valid == 0 && !fs_stage->prog_data.wm.has_side_effects && + !fs_stage->prog_data.wm.uses_omask && + !fs_stage->key.wm.alpha_to_coverage && !fs_stage->prog_data.wm.uses_kill && fs_stage->prog_data.wm.computed_depth_mode == BRW_PSCDEPTH_OFF && !fs_stage->prog_data.wm.computed_stencil) { -- 2.30.2