t_dd_dmatmp: Make "count" actually be the count
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 14 Sep 2015 18:37:12 +0000 (11:37 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 23 Sep 2015 16:56:01 +0000 (09:56 -0700)
commitd7bf7969b90f66ee614f2d2225f3a821d5396a89
treeb4a59c5537c7296818338ec1686b0c9979dc9244
parentf2e75ac88a92ab2180de576aca298929cfce03f2
t_dd_dmatmp: Make "count" actually be the count

The value passed in count previously was "vertex after the last vertex
to be processed."  Calling that "count" was misleading and kind of mean.
Looking at the code, many functions immediately do "count-start" to get
back the true count.  That's just silly.

If it is better for the loops to be 'for (j = start; j < (start +
count); j++)', GCC will do that transformation.

NOTE: There is some strange formatting left by this patch.  That was
done to make it more obvious that the before and after code is
equivalent.  These will be fixed in the next patch.

No piglit regressions on i915 (G33) or radeon (Radeon 7500).

v2: Fix a remaining (count-start) in render_quad_strip_verts.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com> [v1]
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/i915/intel_render.c
src/mesa/drivers/dri/radeon/radeon_swtcl.c
src/mesa/tnl_dd/t_dd_dmatmp.h