summaryrefslogtreecommitdiff
authorBrian Paul <brianp@vmware.com>2010-07-03 00:18:15 (GMT)
committer Brian Paul <brianp@vmware.com>2010-07-03 00:22:53 (GMT)
commit91c37599f621a0ec498c0f0add14f16470ca852b (patch) (side-by-side diff)
treeaeb8f3a964668503f9960becc5158a2bfc204f1f
parent7cc58c1992ca7f8af13801ea430452e590755e32 (diff)
downloadmesa-91c37599f621a0ec498c0f0add14f16470ca852b.zip
mesa-91c37599f621a0ec498c0f0add14f16470ca852b.tar.gz
osmesa: remove old renderbuffer before adding new
Fixes fd.o bug 10966 when OSMesaMakeCurrent() was called twice. NOTE: This is a candidate for the 7.8 branch.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index ead4050..93d0e85 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1328,6 +1328,7 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type,
* size.
*/
osmesa->rb = new_osmesa_renderbuffer(&osmesa->mesa, osmesa->format, type);
+ _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT);
_mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb);
assert(osmesa->rb->RefCount == 2);