From: Francisco Jerez Date: Fri, 6 Jan 2017 22:41:27 +0000 (-0800) Subject: intel/fs: Don't enable dual source blend if no outputs are written X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b788069fbb4ffe98aea52232bfd5e0200a88121;p=mesa.git intel/fs: Don't enable dual source blend if no outputs are written This prevents a crash in some arb_enhanced_layouts tests that would be caused by the next commit. Reviewed-by: Jason Ekstrand Reviewed-by: Matt Turner --- diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp index d3d69135711..746cbb74213 100644 --- a/src/intel/compiler/brw_fs_visitor.cpp +++ b/src/intel/compiler/brw_fs_visitor.cpp @@ -440,7 +440,8 @@ fs_visitor::emit_fb_writes() inst->target = target; } - prog_data->dual_src_blend = (this->dual_src_output.file != BAD_FILE); + prog_data->dual_src_blend = (this->dual_src_output.file != BAD_FILE && + this->outputs[0].file != BAD_FILE); assert(!prog_data->dual_src_blend || key->nr_color_regions == 1); if (inst == NULL) {