[Mesa-dev] [PATCH 1/7] vbo: Reorder clearing NeedFlush flag with performing the flush
Chris Wilson
chris at chris-wilson.co.uk
Wed Sep 9 06:38:55 PDT 2015
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 <chris at chris-wilson.co.uk>
Cc: Brian Paul <brianp at vmware.com>
Cc: Jordan Justen <jordan.l.justen at intel.com>
Cc: Jason Ekstrand <jason.ekstrand at intel.com>
Cc: Kenneth Graunke <kenneth at whitecape.org>
Cc: Francisco Jerez <currojerez at 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
More information about the mesa-dev
mailing list