diff options
author | marha <marha@users.sourceforge.net> | 2014-07-04 19:52:56 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-07-04 19:52:56 +0200 |
commit | 62ed212e1add98e39c0f7a6e5a8a5726d66f161e (patch) | |
tree | a80c4bf566c76665b3449f13fac7de72c66aa80a /mesalib/src/mesa/state_tracker/st_draw.c | |
parent | 3095a03ec3cb1f05b49362327d10a767299d7635 (diff) | |
parent | fe03d6aef6338e43593f164b09ae993bcd0ecbdd (diff) | |
download | vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.gz vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.bz2 vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_draw.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index c8189faad..64d6ef525 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -244,6 +244,14 @@ st_draw_vbo(struct gl_context *ctx, } } + if (indirect) { + info.indirect = st_buffer_object(indirect)->buffer; + + /* Primitive restart is not handled by the VBO module in this case. */ + info.primitive_restart = ctx->Array._PrimitiveRestart; + info.restart_index = ctx->Array.RestartIndex; + } + /* do actual drawing */ for (i = 0; i < nr_prims; i++) { info.mode = translate_prim(ctx, prims[i].mode); @@ -256,6 +264,7 @@ st_draw_vbo(struct gl_context *ctx, info.min_index = info.start; info.max_index = info.start + info.count - 1; } + info.indirect_offset = prims[i].indirect_offset; if (ST_DEBUG & DEBUG_DRAW) { debug_printf("st/draw: mode %s start %u count %u indexed %d\n", @@ -265,7 +274,7 @@ st_draw_vbo(struct gl_context *ctx, info.indexed); } - if (info.count_from_stream_output) { + if (info.count_from_stream_output || info.indirect) { cso_draw_vbo(st->cso_context, &info); } else if (info.primitive_restart) { |