mesa: pass indirect buffer to sw primitive restart
authorChris Forbes <chrisf@ijw.co.nz>
Sun, 13 Oct 2013 07:56:42 +0000 (20:56 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Mon, 25 Nov 2013 09:01:36 +0000 (22:01 +1300)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_primitive_restart.c
src/mesa/vbo/vbo.h
src/mesa/vbo/vbo_exec_array.c
src/mesa/vbo/vbo_primitive_restart.c

index 3748e74f782ad3871fda1c2627b70b9213f1d0be..f014b60bab67ac72954c6b308eceda330e86aa55 100644 (file)
@@ -176,7 +176,7 @@ brw_handle_primitive_restart(struct gl_context *ctx,
       /* Not all the primitive draw modes are supported by the cut index,
        * so take the software path
        */
-      vbo_sw_primitive_restart(ctx, prims, nr_prims, ib);
+      vbo_sw_primitive_restart(ctx, prims, nr_prims, ib, indirect);
    }
 
    brw->prim_restart.in_progress = false;
index f58fa0b339957e46d2628f1399d7e02b384a89e7..6e1a4aa1ad6cebccf410e337481f248edb92eb51 100644 (file)
@@ -186,7 +186,8 @@ void
 vbo_sw_primitive_restart(struct gl_context *ctx,
                          const struct _mesa_prim *prim,
                          GLuint nr_prims,
-                         const struct _mesa_index_buffer *ib);
+                         const struct _mesa_index_buffer *ib,
+                         struct gl_buffer_object *indirect);
 
 void GLAPIENTRY
 _es_Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
index db7da6922ea85b2ba297629884cc50565a86e3f0..8152fa1623e7406885e891bd8827da99bacb85f9 100644 (file)
@@ -579,7 +579,7 @@ vbo_handle_primitive_restart(struct gl_context *ctx,
        ctx->Const.PrimitiveRestartInSoftware &&
        ctx->Array._PrimitiveRestart) {
       /* Handle primitive restart in software */
-      vbo_sw_primitive_restart(ctx, prim, nr_prims, ib);
+      vbo_sw_primitive_restart(ctx, prim, nr_prims, ib, NULL);
    } else {
       /* Call driver directly for draw_prims */
       vbo->draw_prims(ctx, prim, nr_prims, ib,
index e5c93ac6dfc6c3246b946c1a43c2167d71a8c636..75e760fc9de71ccc9e672a1454c871c003c1e79d 100644 (file)
@@ -163,7 +163,8 @@ void
 vbo_sw_primitive_restart(struct gl_context *ctx,
                          const struct _mesa_prim *prims,
                          GLuint nr_prims,
-                         const struct _mesa_index_buffer *ib)
+                         const struct _mesa_index_buffer *ib,
+                         struct gl_buffer_object *indirect)
 {
    GLuint prim_num;
    struct sub_primitive *sub_prims;