nv50: turn samples counts off during blit
[mesa.git] / src / gallium / drivers / nouveau / nv30 / nv30_context.c
index 4a4538c2a61498120c28a822e79e87b86ebf1032..ef035e58f3cf8894e127b23ba697c4c920ac4883 100644 (file)
@@ -165,6 +165,15 @@ nv30_context_destroy(struct pipe_context *pipe)
    if (nv30->draw)
       draw_destroy(nv30->draw);
 
+   if (nv30->blit_vp)
+      nouveau_heap_free(&nv30->blit_vp);
+
+   if (nv30->blit_fp)
+      pipe_resource_reference(&nv30->blit_fp, NULL);
+
+   if (nv30->screen->base.pushbuf->user_priv == &nv30->bufctx)
+      nv30->screen->base.pushbuf->user_priv = NULL;
+
    nouveau_bufctx_del(&nv30->bufctx);
 
    if (nv30->screen->cur_ctx == nv30)
@@ -233,9 +242,6 @@ nv30_context_create(struct pipe_screen *pscreen, void *priv)
    if (debug_get_bool_option("NV30_SWTNL", FALSE))
       nv30->draw_flags |= NV30_NEW_SWTNL;
 
-   /*XXX: nvfx... */
-   nv30->is_nv4x = (screen->eng3d->oclass >= NV40_3D_CLASS) ? ~0 : 0;
-
    nv30->sample_mask = 0xffff;
    nv30_vbo_init(pipe);
    nv30_query_init(pipe);