*/
static bool brw_try_draw_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
- const struct _mesa_prim *prim,
+ const struct _mesa_prim *prims,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLuint min_index,
intel_batchbuffer_require_space(brw, estimated_max_prim_size, false);
intel_batchbuffer_save_state(brw);
- if (brw->num_instances != prim[i].num_instances) {
- brw->num_instances = prim[i].num_instances;
+ if (brw->num_instances != prims[i].num_instances) {
+ brw->num_instances = prims[i].num_instances;
brw->state.dirty.brw |= BRW_NEW_VERTICES;
}
- if (brw->basevertex != prim[i].basevertex) {
- brw->basevertex = prim[i].basevertex;
+ if (brw->basevertex != prims[i].basevertex) {
+ brw->basevertex = prims[i].basevertex;
brw->state.dirty.brw |= BRW_NEW_VERTICES;
}
if (brw->gen < 6)
- brw_set_prim(brw, &prim[i]);
+ brw_set_prim(brw, &prims[i]);
else
- gen6_set_prim(brw, &prim[i]);
+ gen6_set_prim(brw, &prims[i]);
retry:
/* Note that before the loop, brw->state.dirty.brw was set to != 0, and
brw_upload_state(brw);
}
- brw_emit_prim(brw, &prim[i], brw->primitive);
+ brw_emit_prim(brw, &prims[i], brw->primitive);
brw->no_batch_wrap = false;
}
void brw_draw_prims( struct gl_context *ctx,
- const struct _mesa_prim *prim,
+ const struct _mesa_prim *prims,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid,
return;
/* Handle primitive restart if needed */
- if (brw_handle_primitive_restart(ctx, prim, nr_prims, ib)) {
+ if (brw_handle_primitive_restart(ctx, prims, nr_prims, ib)) {
/* The draw was handled, so we can exit now */
return;
}
* to upload.
*/
if (!vbo_all_varyings_in_vbos(arrays) && !index_bounds_valid)
- vbo_get_minmax_indices(ctx, prim, ib, &min_index, &max_index, nr_prims);
+ vbo_get_minmax_indices(ctx, prims, ib, &min_index, &max_index, nr_prims);
/* Do GL_SELECT and GL_FEEDBACK rendering using swrast, even though it
* won't support all the extensions we support.
_mesa_lookup_enum_by_nr(ctx->RenderMode));
_swsetup_Wakeup(ctx);
_tnl_wakeup(ctx);
- _tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
+ _tnl_draw_prims(ctx, arrays, prims, nr_prims, ib, min_index, max_index);
return;
}
* manage it. swrast doesn't support our featureset, so we can't fall back
* to it.
*/
- brw_try_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
+ brw_try_draw_prims(ctx, arrays, prims, nr_prims, ib, min_index, max_index);
}
void brw_draw_init( struct brw_context *brw )
*/
GLboolean
brw_handle_primitive_restart(struct gl_context *ctx,
- const struct _mesa_prim *prim,
+ const struct _mesa_prim *prims,
GLuint nr_prims,
const struct _mesa_index_buffer *ib)
{
*/
brw->prim_restart.in_progress = true;
- if (can_cut_index_handle_prims(ctx, prim, nr_prims, ib)) {
+ if (can_cut_index_handle_prims(ctx, prims, nr_prims, ib)) {
/* Cut index should work for primitive restart, so use it
*/
brw->prim_restart.enable_cut_index = true;
- brw_draw_prims(ctx, prim, nr_prims, ib, GL_FALSE, -1, -1, NULL);
+ brw_draw_prims(ctx, prims, nr_prims, ib, GL_FALSE, -1, -1, NULL);
brw->prim_restart.enable_cut_index = false;
} else {
/* Not all the primitive draw modes are supported by the cut index,
* so take the software path
*/
- vbo_sw_primitive_restart(ctx, prim, nr_prims, ib);
+ vbo_sw_primitive_restart(ctx, prims, nr_prims, ib);
}
brw->prim_restart.in_progress = false;