diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-26 13:35:29 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-26 13:35:29 -0600 |
commit | f172148c6e3246ffd7c3a33f16d2ac6faca9d6cf (patch) | |
tree | 04f022da0d7e35b4fa81c68f01671c12c28f2ad7 | |
parent | 35cfd0a4900750f67cba4f64929ff3347f0bd46f (diff) |
gallium: free renderbuffer's old texture in st_renderbuffer_alloc_storage()
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 3560a040c8..76145a4d5c 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -92,10 +92,11 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, struct pipe_texture template; unsigned surface_usage; - /* Free the old surface (and texture if we hold the last - * reference): + /* Free the old surface and texture */ pipe_surface_reference( &strb->surface, NULL ); + pipe_texture_reference( &strb->texture, NULL ); + memset(&template, 0, sizeof(template)); |