*/
/**
- * Draw a number of primitives.
- * \param prims array [nr_prims] describing what to draw (prim type,
- * vertex count, first index, instance count, etc).
- * \param ib index buffer for indexed drawing, NULL for array drawing
- * \param index_bounds_valid are min_index and max_index valid?
- * \param min_index lowest vertex index used
- * \param max_index highest vertex index used
- * \param num_instances instance count from ARB_draw_instanced
- * \param base_instance base instance from ARB_base_instance
- */
- void (*Draw)(struct gl_context *ctx,
- const struct _mesa_prim *prims, unsigned nr_prims,
- const struct _mesa_index_buffer *ib,
- bool index_bounds_valid,
- bool primitive_restart,
- unsigned restart_index,
- unsigned min_index, unsigned max_index,
- unsigned num_instances, unsigned base_instance);
-
- /**
* Optimal Gallium version of Draw() that doesn't require translation
* of draw info in the state tracker.
*
max_index = draws[i].start + draws[i].count - 1;
}
- ctx->Driver.Draw(ctx, &prim, 1, index_size ? &ib : NULL,
- index_bounds_valid, info->primitive_restart,
- info->restart_index, min_index, max_index,
- info->instance_count, info->start_instance);
+ st_feedback_draw_vbo(ctx, &prim, 1, index_size ? &ib : NULL,
+ index_bounds_valid, info->primitive_restart,
+ info->restart_index, min_index, max_index,
+ info->instance_count, info->start_instance);
}
return;
}
}
if (num_prims)
- ctx->Driver.Draw(ctx, prim, num_prims, index_size ? &ib : NULL,
- index_bounds_valid, info->primitive_restart,
- info->restart_index, min_index, max_index,
- info->instance_count, info->start_instance);
+ st_feedback_draw_vbo(ctx, prim, num_prims, index_size ? &ib : NULL,
+ index_bounds_valid, info->primitive_restart,
+ info->restart_index, min_index, max_index,
+ info->instance_count, info->start_instance);
FREE_PRIMS(prim, num_draws);
}
st->selection_stage = draw_glselect_stage(ctx, draw);
draw_set_rasterize_stage(draw, st->selection_stage);
/* Plug in new vbo draw function */
- ctx->Driver.Draw = st_feedback_draw_vbo;
ctx->Driver.DrawGallium = _mesa_draw_gallium_fallback;
ctx->Driver.DrawGalliumMultiMode = _mesa_draw_gallium_multimode_fallback;
}
st->feedback_stage = draw_glfeedback_stage(ctx, draw);
draw_set_rasterize_stage(draw, st->feedback_stage);
/* Plug in new vbo draw function */
- ctx->Driver.Draw = st_feedback_draw_vbo;
ctx->Driver.DrawGallium = _mesa_draw_gallium_fallback;
ctx->Driver.DrawGalliumMultiMode = _mesa_draw_gallium_multimode_fallback;
/* need to generate/use a vertex program that emits pos/color/tex */
st_init_draw_functions(struct pipe_screen *screen,
struct dd_function_table *functions)
{
- functions->Draw = NULL;
functions->DrawGallium = st_draw_gallium;
functions->DrawGalliumMultiMode = st_draw_gallium_multimode;