diff options
author | marha <marha@users.sourceforge.net> | 2012-02-13 08:47:19 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-02-13 08:47:19 +0100 |
commit | eaa70945cb3f1a432b8c505ecede9ebc7769f36d (patch) | |
tree | 8e44ff4da739e384a2c6a34c1b42ecfb8e212344 /mesalib/src/mesa/vbo/vbo_save_draw.c | |
parent | 474621addc25cb22865c54b70ffbec07c82eb04c (diff) | |
download | vcxsrv-eaa70945cb3f1a432b8c505ecede9ebc7769f36d.tar.gz vcxsrv-eaa70945cb3f1a432b8c505ecede9ebc7769f36d.tar.bz2 vcxsrv-eaa70945cb3f1a432b8c505ecede9ebc7769f36d.zip |
libX11 libxcb mesa xserver mkfontscale git update 13 feb 2012
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_save_draw.c')
-rw-r--r-- | mesalib/src/mesa/vbo/vbo_save_draw.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_save_draw.c b/mesalib/src/mesa/vbo/vbo_save_draw.c index b903757c0..b8e1e7883 100644 --- a/mesalib/src/mesa/vbo/vbo_save_draw.c +++ b/mesalib/src/mesa/vbo/vbo_save_draw.c @@ -249,6 +249,19 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) (const struct vbo_save_vertex_list *) data; struct vbo_save_context *save = &vbo_context(ctx)->save; struct vbo_exec_context *exec = &vbo_context(ctx)->exec; + GLboolean remap_vertex_store = GL_FALSE; + + if (save->vertex_store->buffer) { + /* The vertex store is currently mapped but we're about to replay + * a display list. This can happen when a nested display list is + * being build with GL_COMPILE_AND_EXECUTE. + * We never want to have mapped vertex buffers when we're drawing. + * Unmap the vertex store, execute the list, then remap the vertex + * store. + */ + vbo_save_unmap_vertex_store(ctx, save->vertex_store); + remap_vertex_store = GL_TRUE; + } FLUSH_CURRENT(ctx, 0); @@ -264,14 +277,16 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) printf("displaylist recursive begin"); vbo_save_loopback_vertex_list( ctx, node ); - return; + + goto end; } else if (save->replay_flags) { /* Various degnerate cases: translate into immediate mode * calls rather than trying to execute in place. */ vbo_save_loopback_vertex_list( ctx, node ); - return; + + goto end; } if (ctx->NewState) @@ -310,6 +325,11 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) /* Copy to current? */ _playback_copy_to_current( ctx, node ); + +end: + if (remap_vertex_store) { + save->buffer_ptr = vbo_save_map_vertex_store(ctx, save->vertex_store); + } } |