From 8b788069fbb4ffe98aea52232bfd5e0200a88121 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Fri, 6 Jan 2017 14:41:27 -0800 Subject: [PATCH] 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 --- src/intel/compiler/brw_fs_visitor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.30.2