Home | History | Annotate | Download | only in nv50

Lines Matching defs:nv50

71 nv50_context_unreference_resources(struct nv50_context *nv50)
75 nouveau_bufctx_del(&nv50->bufctx_3d);
76 nouveau_bufctx_del(&nv50->bufctx);
78 util_unreference_framebuffer_state(&nv50->framebuffer);
80 for (i = 0; i < nv50->num_vtxbufs; ++i)
81 pipe_resource_reference(&nv50->vtxbuf[i].buffer, NULL);
83 pipe_resource_reference(&nv50->idxbuf.buffer, NULL);
86 for (i = 0; i < nv50->num_textures[s]; ++i)
87 pipe_sampler_view_reference(&nv50->textures[s][i], NULL);
90 if (!nv50->constbuf[s][i].user)
91 pipe_resource_reference(&nv50->constbuf[s][i].u.buf, NULL);
98 struct nv50_context *nv50 = nv50_context(pipe);
100 if (nv50_context_screen(nv50)->cur_ctx == nv50) {
101 nv50->base.pushbuf->kick_notify = NULL;
102 nv50_context_screen(nv50)->cur_ctx = NULL;
103 nouveau_pushbuf_bufctx(nv50->base.pushbuf, NULL);
106 nouveau_pushbuf_kick(nv50->base.pushbuf, nv50->base.pushbuf->channel);
108 nv50_context_unreference_resources(nv50);
111 draw_destroy(nv50->draw);
114 nouveau_context_destroy(&nv50->base);
121 struct nv50_context *nv50;
126 nv50 = CALLOC_STRUCT(nv50_context);
127 if (!nv50)
129 pipe = &nv50->base.pipe;
131 nv50->base.pushbuf = screen->base.pushbuf;
134 &nv50->bufctx_3d);
136 ret = nouveau_bufctx_new(screen->base.client, 2, &nv50->bufctx);
140 nv50->base.screen = &screen->base;
141 nv50->base.copy_data = nv50_m2mf_copy_linear;
142 nv50->base.push_data = nv50_sifc_linear_u8;
143 nv50->base.push_cb = nv50_cb_push;
145 nv50->screen = screen;
158 screen->cur_ctx = nv50;
159 nouveau_pushbuf_bufctx(screen->base.pushbuf, nv50->bufctx);
162 nv50_init_query_functions(nv50);
163 nv50_init_surface_functions(nv50);
164 nv50_init_state_functions(nv50);
169 nv50->draw = draw_create(pipe);
170 assert(nv50->draw);
171 draw_set_rasterize_stage(nv50->draw, nv50_draw_render_stage(nv50));
174 nouveau_context_init_vdec(&nv50->base);
178 BCTX_REFN_bo(nv50->bufctx_3d, SCREEN, flags, screen->code);
179 BCTX_REFN_bo(nv50->bufctx_3d, SCREEN, flags, screen->uniforms);
180 BCTX_REFN_bo(nv50->bufctx_3d, SCREEN, flags, screen->txc);
181 BCTX_REFN_bo(nv50->bufctx_3d, SCREEN, flags, screen->stack_bo);
185 BCTX_REFN_bo(nv50->bufctx_3d, SCREEN, flags, screen->fence.bo);
186 BCTX_REFN_bo(nv50->bufctx, FENCE, flags, screen->fence.bo);
188 nv50->base.scratch.bo_size = 2 << 20;
193 if (nv50) {
194 if (nv50->bufctx_3d)
195 nouveau_bufctx_del(&nv50->bufctx_3d);
196 if (nv50->bufctx)
197 nouveau_bufctx_del(&nv50->bufctx);
198 FREE(nv50);