mesa: Save and restore GL_RASTERIZER_DISCARD state during meta ops.
authorPaul Berry <stereotype441@gmail.com>
Wed, 21 Dec 2011 18:13:40 +0000 (10:13 -0800)
committerPaul Berry <stereotype441@gmail.com>
Fri, 23 Dec 2011 17:43:18 +0000 (09:43 -0800)
commita3a4d01e415404e1bab76d440466952f4ab6171b
tree5fd4f3c43727cdd38dd5e2b95861e5f9939c7222
parentb5b2081d75105883c3e7452775c674716b665385
mesa: Save and restore GL_RASTERIZER_DISCARD state during meta ops.

During meta-operations (such as _mesa_meta_GenerateMipmap()), we need
to be able to draw even if GL_RASTERIZER_DISCARD is enabled.  This
patch causes _mesa_meta_begin() to save the state of
GL_RASTERIZER_DISCARD and disable it (so that drawing can be done
during the meta-op), and causes _mesa_meta_end() to restore it.

Fixes piglit test "EXT_transform_feedback/generatemipmap discard" on
i965 Gen6.

Reviewed-by: Brian Paul <brianp@vmare.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/common/meta.c