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>