X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fvbo%2Fvbo_split.c;h=2f957462a8c0a95437492590e196499b96665f10;hb=98d07022f5312967bdfd54069869c8d6c65117a7;hp=c445acca7d6d96544fbfb3bcc9694dd4db697770;hpb=11522b74b318db9d099466ff226124c23595e8e2;p=mesa.git diff --git a/src/mesa/vbo/vbo_split.c b/src/mesa/vbo/vbo_split.c index c445acca7d6..2f957462a8c 100644 --- a/src/mesa/vbo/vbo_split.c +++ b/src/mesa/vbo/vbo_split.c @@ -1,7 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -18,12 +17,13 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ /* Deal with hardware and/or swtnl maximums: @@ -98,7 +98,7 @@ GLboolean split_prim_inplace(GLenum mode, GLuint *first, GLuint *incr) -void vbo_split_prims( GLcontext *ctx, +void vbo_split_prims( struct gl_context *ctx, const struct gl_client_array *arrays[], const struct _mesa_prim *prim, GLuint nr_prims, @@ -108,19 +108,20 @@ void vbo_split_prims( GLcontext *ctx, vbo_draw_func draw, const struct split_limits *limits ) { - GLuint max_basevertex = prim->basevertex; + GLint max_basevertex = prim->basevertex; GLuint i; for (i = 1; i < nr_prims; i++) max_basevertex = MAX2(max_basevertex, prim[i].basevertex); + /* XXX max_basevertex is computed but not used, why? */ + if (ib) { if (limits->max_indices == 0) { /* Could traverse the indices, re-emitting vertices in turn. * But it's hard to see why this case would be needed - for * software tnl, it is better to convert to non-indexed - * rendering after transformation is complete, as is done in - * the t_dd_rendertmp.h templates. Are there any devices + * rendering after transformation is complete. Are there any devices * with hardware tnl that cannot do indexed rendering? * * For now, this path is disabled.