summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_context.c
diff options
context:
space:
mode:
authorYounes Manton <younes.m@gmail.com>2009-09-27 10:56:42 -0400
committerJosé Fonseca <jfonseca@vmware.com>2009-09-28 15:35:29 +0100
commit9871521b302117682afbefa7316a41a1a00485b2 (patch)
tree8b1d6af9aaae5a81acb1a0b7a95397e348e6e915 /src/gallium/drivers/llvmpipe/lp_context.c
parent56870534803982a73019ddd77dab300d146f77c6 (diff)
llvmpipe: Grab a ref when the fb is set.
Based on softpipe commit a77226071f6814a53358a5d6caff685889d0e4ec.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_context.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index a4b2bd8c2a..202cb8ef43 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -107,11 +107,16 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
if (llvmpipe->draw)
draw_destroy( llvmpipe->draw );
- for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
+ for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
lp_destroy_tile_cache(llvmpipe->cbuf_cache[i]);
+ pipe_surface_reference(&llvmpipe->framebuffer.cbufs[i], NULL);
+ }
+ pipe_surface_reference(&llvmpipe->framebuffer.zsbuf, NULL);
- for (i = 0; i < PIPE_MAX_SAMPLERS; i++)
+ for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
lp_destroy_tex_tile_cache(llvmpipe->tex_cache[i]);
+ pipe_texture_reference(&llvmpipe->texture[i], NULL);
+ }
for (i = 0; i < Elements(llvmpipe->constants); i++) {
if (llvmpipe->constants[i].buffer) {