st/mesa: generate blend state according to the number of enabled color buffers
authorMarek Olšák <marek.olsak@amd.com>
Wed, 31 Jan 2018 03:37:00 +0000 (04:37 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 9 Feb 2018 14:52:22 +0000 (15:52 +0100)
commit76085f2048d426ae5fd35b26bae2141c6cfeba28
treebc95eb06a201b71bc1ee86c0bd0ecfbcb88de7cd
parentc446dd7927477e68e9a961acb1727ff53fb7ea4f
st/mesa: generate blend state according to the number of enabled color buffers

Non-MRT cases always translate blend state for 1 color buffer only.
MRT cases only check and translate blend state for enabled color buffers.

This also avoids an assertion failure in translate_blend for:
  dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common.common_advanced_blend_eq_buffer_blend_eq

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/state_tracker/st_atom_blend.c
src/mesa/state_tracker/st_atom_framebuffer.c
src/mesa/state_tracker/st_atom_list.h
src/mesa/state_tracker/st_context.h