struct pipe_vertex_buffer *vbuffer,
struct pipe_vertex_element velements[])
{
- struct pipe_context *pipe = ctx->st->pipe;
+ struct st_context *st = st_context(ctx);
+ struct pipe_context *pipe = st->pipe;
GLuint attr;
const GLubyte *offset0 = NULL;
struct pipe_vertex_buffer vbuffer[],
struct pipe_vertex_element velements[])
{
- struct pipe_context *pipe = ctx->st->pipe;
+ struct st_context *st = st_context(ctx);
+ struct pipe_context *pipe = st->pipe;
GLuint attr;
for (attr = 0; attr < vpv->num_inputs; attr++) {
GLuint min_index,
GLuint max_index)
{
- struct pipe_context *pipe = ctx->st->pipe;
+ struct st_context *st = st_context(ctx);
+ struct pipe_context *pipe = st->pipe;
const struct st_vertex_program *vp;
const struct st_vp_varient *vpv;
struct pipe_vertex_buffer vbuffer[PIPE_MAX_SHADER_INPUTS];
vertDataEdgeFlags = arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj &&
arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj->Name;
- if (vertDataEdgeFlags != ctx->st->vertdata_edgeflags) {
- ctx->st->vertdata_edgeflags = vertDataEdgeFlags;
- ctx->st->dirty.st |= ST_NEW_EDGEFLAGS_DATA;
+ if (vertDataEdgeFlags != st->vertdata_edgeflags) {
+ st->vertdata_edgeflags = vertDataEdgeFlags;
+ st->dirty.st |= ST_NEW_EDGEFLAGS_DATA;
}
- st_validate_state(ctx->st);
+ st_validate_state(st);
/* must get these after state validation! */
- vp = ctx->st->vp;
- vpv = ctx->st->vp_varient;
+ vp = st->vp;
+ vpv = st->vp_varient;
#if 0
if (MESA_VERBOSE & VERBOSE_GLSL) {
#endif
pipe->set_vertex_buffers(pipe, num_vbuffers, vbuffer);
- cso_set_vertex_elements(ctx->st->cso_context, num_velements, velements);
+ cso_set_vertex_elements(st->cso_context, num_velements, velements);
if (num_vbuffers == 0 || num_velements == 0)
return;
for (i = 0; i < nr_prims; i++) {
prim = translate_prim( ctx, prims[i].mode );
- pipe->draw_range_elements(pipe, indexBuf, indexSize,
+ pipe->draw_range_elements(pipe, indexBuf, indexSize, 0,
min_index, max_index, prim,
prims[i].start + indexOffset, prims[i].count);
}
prim = translate_prim( ctx, prims[i].mode );
if (prims[i].num_instances == 1) {
- pipe->draw_elements(pipe, indexBuf, indexSize, prim,
+ pipe->draw_elements(pipe, indexBuf, indexSize, 0, prim,
prims[i].start + indexOffset,
prims[i].count);
}
else {
- pipe->draw_elements_instanced(pipe, indexBuf, indexSize, prim,
+ pipe->draw_elements_instanced(pipe, indexBuf, indexSize, 0, prim,
prims[i].start + indexOffset,
prims[i].count,
0, prims[i].num_instances);