mesa: Add new viewport and depth-range entry points for GL_ARB_viewport_array
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Thu, 14 Nov 2013 17:06:59 +0000 (10:06 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 20 Jan 2014 19:32:00 +0000 (11:32 -0800)
commit86231c4ab3ceb471b3d44978e7d56f167bafe34f
tree72fcf72aafa34a0752215e545b0a522db9c87788
parent0a7baa68a8559d7889c0b68adfcda53f4575ee98
mesa: Add new viewport and depth-range entry points for GL_ARB_viewport_array

v2 (idr): Use set_viewport_no_notify / set_depth_range_no_notify (and
manually notify the driver) instead of calling _mesa_set_viewporti /
_mesa_set_depthrangei.  Refactor bodies of _mesa_ViewportIndexed and
_mesa_ViewportIndexedv into a shared function.  Remove spurious CLAMP
calls in _mesa_DepthRangeArrayv and _mesa_DepthRangeIndexed.

v3 (idr): Add some missing return-statements after calls to _mesa_error.

v4 (idr): Only perform the ViewportBounds.Min / ViewportBounds.Max
clamping in set_viewport_no_notify if GL_ARB_viewport_array is enabled.
Otherwise the driver may not have set ViewportBounds, and the clamping
will do bad things.

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/viewport.c
src/mesa/main/viewport.h