Split from patch implementing ARB_draw_indirect.
v2: Const-qualify the struct gl_buffer_object *indirect argument.
v3: Fix up some more draw calls for new argument.
v4: Fix up rebase conflicts in i965.
v5: Undo const-qualification
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
GLboolean index_bounds_valid,
GLuint min_index,
GLuint max_index,
- struct gl_transform_feedback_object *unused_tfb_object)
+ struct gl_transform_feedback_object *unused_tfb_object,
+ struct gl_buffer_object *indirect )
{
struct brw_context *brw = brw_context(ctx);
const struct gl_client_array **arrays = ctx->Array._DrawArrays;
GLboolean index_bounds_valid,
GLuint min_index,
GLuint max_index,
- struct gl_transform_feedback_object *unused_tfb_object);
+ struct gl_transform_feedback_object *unused_tfb_object,
+ struct gl_buffer_object *indirect );
void brw_draw_init( struct brw_context *brw );
void brw_draw_destroy( struct brw_context *brw );
/* Cut index should work for primitive restart, so use it
*/
brw->prim_restart.enable_cut_index = true;
- brw_draw_prims(ctx, prims, nr_prims, ib, GL_FALSE, -1, -1, NULL);
+ brw_draw_prims(ctx, prims, nr_prims, ib, GL_FALSE, -1, -1, NULL, NULL);
brw->prim_restart.enable_cut_index = false;
} else {
/* Not all the primitive draw modes are supported by the cut index,
const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid,
GLuint min_index, GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount);
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect);
static GLboolean
vbo_maybe_split(struct gl_context *ctx, const struct gl_client_array **arrays,
const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid,
GLuint min_index, GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount)
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect)
{
struct nouveau_render_state *render = to_render_state(ctx);
const struct gl_client_array **arrays = ctx->Array._DrawArrays;
const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid,
GLuint min_index, GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount)
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
if (nctx->fallback == HWTNL)
TAG(vbo_render_prims)(ctx, prims, nr_prims, ib,
index_bounds_valid, min_index, max_index,
- tfb_vertcount);
+ tfb_vertcount, indirect);
if (nctx->fallback == SWTNL)
_tnl_vbo_draw_prims(ctx, prims, nr_prims, ib,
index_bounds_valid, min_index, max_index,
- tfb_vertcount);
+ tfb_vertcount, indirect);
}
void
* st_feedback_draw_vbo doesn't check for that flag. */
ctx->Array._DrawArrays = rs->arrays;
st_feedback_draw_vbo(ctx, &rs->prim, 1, NULL, GL_TRUE, 0, 1,
- NULL);
+ NULL, NULL);
ctx->Array._DrawArrays = saved_arrays;
/* restore draw's rasterization stage depending on rendermode */
GLboolean index_bounds_valid,
GLuint min_index,
GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount)
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect)
{
struct st_context *st = st_context(ctx);
struct pipe_index_buffer ibuffer = {0};
GLboolean index_bounds_valid,
GLuint min_index,
GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount);
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect);
extern void
st_feedback_draw_vbo(struct gl_context *ctx,
GLboolean index_bounds_valid,
GLuint min_index,
GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount);
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect);
/**
* When drawing with VBOs, the addresses specified with
GLboolean index_bounds_valid,
GLuint min_index,
GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount)
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect)
{
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
GLboolean index_bounds_valid,
GLuint min_index,
GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount)
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect)
{
const struct gl_client_array **arrays = ctx->Array._DrawArrays;
GLboolean index_bounds_valid,
GLuint min_index,
GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount );
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect );
extern void
_tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4]);
GLboolean index_bounds_valid,
GLuint min_index,
GLuint max_index,
- struct gl_transform_feedback_object *tfb_vertcount );
+ struct gl_transform_feedback_object *tfb_vertcount,
+ struct gl_buffer_object *indirect );
} else {
/* Call driver directly for draw_prims */
vbo->draw_prims(ctx, prim, nr_prims, ib,
- index_bounds_valid, min_index, max_index, NULL);
+ index_bounds_valid, min_index, max_index, NULL, NULL);
}
}
/* draw one or two prims */
check_buffers_are_unmapped(exec->array.inputs);
vbo->draw_prims(ctx, prim, primCount, NULL,
- GL_TRUE, start, start + count - 1, NULL);
+ GL_TRUE, start, start + count - 1, NULL, NULL);
}
}
else {
check_buffers_are_unmapped(exec->array.inputs);
vbo->draw_prims(ctx, prim, 1, NULL,
GL_TRUE, start, start + count - 1,
- NULL);
+ NULL, NULL);
}
if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
check_buffers_are_unmapped(exec->array.inputs);
vbo->draw_prims(ctx, prim, 1, NULL,
- GL_TRUE, 0, 0, obj);
+ GL_TRUE, 0, 0, obj, NULL);
if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
_mesa_flush(ctx);
GL_TRUE,
0,
exec->vtx.vert_count - 1,
- NULL);
+ NULL, NULL);
/* If using a real VBO, get new storage -- unless asked not to.
*/
(temp_prim.count == sub_prim->count)) {
draw_prims_func(ctx, &temp_prim, 1, ib,
GL_TRUE, sub_prim->min_index, sub_prim->max_index,
- NULL);
+ NULL, NULL);
} else {
draw_prims_func(ctx, &temp_prim, 1, ib,
GL_FALSE, -1, -1,
- NULL);
+ NULL, NULL);
}
}
if (sub_end_index >= end_index) {
GL_TRUE,
0,
max_index - min_index,
- NULL );
+ NULL, NULL );
ctx->Array._DrawArrays = saved_arrays;
ctx->NewDriverState |= ctx->DriverFlags.NewArray;
GL_TRUE,
0, /* Node is a VBO, so this is ok */
node->count - 1,
- NULL);
+ NULL, NULL);
}
}
GL_TRUE,
0,
copy->dstbuf_nr - 1,
- NULL );
+ NULL, NULL );
ctx->Array._DrawArrays = saved_arrays;
ctx->NewDriverState |= ctx->DriverFlags.NewArray;
!split->ib,
split->min_index,
split->max_index,
- NULL);
+ NULL, NULL);
ctx->Array._DrawArrays = saved_arrays;
ctx->NewDriverState |= ctx->DriverFlags.NewArray;