• Home
  • Raw
  • Download

Lines Matching refs:nvc0

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