mesa: refactor _mesa_compute_max_transform_feedback_vertices from i965.
authorPaul Berry <stereotype441@gmail.com>
Wed, 12 Dec 2012 22:14:12 +0000 (14:14 -0800)
committerPaul Berry <stereotype441@gmail.com>
Tue, 18 Dec 2012 16:31:26 +0000 (08:31 -0800)
commit3870f2903f030969491fa287b7f8d7eaf1d2f4f9
treeb8e7ef37f0079d80a497cfd17f8699db6ffb10d8
parent61c1b065fbdd224fa547f035991210859c7af310
mesa: refactor _mesa_compute_max_transform_feedback_vertices from i965.

Previously, the i965 driver contained code to compute the maximum
number of vertices that could be written without overflowing any
transform feedback buffers.  This code wasn't driver-specific, and for
GLES3 support we're going to need to use it in core mesa.  So this
patch moves the code into a core mesa function,
_mesa_compute_max_transform_feedback_vertices().

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
v2: Eliminate C++-style variable declarations, since these won't work
with MSVC.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/i965/gen6_sol.c
src/mesa/main/transformfeedback.c
src/mesa/main/transformfeedback.h