diff options
author | Ian Romanick <[email protected]> | 2015-09-14 11:59:22 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-09-23 09:56:46 -0700 |
commit | 25543d8ec506ef32599af6f5e0dd735e01b39909 (patch) | |
tree | 747d7f30ced8414b52eaafa384a30f9567b53425 /src/mesa/tnl_dd/t_dd_dmatmp.h | |
parent | c0b3b2f7603eab210acdb2e654e5411fe912ca34 (diff) |
t_dd_dmatmp: Use addition instead of subtraction in loop bounds
This is used everywhere else in this file because it avoids problems
when count is zero (due to trimming).
No piglit regressions on i915 (G33) or radeon (Radeon 7500).
Signed-off-by: Ian Romanick <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38109
Reviewed-by: Brian Paul <[email protected]>
Cc: Marius Predut <[email protected]>
Cc: "10.6 11.0" <[email protected]>
Diffstat (limited to 'src/mesa/tnl_dd/t_dd_dmatmp.h')
-rw-r--r-- | src/mesa/tnl_dd/t_dd_dmatmp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 6e60acd50c9..b127605c4cc 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -623,7 +623,7 @@ static void TAG(render_quads_verts)( struct gl_context *ctx, INIT(GL_TRIANGLES); - for (j = 0; j < count-3; j += 4) { + for (j = 0; j + 3 < count; j += 4) { void *tmp = ALLOC_VERTS( 6 ); /* Send v0, v1, v3 */ |