softpipe->quad[i].output->destroy( softpipe->quad[i].output );
}
- for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
+ for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
sp_destroy_tile_cache(softpipe->cbuf_cache[i]);
+ pipe_surface_reference(&softpipe->framebuffer.cbufs[i], NULL);
+ }
sp_destroy_tile_cache(softpipe->zsbuf_cache);
+ pipe_surface_reference(&softpipe->framebuffer.zsbuf, NULL);
- for (i = 0; i < PIPE_MAX_SAMPLERS; i++)
+ for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
sp_destroy_tile_cache(softpipe->tex_cache[i]);
+ pipe_texture_reference(&softpipe->texture[i], NULL);
+ }
for (i = 0; i < Elements(softpipe->constants); i++) {
if (softpipe->constants[i].buffer) {
sp_flush_tile_cache(sp, sp->cbuf_cache[i]);
/* assign new */
- sp->framebuffer.cbufs[i] = fb->cbufs[i];
+ pipe_surface_reference(&sp->framebuffer.cbufs[i], fb->cbufs[i]);
/* update cache */
sp_tile_cache_set_surface(sp->cbuf_cache[i], fb->cbufs[i]);
sp_flush_tile_cache(sp, sp->zsbuf_cache);
/* assign new */
- sp->framebuffer.zsbuf = fb->zsbuf;
+ pipe_surface_reference(&sp->framebuffer.zsbuf, fb->zsbuf);
/* update cache */
sp_tile_cache_set_surface(sp->zsbuf_cache, fb->zsbuf);