When we come to flush the vertices, we need to clear the NeedFlush
flag first before calling into the backend as that backend may trigger
FLUSH_VERTICES() itself (through use of meta) before dirtying the vertex
state. If the NeedFlush flag is still in place, we end up recursing
into the backend again (ad infinitum or until we hit an assertion).

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
Cc: Brian Paul <bri...@vmware.com>
Cc: Jordan Justen <jordan.l.jus...@intel.com>
Cc: Jason Ekstrand <jason.ekstr...@intel.com>
Cc: Kenneth Graunke <kenn...@whitecape.org>
Cc: Francisco Jerez <curroje...@riseup.net>
---
 src/mesa/vbo/vbo_exec_api.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 138cd60..5486104 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -1187,6 +1187,9 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, 
GLuint flags )
       return;
    }
 
+   /* Don't try and recursively flush the current VBO */
+   ctx->Driver.NeedFlush &= ~(FLUSH_UPDATE_CURRENT | flags);
+
    /* Flush (draw), and make sure VBO is left unmapped when done */
    vbo_exec_FlushVertices_internal(exec, GL_TRUE);
 
-- 
2.5.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to