mesa: Unbind depth/stencil surface from pipe_framebuffer when none is attached.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 1 Jul 2009 18:06:54 +0000 (19:06 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 1 Jul 2009 18:10:49 +0000 (19:10 +0100)
src/mesa/state_tracker/st_atom_framebuffer.c

index 536293683e9c2e2d0ad3db83f02809dafb1e6c56..3ef919a45e9df39d61345cae2f1f6dbe4f1fe663 100644 (file)
@@ -147,6 +147,8 @@ update_framebuffer_state( struct st_context *st )
          assert(strb->surface);
          pipe_surface_reference(&framebuffer->zsbuf, strb->surface);
       }
+      else
+         pipe_surface_reference(&framebuffer->zsbuf, NULL);
    }
 
    cso_set_framebuffer(st->cso_context, framebuffer);