Exemple #1
0
static void
nvc0_destroy(struct pipe_context *pipe)
{
   struct nvc0_context *nvc0 = nvc0_context(pipe);

   if (nvc0->screen->cur_ctx == nvc0) {
      nvc0->screen->cur_ctx = NULL;
      nvc0->screen->save_state = nvc0->state;
      nvc0->screen->save_state.tfb = NULL;
   }

   if (nvc0->base.pipe.stream_uploader)
      u_upload_destroy(nvc0->base.pipe.stream_uploader);

   /* Unset bufctx, we don't want to revalidate any resources after the flush.
    * Other contexts will always set their bufctx again on action calls.
    */
   nouveau_pushbuf_bufctx(nvc0->base.pushbuf, NULL);
   nouveau_pushbuf_kick(nvc0->base.pushbuf, nvc0->base.pushbuf->channel);

   nvc0_context_unreference_resources(nvc0);
   nvc0_blitctx_destroy(nvc0);

   nouveau_context_destroy(&nvc0->base);
}
Exemple #2
0
static void
nvc0_destroy(struct pipe_context *pipe)
{
   struct nvc0_context *nvc0 = nvc0_context(pipe);

   nvc0_context_unreference_resources(nvc0);

   draw_destroy(nvc0->draw);

   if (nvc0->screen->cur_ctx == nvc0)
      nvc0->screen->cur_ctx = NULL;

   FREE(nvc0);
}
Exemple #3
0
static void
nvc0_destroy(struct pipe_context *pipe)
{
   struct nvc0_context *nvc0 = nvc0_context(pipe);

   if (nvc0->screen->cur_ctx == nvc0) {
      nvc0->base.pushbuf->kick_notify = NULL;
      nvc0->screen->cur_ctx = NULL;
      nouveau_pushbuf_bufctx(nvc0->base.pushbuf, NULL);
   }
   nouveau_pushbuf_kick(nvc0->base.pushbuf, nvc0->base.pushbuf->channel);

   nvc0_context_unreference_resources(nvc0);

#ifdef NVC0_WITH_DRAW_MODULE
   draw_destroy(nvc0->draw);
#endif

   nouveau_context_destroy(&nvc0->base);
}
Exemple #4
0
static void
nvc0_destroy(struct pipe_context *pipe)
{
   struct nvc0_context *nvc0 = nvc0_context(pipe);

   if (nvc0->screen->cur_ctx == nvc0)
      nvc0->screen->cur_ctx = NULL;
   /* Unset bufctx, we don't want to revalidate any resources after the flush.
    * Other contexts will always set their bufctx again on action calls.
    */
   nouveau_pushbuf_bufctx(nvc0->base.pushbuf, NULL);
   nouveau_pushbuf_kick(nvc0->base.pushbuf, nvc0->base.pushbuf->channel);

   nvc0_context_unreference_resources(nvc0);
   nvc0_blitctx_destroy(nvc0);

#ifdef NVC0_WITH_DRAW_MODULE
   draw_destroy(nvc0->draw);
#endif

   nouveau_context_destroy(&nvc0->base);
}