Mesa (master): vbo: yet tighter still usage of FLUSH_NEED_CURRENT
Keith Whitwell
keithw at kemper.freedesktop.org
Mon Mar 9 14:40:51 UTC 2009
Module: Mesa
Branch: master
Commit: ef5fd0b66a0ddfa1df5c39a8711dd542107c61c3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ef5fd0b66a0ddfa1df5c39a8711dd542107c61c3
Author: Keith Whitwell <keithw at vmware.com>
Date: Mon Mar 9 14:40:34 2009 +0000
vbo: yet tighter still usage of FLUSH_NEED_CURRENT
Previous change broke redbook/polys and probably others. I'm fairly
sure that drivers like r300 don't need to touch
ctx->Driver.NeedVertices, but this code is incredibly fragile and I'm
not confident about removing it from there. Hopefully this gets
things working again.
---
src/mesa/vbo/vbo_exec_api.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 6402745..5d35ec9 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -749,7 +749,7 @@ void vbo_exec_BeginVertices( GLcontext *ctx )
vbo_exec_vtx_map( exec );
assert((exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) == 0);
- exec->ctx->Driver.NeedFlush = FLUSH_UPDATE_CURRENT;
+ exec->ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT;
}
void vbo_exec_FlushVertices_internal( GLcontext *ctx, GLboolean unmap )
@@ -783,9 +783,9 @@ void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags )
/* Need to do this to ensure BeginVertices gets called again:
*/
- if (flags & FLUSH_UPDATE_CURRENT) {
- assert(exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT);
+ if (exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) {
_mesa_restore_exec_vtxfmt( ctx );
+ exec->ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT;
}
exec->ctx->Driver.NeedFlush &= ~flags;
More information about the mesa-commit
mailing list