diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-05-30 19:47:36 -0700 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-06-30 14:20:22 +0100 |
commit | 3d213ce9a1fb006a90303f67bca1394c28ef8272 (patch) | |
tree | 38e9e7403ae0761b5851513d641f1fdd974f580c | |
parent | b84e93156bdf641c6366e596aef245b64617c512 (diff) |
st_vbo: fix flush on statechange behaviour
Code to raise FLUSH_STORED_VERTICES was missing. Also, fix previous
flushing commit which resulted in a flush after every primitive and
was consequently hiding this issue.
-rw-r--r-- | src/mesa/state_tracker/st_vbo/st_vbo_exec_prims.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_vbo/st_vbo_exec_prims.c b/src/mesa/state_tracker/st_vbo/st_vbo_exec_prims.c index e5b3e9cdfc..1b612e72e2 100644 --- a/src/mesa/state_tracker/st_vbo/st_vbo_exec_prims.c +++ b/src/mesa/state_tracker/st_vbo/st_vbo_exec_prims.c @@ -95,6 +95,8 @@ static char *new_prim( struct st_vbo_exec_context *exec, if (ctx->NewState) _mesa_update_state( ctx ); + + ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES; } i = exec->vtx.prim_count; @@ -147,7 +149,7 @@ static void end_prim( struct st_vbo_exec_context *exec ) /* Flush if there isn't enough room to start a new primitive after * this. */ - if (exec->vtx.vert_count + 8 < exec->vtx.max_vert) + if (exec->vtx.vert_count + 8 > exec->vtx.max_vert) st_vbo_exec_vtx_flush( exec, GL_FALSE ); } |