From: Roland Scheidegger Date: Tue, 22 Dec 2009 19:54:26 +0000 (+0100) Subject: Merge branch 'gallium-edgeflags' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=35e8283c69d80debb44b05ea79dc5f67303a7432;p=mesa.git Merge branch 'gallium-edgeflags' Conflicts: src/mesa/state_tracker/st_draw.c --- 35e8283c69d80debb44b05ea79dc5f67303a7432 diff --cc src/mesa/state_tracker/st_draw.c index ec8092d7e9e,2d287ef4ef5..e54f21be600 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@@ -381,9 -332,9 +332,9 @@@ setup_interleaved_attribs(GLcontext *ct { struct pipe_context *pipe = ctx->st->pipe; GLuint attr; - const GLubyte *offset0; + const GLubyte *offset0 = NULL; - for (attr = 0; attr < vp->num_inputs; attr++) { + for (attr = 0; attr < vpv->num_inputs; attr++) { const GLuint mesaAttr = vp->index_to_input[attr]; struct gl_buffer_object *bufobj = arrays[mesaAttr]->BufferObj; struct st_buffer_object *stobj = st_buffer_object(bufobj); @@@ -574,7 -513,8 +527,8 @@@ st_draw_vbo(GLcontext *ctx GLuint attr; struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS]; unsigned num_vbuffers, num_velements; - GLboolean userSpace; + GLboolean userSpace = GL_FALSE; + GLboolean vertDataEdgeFlags; /* Gallium probably doesn't want this in some cases. */ if (!index_bounds_valid) @@@ -687,12 -633,6 +649,8 @@@ * through to driver & draw module. These interfaces still * need a bit of work... */ - setup_edgeflags(ctx, prims[i].mode, - prims[i].start + indexOffset, prims[i].count, - arrays[VERT_ATTRIB_EDGEFLAG]); - + prim = translate_prim( ctx, prims[i].mode ); + pipe->draw_range_elements(pipe, indexBuf, indexSize, min_index, max_index, @@@ -701,14 -641,8 +659,10 @@@ } else { for (i = 0; i < nr_prims; i++) { - setup_edgeflags(ctx, prims[i].mode, - prims[i].start + indexOffset, prims[i].count, - arrays[VERT_ATTRIB_EDGEFLAG]); - + prim = translate_prim( ctx, prims[i].mode ); + pipe->draw_elements(pipe, indexBuf, indexSize, - prims[i].mode, + prim, prims[i].start + indexOffset, prims[i].count); } } @@@ -718,16 -652,8 +672,12 @@@ else { /* non-indexed */ GLuint i; + GLuint prim; + for (i = 0; i < nr_prims; i++) { - setup_edgeflags(ctx, prims[i].mode, - prims[i].start, prims[i].count, - arrays[VERT_ATTRIB_EDGEFLAG]); - - pipe->draw_arrays(pipe, prims[i].mode, prims[i].start, prims[i].count); + prim = translate_prim( ctx, prims[i].mode ); + + pipe->draw_arrays(pipe, prim, prims[i].start, prims[i].count); } }