meta: Refactor handling of GL_MULTISAMPLE.
authorPaul Berry <stereotype441@gmail.com>
Thu, 13 Sep 2012 17:20:07 +0000 (10:20 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 14 Sep 2012 21:50:41 +0000 (14:50 -0700)
commita29a4566354af53e3bdc4a925eddc0d7af2bf384
tree56c28978d6fd4215f6ac839ad4d609637778154f
parent15bf3103b48a5928321fe56fbb3ed28a0f314418
meta: Refactor handling of GL_MULTISAMPLE.

In commit 055093e (meta: remove call to _meta_in_progress(), fix
multisample enable/disable), we created a meta_set_enable() function
that could be used by meta ops to enable and disable GL_MULTISAMPLE
even when the GLES API was in use (the GLES API doesn't support
GL_MULTISAMPLE; it behaves as if it is always enabled).  This created
some unfortunate code duplication between meta_set_enable() and the
existing _mesa_set_enable() function.

This patch eliminates the duplication by creating a
_mesa_set_multisample() function, which is used by both meta ops and
_mesa_set_enable() to enable/disable GL_MULTISAMPLE.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/common/meta.c
src/mesa/main/enable.c
src/mesa/main/enable.h