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;
}
0,
vertex_count - 1 );
- render->draw(render,
- elts,
- count);
+ render->draw_elements(render,
+ elts,
+ count);
render->release_vertices(render);
}
/* 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:
*/
/* 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:
*/
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 );
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) );
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,
}
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;
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;
* 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);
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;
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;
}
}
-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);
}
}
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;
* 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;
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;
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;
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;