Lines Matching refs:ctx

54    struct dri_context *ctx = NULL;
147 ctx = CALLOC_STRUCT(dri_context);
148 if (ctx == NULL) {
153 cPriv->driverPrivate = ctx;
154 ctx->cPriv = cPriv;
155 ctx->sPriv = sPriv;
169 ctx->st = stapi->create_context(stapi, &screen->base, &attribs, &ctx_err,
171 if (ctx->st == NULL) {
197 ctx->st->st_manager_private = (void *) ctx;
198 ctx->stapi = stapi;
200 if (ctx->st->cso_context) {
201 ctx->pp = pp_init(ctx->st->pipe, screen->pp_enabled, ctx->st->cso_context,
202 ctx->st);
203 ctx->hud = hud_create(ctx->st->cso_context, ctx->st,
208 if (ctx->st->start_thread &&
215 ctx->st->start_thread(ctx->st);
229 if (ctx && ctx->st)
230 ctx->st->destroy(ctx->st);
232 free(ctx);
239 struct dri_context *ctx = dri_context(cPriv);
241 if (ctx->hud) {
242 hud_destroy(ctx->hud, ctx->st->cso_context);
245 if (ctx->pp)
246 pp_free(ctx->pp);
253 ctx->st->flush(ctx->st, 0, NULL, NULL, NULL);
254 ctx->st->destroy(ctx->st);
255 free(ctx);
264 struct dri_context *ctx = dri_context(cPriv);
265 struct st_context_iface *st = ctx->st;
273 if (ctx->hud)
274 hud_record_only(ctx->hud, st->pipe);
278 ctx->dPriv = NULL;
279 ctx->rPriv = NULL;
290 struct dri_context *ctx = dri_context(cPriv);
295 return ctx->stapi->make_current(ctx->stapi, ctx->st, NULL, NULL);
299 if (ctx->dPriv != driDrawPriv) {
300 ctx->dPriv = driDrawPriv;
303 if (ctx->rPriv != driReadPriv) {
304 ctx->rPriv = driReadPriv;
308 ctx->stapi->make_current(ctx->stapi, ctx->st, &draw->base, &read->base);
311 if (ctx->pp && draw->textures[ST_ATTACHMENT_BACK_LEFT])
312 pp_init_fbos(ctx->pp, draw->textures[ST_ATTACHMENT_BACK_LEFT]->width0,