[Mesa-dev] [PATCH 19/47] (0019) i965/fs: Don't enable dual source blending if no fragment outputs are written.

Shaofeng Tang shaofeng.tang at intel.com
Mon May 21 03:29:53 UTC 2018


From: Francisco Jerez <currojerez at riseup.net>

Prevents a crash in
spec at arb_enhanced_layouts@compiler at compile-time-constants@index.frag.

Change-Id: I0d9698733aee7769a1c4b2835fb0027dcb1eed53
---
 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 b4880df..bce40f4 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.7.4



More information about the mesa-dev mailing list