diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2003-11-11 15:11:59 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2003-11-11 15:11:59 +0000 |
commit | 5198950cde0fa9d64ed97299b9c229cd293b43c2 (patch) | |
tree | 4b83bfb3a247c1f706be4e7c6d47d9f67fbaeb6b | |
parent | 88d66b720854c3371180ad99e6244fc9c87f9054 (diff) |
Don't adjust indicies if adjustment is zero
-rw-r--r-- | src/mesa/tnl/t_array_api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c index 260a6fc5e0..0357829ff4 100644 --- a/src/mesa/tnl/t_array_api.c +++ b/src/mesa/tnl/t_array_api.c @@ -100,8 +100,9 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode, tnl->vb.Elts = (GLuint *)indices; - for (i = 0 ; i < count ; i++) - indices[i] -= start; + if (start) + for (i = 0 ; i < count ; i++) + indices[i] -= start; if (ctx->Array.LockCount) tnl->Driver.RunPipeline( ctx ); @@ -113,8 +114,9 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode, tnl->pipeline.run_input_changes |= ctx->Array._Enabled; } - for (i = 0 ; i < count ; i++) - indices[i] += start; + if (start) + for (i = 0 ; i < count ; i++) + indices[i] += start; } |