summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_array.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c39
1 files changed, 14 insertions, 25 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 50299373365..18b0032ae84 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -395,7 +395,6 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
GLsizei count, GLuint numInstances, GLuint baseInstance,
GLuint drawID)
{
- struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_prim prim;
if (skip_validated_draw(ctx))
@@ -417,8 +416,8 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
prim.start = start;
prim.count = count;
- vbo->draw_prims(ctx, &prim, 1, NULL,
- GL_TRUE, start, start + count - 1, NULL, 0, NULL);
+ ctx->Driver.Draw(ctx, &prim, 1, NULL,
+ GL_TRUE, start, start + count - 1, NULL, 0, NULL);
if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
_mesa_flush(ctx);
@@ -808,7 +807,6 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
GLint basevertex, GLuint numInstances,
GLuint baseInstance)
{
- struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_index_buffer ib;
struct _mesa_prim prim;
@@ -872,8 +870,8 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
* for the latter case elsewhere.
*/
- vbo->draw_prims(ctx, &prim, 1, &ib,
- index_bounds_valid, start, end, NULL, 0, NULL);
+ ctx->Driver.Draw(ctx, &prim, 1, &ib,
+ index_bounds_valid, start, end, NULL, 0, NULL);
if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
_mesa_flush(ctx);
@@ -1237,7 +1235,6 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
const GLvoid * const *indices,
GLsizei primcount, const GLint *basevertex)
{
- struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_index_buffer ib;
struct _mesa_prim *prim;
unsigned int index_type_size = sizeof_ib_type(type);
@@ -1323,8 +1320,8 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
prim[i].basevertex = 0;
}
- vbo->draw_prims(ctx, prim, primcount, &ib,
- false, 0, ~0, NULL, 0, NULL);
+ ctx->Driver.Draw(ctx, prim, primcount, &ib,
+ false, 0, ~0, NULL, 0, NULL);
}
else {
/* render one prim at a time */
@@ -1353,7 +1350,7 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
else
prim[0].basevertex = 0;
- vbo->draw_prims(ctx, prim, 1, &ib, false, 0, ~0, NULL, 0, NULL);
+ ctx->Driver.Draw(ctx, prim, 1, &ib, false, 0, ~0, NULL, 0, NULL);
}
}
@@ -1431,7 +1428,6 @@ vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj,
GLuint stream, GLuint numInstances)
{
- struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_prim prim;
if (_mesa_is_no_error_enabled(ctx)) {
@@ -1477,7 +1473,7 @@ vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode,
* (like in DrawArrays), but we have no way to know how many vertices
* will be rendered. */
- vbo->draw_prims(ctx, &prim, 1, NULL, GL_FALSE, 0, ~0, obj, stream, NULL);
+ ctx->Driver.Draw(ctx, &prim, 1, NULL, GL_FALSE, 0, ~0, obj, stream, NULL);
if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
_mesa_flush(ctx);
@@ -1561,11 +1557,9 @@ static void
vbo_validated_drawarraysindirect(struct gl_context *ctx,
GLenum mode, const GLvoid *indirect)
{
- struct vbo_context *vbo = vbo_context(ctx);
-
vbo_bind_arrays(ctx);
- vbo->draw_indirect_prims(ctx, mode,
+ ctx->Driver.DrawIndirect(ctx, mode,
ctx->DrawIndirectBuffer, (GLsizeiptr) indirect,
1 /* draw_count */ , 16 /* stride */ ,
NULL, 0, NULL);
@@ -1581,7 +1575,6 @@ vbo_validated_multidrawarraysindirect(struct gl_context *ctx,
const GLvoid *indirect,
GLsizei primcount, GLsizei stride)
{
- struct vbo_context *vbo = vbo_context(ctx);
GLsizeiptr offset = (GLsizeiptr) indirect;
if (primcount == 0)
@@ -1589,7 +1582,7 @@ vbo_validated_multidrawarraysindirect(struct gl_context *ctx,
vbo_bind_arrays(ctx);
- vbo->draw_indirect_prims(ctx, mode, ctx->DrawIndirectBuffer, offset,
+ ctx->Driver.DrawIndirect(ctx, mode, ctx->DrawIndirectBuffer, offset,
primcount, stride, NULL, 0, NULL);
if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH)
@@ -1602,7 +1595,6 @@ vbo_validated_drawelementsindirect(struct gl_context *ctx,
GLenum mode, GLenum type,
const GLvoid *indirect)
{
- struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_index_buffer ib;
vbo_bind_arrays(ctx);
@@ -1612,7 +1604,7 @@ vbo_validated_drawelementsindirect(struct gl_context *ctx,
ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = NULL;
- vbo->draw_indirect_prims(ctx, mode,
+ ctx->Driver.DrawIndirect(ctx, mode,
ctx->DrawIndirectBuffer, (GLsizeiptr) indirect,
1 /* draw_count */ , 20 /* stride */ ,
NULL, 0, &ib);
@@ -1628,7 +1620,6 @@ vbo_validated_multidrawelementsindirect(struct gl_context *ctx,
const GLvoid *indirect,
GLsizei primcount, GLsizei stride)
{
- struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_index_buffer ib;
GLsizeiptr offset = (GLsizeiptr) indirect;
@@ -1644,7 +1635,7 @@ vbo_validated_multidrawelementsindirect(struct gl_context *ctx,
ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = NULL;
- vbo->draw_indirect_prims(ctx, mode,
+ ctx->Driver.DrawIndirect(ctx, mode,
ctx->DrawIndirectBuffer, offset,
primcount, stride, NULL, 0, &ib);
@@ -1802,7 +1793,6 @@ vbo_validated_multidrawarraysindirectcount(struct gl_context *ctx,
GLsizei maxdrawcount,
GLsizei stride)
{
- struct vbo_context *vbo = vbo_context(ctx);
GLsizeiptr offset = indirect;
if (maxdrawcount == 0)
@@ -1810,7 +1800,7 @@ vbo_validated_multidrawarraysindirectcount(struct gl_context *ctx,
vbo_bind_arrays(ctx);
- vbo->draw_indirect_prims(ctx, mode,
+ ctx->Driver.DrawIndirect(ctx, mode,
ctx->DrawIndirectBuffer, offset,
maxdrawcount, stride,
ctx->ParameterBuffer, drawcount_offset, NULL);
@@ -1828,7 +1818,6 @@ vbo_validated_multidrawelementsindirectcount(struct gl_context *ctx,
GLsizei maxdrawcount,
GLsizei stride)
{
- struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_index_buffer ib;
GLsizeiptr offset = (GLsizeiptr) indirect;
@@ -1844,7 +1833,7 @@ vbo_validated_multidrawelementsindirectcount(struct gl_context *ctx,
ib.obj = ctx->Array.VAO->IndexBufferObj;
ib.ptr = NULL;
- vbo->draw_indirect_prims(ctx, mode,
+ ctx->Driver.DrawIndirect(ctx, mode,
ctx->DrawIndirectBuffer, offset,
maxdrawcount, stride,
ctx->ParameterBuffer, drawcount_offset, &ib);