diff options
author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2013-04-05 12:12:08 +0200 |
---|---|---|
committer | Chris Forbes <chrisf@ijw.co.nz> | 2013-11-25 22:01:35 +1300 |
commit | 80ac616fca709ab10f7aae062d96ec18d05097a7 (patch) | |
tree | b144d9b4029a3ded710cbfe73d5c0dcf5f617ab9 /src/mesa/vbo | |
parent | eb0892b4b115a36ffb9f0904e418ec62a182427c (diff) | |
download | external_mesa3d-80ac616fca709ab10f7aae062d96ec18d05097a7.zip external_mesa3d-80ac616fca709ab10f7aae062d96ec18d05097a7.tar.gz external_mesa3d-80ac616fca709ab10f7aae062d96ec18d05097a7.tar.bz2 |
mesa: add indirect drawing buffer parameter to draw functions
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>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r-- | src/mesa/vbo/vbo.h | 3 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 8 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_draw.c | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_primitive_restart.c | 4 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_rebase.c | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_save_draw.c | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_split_copy.c | 2 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_split_inplace.c | 2 |
8 files changed, 13 insertions, 12 deletions
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index c4472e9..827917f 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -89,7 +89,8 @@ typedef void (*vbo_draw_func)( 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 ); diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index d723823..a2c0c7d 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -583,7 +583,7 @@ vbo_handle_primitive_restart(struct gl_context *ctx, } 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); } } @@ -648,7 +648,7 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start, /* 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 { @@ -659,7 +659,7 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start, 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) { @@ -1490,7 +1490,7 @@ vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode, 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); diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 1075bd5..a96502f 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -403,7 +403,7 @@ vbo_exec_vtx_flush(struct vbo_exec_context *exec, GLboolean keepUnmapped) GL_TRUE, 0, exec->vtx.vert_count - 1, - NULL); + NULL, NULL); /* If using a real VBO, get new storage -- unless asked not to. */ diff --git a/src/mesa/vbo/vbo_primitive_restart.c b/src/mesa/vbo/vbo_primitive_restart.c index 418f882..e5c93ac 100644 --- a/src/mesa/vbo/vbo_primitive_restart.c +++ b/src/mesa/vbo/vbo_primitive_restart.c @@ -214,11 +214,11 @@ vbo_sw_primitive_restart(struct gl_context *ctx, (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) { diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/vbo/vbo_rebase.c index e825872..f63c473 100644 --- a/src/mesa/vbo/vbo_rebase.c +++ b/src/mesa/vbo/vbo_rebase.c @@ -237,7 +237,7 @@ void vbo_rebase_prims( struct gl_context *ctx, GL_TRUE, 0, max_index - min_index, - NULL ); + NULL, NULL ); ctx->Array._DrawArrays = saved_arrays; ctx->NewDriverState |= ctx->DriverFlags.NewArray; diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index b4c9176..e961c1d 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -313,7 +313,7 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) GL_TRUE, 0, /* Node is a VBO, so this is ok */ node->count - 1, - NULL); + NULL, NULL); } } diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c index 2175c8a..9e391a3 100644 --- a/src/mesa/vbo/vbo_split_copy.c +++ b/src/mesa/vbo/vbo_split_copy.c @@ -201,7 +201,7 @@ flush( struct copy_context *copy ) GL_TRUE, 0, copy->dstbuf_nr - 1, - NULL ); + NULL, NULL ); ctx->Array._DrawArrays = saved_arrays; ctx->NewDriverState |= ctx->DriverFlags.NewArray; diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c index d044297..de00fc8 100644 --- a/src/mesa/vbo/vbo_split_inplace.c +++ b/src/mesa/vbo/vbo_split_inplace.c @@ -94,7 +94,7 @@ static void flush_vertex( struct split_context *split ) !split->ib, split->min_index, split->max_index, - NULL); + NULL, NULL); ctx->Array._DrawArrays = saved_arrays; ctx->NewDriverState |= ctx->DriverFlags.NewArray; |