summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-10-25 17:41:12 -0600
committerBrian Paul <[email protected]>2011-10-26 16:45:03 -0600
commit2997b458964b82c2cb7d0e57b3ead9371c4a8ea1 (patch)
treeae48cdf0cb03927fb6aabc36c3b57c09eed9d331 /src/mesa/state_tracker
parent4fc9a98a0e01195202cd5f3f5a78cf28c5e8843c (diff)
st/mesa: tell VBO module to always unmap buffers before drawing
Without this it's possible to wind up in a draw call with the glBegin/End VBO still in a mapped state. This is a problem for the SVGA3D driver and probably not good for other HW drivers.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 6d4bc544d0c..a1817720d90 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -144,6 +144,10 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe )
/* we want all vertex data to be placed in buffer objects */
vbo_use_buffer_objects(ctx);
+
+ /* make sure that no VBOs are left mapped when we're drawing. */
+ vbo_always_unmap_buffers(ctx);
+
/* Need these flags:
*/
st->ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;