diff options
author | marha <marha@users.sourceforge.net> | 2011-12-17 13:43:14 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2011-12-17 13:43:14 +0100 |
commit | abacebe06d9f3d2fe1b7d256bd86cddbfa592a85 (patch) | |
tree | a05bb04105e9dd1cda779071d9ca274b86840c7e /mesalib/src/mesa/state_tracker/st_draw.c | |
parent | 47913e82955ec8e2b1ba4d4b145497dede9163b5 (diff) | |
download | vcxsrv-abacebe06d9f3d2fe1b7d256bd86cddbfa592a85.tar.gz vcxsrv-abacebe06d9f3d2fe1b7d256bd86cddbfa592a85.tar.bz2 vcxsrv-abacebe06d9f3d2fe1b7d256bd86cddbfa592a85.zip |
libX11 libxtrans mesa xserver git update 17 dec 2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_draw.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index fd1c8ee48..87a997865 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -51,6 +51,7 @@ #include "st_context.h" #include "st_atom.h" #include "st_cb_bufferobjects.h" +#include "st_cb_xformfb.h" #include "st_draw.h" #include "st_program.h" @@ -926,7 +927,8 @@ st_draw_vbo(struct gl_context *ctx, const struct _mesa_index_buffer *ib, GLboolean index_bounds_valid, GLuint min_index, - GLuint max_index) + GLuint max_index, + struct gl_transform_feedback_object *tfb_vertcount) { struct st_context *st = st_context(ctx); struct pipe_context *pipe = st->pipe; @@ -1032,6 +1034,11 @@ st_draw_vbo(struct gl_context *ctx, info.restart_index = ctx->Array.RestartIndex; } + /* Set info.count_from_stream_output. */ + if (tfb_vertcount) { + st_transform_feedback_draw_init(tfb_vertcount, &info); + } + /* do actual drawing */ for (i = 0; i < nr_prims; i++) { info.mode = translate_prim( ctx, prims[i].mode ); @@ -1044,7 +1051,10 @@ st_draw_vbo(struct gl_context *ctx, info.max_index = info.start + info.count - 1; } - if (info.primitive_restart) { + if (info.count_from_stream_output) { + pipe->draw_vbo(pipe, &info); + } + else if (info.primitive_restart) { if (st->sw_primitive_restart) { /* Handle primitive restart for drivers that doesn't support it */ handle_fallback_primitive_restart(pipe, ib, &ibuffer, &info); |