Home | History | Annotate | Download | only in nvc0

Lines Matching defs:nvc0

38    struct nvc0_context *nvc0 = nvc0_context(pipe);
39 struct nouveau_screen *screen = &nvc0->screen->base;
44 PUSH_KICK(nvc0->base.pushbuf); /* fencing handled in kick_notify */
57 nvc0_context_unreference_resources(struct nvc0_context *nvc0)
61 nouveau_bufctx_del(&nvc0->bufctx_3d);
62 nouveau_bufctx_del(&nvc0->bufctx);
64 util_unreference_framebuffer_state(&nvc0->framebuffer);
66 for (i = 0; i < nvc0->num_vtxbufs; ++i)
67 pipe_resource_reference(&nvc0->vtxbuf[i].buffer, NULL);
69 pipe_resource_reference(&nvc0->idxbuf.buffer, NULL);
72 for (i = 0; i < nvc0->num_textures[s]; ++i)
73 pipe_sampler_view_reference(&nvc0->textures[s][i], NULL);
76 if (!nvc0->constbuf[s][i].user)
77 pipe_resource_reference(&nvc0->constbuf[s][i].u.buf, NULL);
80 for (i = 0; i < nvc0->num_tfbbufs; ++i)
81 pipe_so_target_reference(&nvc0->tfbbuf[i], NULL);
87 struct nvc0_context *nvc0 = nvc0_context(pipe);
89 if (nvc0->screen->cur_ctx == nvc0) {
90 nvc0->base.pushbuf->kick_notify = NULL;
91 nvc0->screen->cur_ctx = NULL;
92 nouveau_pushbuf_bufctx(nvc0->base.pushbuf, NULL);
94 nouveau_pushbuf_kick(nvc0->base.pushbuf, nvc0->base.pushbuf->channel);
96 nvc0_context_unreference_resources(nvc0);
99 draw_destroy(nvc0->draw);
102 nouveau_context_destroy(&nvc0->base);
122 struct nvc0_context *nvc0;
127 nvc0 = CALLOC_STRUCT(nvc0_context);
128 if (!nvc0)
130 pipe = &nvc0->base.pipe;
132 nvc0->base.pushbuf = screen->base.pushbuf;
135 &nvc0->bufctx_3d);
137 nouveau_bufctx_new(screen->base.client, 2, &nvc0->bufctx);
141 nvc0->screen = screen;
142 nvc0->base.screen = &screen->base;
156 screen->cur_ctx = nvc0;
157 nouveau_pushbuf_bufctx(screen->base.pushbuf, nvc0->bufctx);
161 nvc0_init_query_functions(nvc0);
162 nvc0_init_surface_functions(nvc0);
163 nvc0_init_state_functions(nvc0);
164 nvc0_init_transfer_functions(nvc0);
169 nvc0->draw = draw_create(pipe);
170 assert(nvc0->draw);
171 draw_set_rasterize_stage(nvc0->draw, nvc0_draw_render_stage(nvc0));
174 nouveau_context_init_vdec(&nvc0->base);
177 nvc0_program_library_upload(nvc0);
183 BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->text);
184 BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->uniform_bo);
185 BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->txc);
186 BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->poly_cache);
190 BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->fence.bo);
191 BCTX_REFN_bo(nvc0->bufctx, FENCE, flags, screen->fence.bo);
193 nvc0->base.scratch.bo_size = 2 << 20;
198 if (nvc0) {
199 if (nvc0->bufctx_3d)
200 nouveau_bufctx_del(&nvc0->bufctx_3d);
201 if (nvc0->bufctx)
202 nouveau_bufctx_del(&nvc0->bufctx);
203 FREE(nvc0);
209 nvc0_bufctx_fence(struct nvc0_context *nvc0, struct nouveau_bufctx *bufctx,