i965/fs: Assert that the number of color targets is one when dual-source blend is...
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 26 Aug 2016 01:35:06 +0000 (18:35 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 30 Aug 2016 23:54:19 +0000 (16:54 -0700)
Requested by Anuj during review of
4a87e4ade778e56d43333c65a58752b15a00ce69, adding as follow-up since it
led to assertion failures due to various GLSL bugs that should be
fixed now.

src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

index cfb5bb65e26a27ea6cb452454f518b76df5180d0..48b5f406542faed04b285704605c80472c73f9b8 100644 (file)
@@ -487,6 +487,7 @@ fs_visitor::emit_fb_writes()
    }
 
    prog_data->dual_src_blend = (this->dual_src_output.file != BAD_FILE);
+   assert(!prog_data->dual_src_blend || key->nr_color_regions == 1);
 
    if (inst == NULL) {
       /* Even if there's no color buffers enabled, we still need to send