anv: Don't delete fragment shaders that write sample mask
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 30 Oct 2019 20:50:51 +0000 (15:50 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 31 Oct 2019 21:07:15 +0000 (21:07 +0000)
Also, use color_outputs_valid rather than nr_color_outputs since it
should be a bit more accurate.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/intel/vulkan/anv_pipeline.c

index 68a8ca0c026351edd5361c4a1883aa43ebfe0a4c..1a2eb4599c8611165756d393c1ac58e399dcb88f 100644 (file)
@@ -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) {