[Mesa-dev] [PATCH V2 10/15] i965: flag new indirect buffer in brw_try_draw_prims

Chris Forbes chrisf at ijw.co.nz
Wed Nov 6 23:06:19 PST 2013


Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/drivers/dri/i965/brw_draw.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index e6c3508..9f8ad45 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -323,7 +323,8 @@ static bool brw_try_draw_prims( struct gl_context *ctx,
 				     GLuint nr_prims,
 				     const struct _mesa_index_buffer *ib,
 				     GLuint min_index,
-				     GLuint max_index )
+				     GLuint max_index,
+				     const struct gl_buffer_object *indirect)
 {
    struct brw_context *brw = brw_context(ctx);
    bool retval = true;
@@ -377,6 +378,9 @@ static bool brw_try_draw_prims( struct gl_context *ctx,
    brw->vb.max_index = max_index;
    brw->state.dirty.brw |= BRW_NEW_VERTICES;
 
+   brw->indirect_buffer.indb = indirect;
+   brw->state.dirty.brw |= BRW_NEW_INDIRECT_BUFFER;
+
    for (i = 0; i < nr_prims; i++) {
       int estimated_max_prim_size;
 
@@ -506,7 +510,7 @@ void brw_draw_prims( struct gl_context *ctx,
     * manage it.  swrast doesn't support our featureset, so we can't fall back
     * to it.
     */
-   brw_try_draw_prims(ctx, arrays, prims, nr_prims, ib, min_index, max_index);
+   brw_try_draw_prims(ctx, arrays, prims, nr_prims, ib, min_index, max_index, indirect);
 }
 
 void brw_draw_init( struct brw_context *brw )
-- 
1.8.4.2



More information about the mesa-dev mailing list