frontend->prepare( frontend, prim, middle, opt );
- frontend->run(frontend,
- draw_pt_elt_func(draw),
- draw_pt_elt_ptr(draw, start),
- draw->pt.user.eltBias,
- count);
+ frontend->run(frontend, start, count);
frontend->finish( frontend );
unsigned opt );
void (*run)( struct draw_pt_front_end *,
- pt_elt_func elt_func,
- const void *elt_ptr,
- int elt_bias,
+ unsigned start,
unsigned count );
void (*finish)( struct draw_pt_front_end * );
}
static void FUNC(struct draw_pt_front_end *frontend,
- pt_elt_func get_elt,
- const void *elts,
- int elt_bias,
+ unsigned start,
unsigned count)
{
struct varray_frontend *varray = (struct varray_frontend *)frontend;
- unsigned start = (unsigned) ((char *) elts - (char *) NULL);
unsigned j;
unsigned first, incr;
- assert(elt_bias == 0);
-
draw_pt_split_prim(varray->input_prim, &first, &incr);
/* Sanitize primitive length:
static INLINE void
vcache_check_run( struct draw_pt_front_end *frontend,
- pt_elt_func get_elt,
- const void *elts,
- int elt_bias,
+ unsigned draw_start,
unsigned draw_count )
{
struct vcache_frontend *vcache = (struct vcache_frontend *)frontend;
const unsigned min_index = draw->pt.user.min_index;
const unsigned max_index = draw->pt.user.max_index;
const unsigned index_size = draw->pt.user.eltSize;
+ const int elt_bias = draw->pt.user.eltBias;
unsigned fetch_count;
const ushort *transformed_elts;
ushort *storage = NULL;
boolean ok = FALSE;
+ const void *elts = draw_pt_elt_ptr(draw, draw_start);
/* debug: verify indexes are in range [min_index, max_index] */
if (0) {
fetch_count, draw_count);
fail:
- vcache_run( frontend, get_elt, elts, elt_bias, draw_count );
+ vcache_run( frontend, draw_start, draw_count );
}
#define FUNC_VARS \
struct draw_pt_front_end *frontend, \
- pt_elt_func get_elt, \
- const void *elts, \
- int elt_bias, \
+ unsigned start, \
unsigned count
#define LOCAL_VARS \
struct vcache_frontend *vcache = (struct vcache_frontend *) frontend; \
struct draw_context *draw = vcache->draw; \
const unsigned prim = vcache->input_prim; \
+ const void *elts = draw_pt_elt_ptr(draw, start); \
+ pt_elt_func get_elt = draw_pt_elt_func(draw); \
+ const int elt_bias = draw->pt.user.eltBias; \
const boolean last_vertex_last = !(draw->rasterizer->flatshade && \
draw->rasterizer->flatshade_first); \
const unsigned prim_flags = 0x0;