~ubuntu-branches/ubuntu/precise/mesa/precise-updates

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/draw/draw_pipe_vbuf.c

  • Committer: Package Import Robot
  • Author(s): Robert Hooker
  • Date: 2012-02-02 12:05:48 UTC
  • mfrom: (1.7.1) (3.3.27 sid)
  • Revision ID: package-import@ubuntu.com-20120202120548-nvkma85jq0h4coix
Tags: 8.0~rc2-0ubuntu4
Drop drisearchdir handling, it is no longer needed with multiarch
and dri-alternates being removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
emit_vertex( struct vbuf_stage *vbuf,
131
131
             struct vertex_header *vertex )
132
132
{
133
 
   if(vertex->vertex_id == UNDEFINED_VERTEX_ID) {      
 
133
   if (vertex->vertex_id == UNDEFINED_VERTEX_ID && vbuf->vertex_ptr) {
134
134
      /* Hmm - vertices are emitted one at a time - better make sure
135
135
       * set_buffer is efficient.  Consider a special one-shot mode for
136
136
       * translate.
357
357
static void 
358
358
vbuf_alloc_vertices( struct vbuf_stage *vbuf )
359
359
{
360
 
   assert(!vbuf->nr_indices);
361
 
   assert(!vbuf->vertices);
 
360
   if (vbuf->vertex_ptr) {
 
361
      assert(!vbuf->nr_indices);
 
362
      assert(!vbuf->vertices);
 
363
   }
362
364
   
363
365
   /* Allocate a new vertex buffer */
364
366
   vbuf->max_vertices = vbuf->render->max_vertex_buffer_bytes / vbuf->vertex_size;
437
439
   vbuf->stage.destroy = vbuf_destroy;
438
440
   
439
441
   vbuf->render = render;
440
 
   vbuf->max_indices = MAX2(render->max_indices, UNDEFINED_VERTEX_ID-1);
 
442
   vbuf->max_indices = MIN2(render->max_indices, UNDEFINED_VERTEX_ID-1);
441
443
 
442
444
   vbuf->indices = (ushort *) align_malloc( vbuf->max_indices * 
443
445
                                            sizeof(vbuf->indices[0]),