diff options
author | Brian Paul <[email protected]> | 2018-01-31 16:19:07 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-02-01 12:17:59 -0700 |
commit | 1bdbeae17ce62f52b0ac19960c71078dff7a2da2 (patch) | |
tree | 107e4db3e855da7ff3ec47c3d3d1c586af94e763 /src/mesa/vbo | |
parent | 1b7ad3ae974a8436edcbefcd5a52faa43c73ea8c (diff) |
vbo: change an argument in vbo_draw_indirect_prims()
In vbo_draw_indirect_prims() pass the 'indirect_data' argument to
vbo->draw_prims(). All the callers are passing ctx->DrawIndirectBuffer
so this should be no functional change. Add a (temporary) assertion to
be sure.
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r-- | src/mesa/vbo/vbo_context.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index f516c678432..3f55e27f9be 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context.c @@ -140,15 +140,19 @@ init_mat_currval(struct gl_context *ctx) } } + +/** + * Fallback for when a driver does not call vbo_set_indirect_draw_func(). + */ static void vbo_draw_indirect_prims(struct gl_context *ctx, GLuint mode, - struct gl_buffer_object *indirect_data, + struct gl_buffer_object *indirect_buffer, GLsizeiptr indirect_offset, unsigned draw_count, unsigned stride, - struct gl_buffer_object *indirect_params, - GLsizeiptr indirect_params_offset, + struct gl_buffer_object *indirect_draw_count_buffer, + GLsizeiptr indirect_draw_count_offset, const struct _mesa_index_buffer *ib) { struct vbo_context *vbo = vbo_context(ctx); @@ -160,7 +164,7 @@ vbo_draw_indirect_prims(struct gl_context *ctx, _mesa_error(ctx, GL_OUT_OF_MEMORY, "gl%sDraw%sIndirect%s", (draw_count > 1) ? "Multi" : "", ib ? "Elements" : "Arrays", - indirect_params ? "CountARB" : ""); + indirect_buffer ? "CountARB" : ""); return; } @@ -174,10 +178,13 @@ vbo_draw_indirect_prims(struct gl_context *ctx, prim[i].draw_id = i; } + /* This should always be true at this time */ + assert(indirect_buffer == ctx->DrawIndirectBuffer); + vbo->draw_prims(ctx, prim, draw_count, ib, false, 0, ~0, NULL, 0, - ctx->DrawIndirectBuffer); + indirect_buffer); free(prim); } |