diff options
author | Brian Paul <[email protected]> | 2010-05-05 14:00:58 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-05-05 18:19:37 -0600 |
commit | 740e50c60f03d194aafab93d5251699964800979 (patch) | |
tree | 102a978a79b064f077b6dea20b026f53ffa9786a | |
parent | 246d39059e21bdc840128d448bcd79a957bbd1d1 (diff) |
gallium: rename draw() to draw_elements() in vbuf code
Now we have draw_elements() and draw_arrays() to be consistent with the
pipe_context drawing functions.
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_vbuf.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_emit.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_emit.c | 12 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c | 12 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vbuf.h | 12 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_prim_vbuf.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_vbuf.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_render.c | 22 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_prim_vbuf.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_swtnl_backend.c | 8 |
10 files changed, 47 insertions, 47 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c index 1fd083e54d0..3c93c9014a6 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c +++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c @@ -324,9 +324,9 @@ vbuf_flush_vertices( struct vbuf_stage *vbuf ) if (vbuf->nr_indices) { - vbuf->render->draw(vbuf->render, - vbuf->indices, - vbuf->nr_indices ); + vbuf->render->draw_elements(vbuf->render, + vbuf->indices, + vbuf->nr_indices ); vbuf->nr_indices = 0; } diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c index ad48fa39a4f..f623c0743da 100644 --- a/src/gallium/auxiliary/draw/draw_pt_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_emit.c @@ -190,9 +190,9 @@ void draw_pt_emit( struct pt_emit *emit, 0, vertex_count - 1 ); - render->draw(render, - elts, - count); + render->draw_elements(render, + elts, + count); render->release_vertices(render); } diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c index d7735bf1ac9..5158c6341c0 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c @@ -254,9 +254,9 @@ static void fetch_emit_run( struct draw_pt_middle_end *middle, /* XXX: Draw arrays path to avoid re-emitting index list again and * again. */ - draw->render->draw( draw->render, - draw_elts, - draw_count ); + draw->render->draw_elements( draw->render, + draw_elts, + draw_count ); /* Done -- that was easy, wasn't it: */ @@ -363,9 +363,9 @@ static boolean fetch_emit_run_linear_elts( struct draw_pt_middle_end *middle, /* XXX: Draw arrays path to avoid re-emitting index list again and * again. */ - draw->render->draw( draw->render, - draw_elts, - draw_count ); + draw->render->draw_elements( draw->render, + draw_elts, + draw_count ); /* Done -- that was easy, wasn't it: */ diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c index cbb5b6c9605..f0fc591bf55 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c @@ -307,9 +307,9 @@ fse_run(struct draw_pt_middle_end *middle, draw->render->unmap_vertices( draw->render, 0, (ushort)(fetch_count - 1) ); - draw->render->draw( draw->render, - draw_elts, - draw_count ); + draw->render->draw_elements( draw->render, + draw_elts, + draw_count ); draw->render->release_vertices( draw->render ); @@ -357,9 +357,9 @@ static boolean fse_run_linear_elts( struct draw_pt_middle_end *middle, hw_verts ); - draw->render->draw( draw->render, - draw_elts, - draw_count ); + draw->render->draw_elements( draw->render, + draw_elts, + draw_count ); draw->render->unmap_vertices( draw->render, 0, (ushort)(count - 1) ); diff --git a/src/gallium/auxiliary/draw/draw_vbuf.h b/src/gallium/auxiliary/draw/draw_vbuf.h index cccd3bf4358..83ae26a9c2b 100644 --- a/src/gallium/auxiliary/draw/draw_vbuf.h +++ b/src/gallium/auxiliary/draw/draw_vbuf.h @@ -98,14 +98,14 @@ struct vbuf_render { boolean (*set_primitive)( struct vbuf_render *, unsigned prim ); /** - * DrawElements, note indices are ushort. The driver must complete - * this call, if necessary splitting the index list itself. + * Draw indexed primitives. Note that indices are ushort. The driver + * must complete this call, if necessary splitting the index list itself. */ - void (*draw)( struct vbuf_render *, - const ushort *indices, - uint nr_indices ); + void (*draw_elements)( struct vbuf_render *, + const ushort *indices, + uint nr_indices ); - /* Draw Arrays path too. + /* Draw non-indexed primitives. */ void (*draw_arrays)( struct vbuf_render *, unsigned start, diff --git a/src/gallium/drivers/i915/i915_prim_vbuf.c b/src/gallium/drivers/i915/i915_prim_vbuf.c index df9e68af4fc..f8665acbe18 100644 --- a/src/gallium/drivers/i915/i915_prim_vbuf.c +++ b/src/gallium/drivers/i915/i915_prim_vbuf.c @@ -544,9 +544,9 @@ draw_calc_nr_indices(uint nr_indices, unsigned type) } static void -i915_vbuf_render_draw(struct vbuf_render *render, - const ushort *indices, - uint nr_indices) +i915_vbuf_render_draw_elements(struct vbuf_render *render, + const ushort *indices, + uint nr_indices) { struct i915_vbuf_render *i915_render = i915_vbuf_render(render); struct i915_context *i915 = i915_render->i915; @@ -638,7 +638,7 @@ i915_vbuf_render_create(struct i915_context *i915) i915_render->base.map_vertices = i915_vbuf_render_map_vertices; i915_render->base.unmap_vertices = i915_vbuf_render_unmap_vertices; i915_render->base.set_primitive = i915_vbuf_render_set_primitive; - i915_render->base.draw = i915_vbuf_render_draw; + i915_render->base.draw_elements = i915_vbuf_render_draw_elements; i915_render->base.draw_arrays = i915_vbuf_render_draw_arrays; i915_render->base.release_vertices = i915_vbuf_render_release_vertices; i915_render->base.destroy = i915_vbuf_render_destroy; diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c index 4d775735421..f6a424f25a8 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c @@ -131,7 +131,7 @@ static INLINE const_float4_ptr get_vert( const void *vertex_buffer, * draw elements / indexed primitives */ static void -lp_setup_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) +lp_setup_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr) { struct lp_setup_context *setup = lp_setup_context(vbr); const unsigned stride = setup->vertex_info->size * sizeof(float); @@ -543,7 +543,7 @@ lp_setup_init_vbuf(struct lp_setup_context *setup) setup->base.map_vertices = lp_setup_map_vertices; setup->base.unmap_vertices = lp_setup_unmap_vertices; setup->base.set_primitive = lp_setup_set_primitive; - setup->base.draw = lp_setup_draw; + setup->base.draw_elements = lp_setup_draw_elements; setup->base.draw_arrays = lp_setup_draw_arrays; setup->base.release_vertices = lp_setup_release_vertices; setup->base.destroy = lp_setup_vbuf_destroy; diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 7c3a7902a49..d04c8ea81e6 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -913,9 +913,9 @@ static void r500_render_draw_arrays(struct vbuf_render* render, END_CS; } -static void r500_render_draw(struct vbuf_render* render, - const ushort* indices, - uint count) +static void r500_render_draw_elements(struct vbuf_render* render, + const ushort* indices, + uint count) { struct r300_render* r300render = r300_render(render); struct r300_context* r300 = r300render->r300; @@ -960,19 +960,19 @@ static void r300_render_draw_arrays(struct vbuf_render* render, } } -static void r300_render_draw(struct vbuf_render* render, - const ushort* indices, - uint count) +static void r300_render_draw_elements(struct vbuf_render* render, + const ushort* indices, + uint count) { struct r300_context* r300 = r300_render(render)->r300; if (!r300->stencil_ref_bf_fallback) { - r500_render_draw(render, indices, count); + r500_render_draw_elements(render, indices, count); } else { r300_begin_stencil_ref_fallback(r300); - r500_render_draw(render, indices, count); + r500_render_draw_elements(render, indices, count); r300_switch_stencil_ref_side(r300); - r500_render_draw(render, indices, count); + r500_render_draw_elements(render, indices, count); r300_end_stencil_ref_fallback(r300); } } @@ -998,10 +998,10 @@ static struct vbuf_render* r300_render_create(struct r300_context* r300) r300render->base.unmap_vertices = r300_render_unmap_vertices; r300render->base.set_primitive = r300_render_set_primitive; if (r300->screen->caps.is_r500) { - r300render->base.draw = r500_render_draw; + r300render->base.draw_elements = r500_render_draw_elements; r300render->base.draw_arrays = r500_render_draw_arrays; } else { - r300render->base.draw = r300_render_draw; + r300render->base.draw_elements = r300_render_draw_elements; r300render->base.draw_arrays = r300_render_draw_arrays; } r300render->base.release_vertices = r300_render_release_vertices; diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c index 0168b320371..db0d1755103 100644 --- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c +++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c @@ -158,7 +158,7 @@ static INLINE cptrf4 get_vert( const void *vertex_buffer, * draw elements / indexed primitives */ static void -sp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) +sp_vbuf_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr) { struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); struct softpipe_context *softpipe = cvbr->softpipe; @@ -572,7 +572,7 @@ sp_create_vbuf_backend(struct softpipe_context *sp) cvbr->base.map_vertices = sp_vbuf_map_vertices; cvbr->base.unmap_vertices = sp_vbuf_unmap_vertices; cvbr->base.set_primitive = sp_vbuf_set_primitive; - cvbr->base.draw = sp_vbuf_draw; + cvbr->base.draw_elements = sp_vbuf_draw_elements; cvbr->base.draw_arrays = sp_vbuf_draw_arrays; cvbr->base.release_vertices = sp_vbuf_release_vertices; cvbr->base.destroy = sp_vbuf_destroy; diff --git a/src/gallium/drivers/svga/svga_swtnl_backend.c b/src/gallium/drivers/svga/svga_swtnl_backend.c index b0cbead8a5c..ff3da842729 100644 --- a/src/gallium/drivers/svga/svga_swtnl_backend.c +++ b/src/gallium/drivers/svga/svga_swtnl_backend.c @@ -240,9 +240,9 @@ svga_vbuf_render_draw_arrays( struct vbuf_render *render, static void -svga_vbuf_render_draw( struct vbuf_render *render, - const ushort *indices, - uint nr_indices) +svga_vbuf_render_draw_elements( struct vbuf_render *render, + const ushort *indices, + uint nr_indices) { struct svga_vbuf_render *svga_render = svga_vbuf_render(render); struct svga_context *svga = svga_render->svga; @@ -341,7 +341,7 @@ svga_vbuf_render_create( struct svga_context *svga ) svga_render->base.map_vertices = svga_vbuf_render_map_vertices; svga_render->base.unmap_vertices = svga_vbuf_render_unmap_vertices; svga_render->base.set_primitive = svga_vbuf_render_set_primitive; - svga_render->base.draw = svga_vbuf_render_draw; + svga_render->base.draw_elements = svga_vbuf_render_draw_elements; svga_render->base.draw_arrays = svga_vbuf_render_draw_arrays; svga_render->base.release_vertices = svga_vbuf_render_release_vertices; svga_render->base.destroy = svga_vbuf_render_destroy; |