meta: Respect the driver's maximum number of draw buffers
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 17 Jun 2014 18:14:17 +0000 (11:14 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 18 Jun 2014 21:45:25 +0000 (14:45 -0700)
commitcc219d1d6567cfada5d8e9adf01c2f00e00c93ca
treefd0d6b5de05b472e9c4a620544ea18bb28c4773f
parent56335b44417bc3d49625f9637e2b95457f522ad2
meta: Respect the driver's maximum number of draw buffers

Commit c1c1cf5f9 added infrastructure for saving and restoring draw
buffer state.  However, it universially used MAX_DRAW_BUFFERS, but many
drivers support far fewer than that at limit.  For example, the radeon
and i915 drivers only support 1.  Using MAX_DRAW_BUFFERS causes meta to
generate GL errors.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80115
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Kenneth Graunke <kenneth@whitecape.org> [on Broadwell]
Tested-by: jpsinthemix@verizon.net
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/common/meta.c