Lines Matching refs:ctx
115 static void *texture_transfer_map_resolve(struct pipe_context *ctx,
122 struct virgl_context *vctx = virgl_context(ctx);
133 if (!virgl_has_readback_format(ctx->screen, pipe_to_virgl_format(fmt), true)) {
142 assert(virgl_has_readback_format(ctx->screen, pipe_to_virgl_format(fmt), true));
157 resolve_tmp = ctx->screen->resource_create(ctx->screen, &templ);
162 virgl_copy_region_with_blit(ctx, resolve_tmp, 0, &dst_box, resource,
164 ctx->flush(ctx, NULL, 0);
167 void *ptr = virgl_resource_transfer_map(ctx, resolve_tmp, 0, usage, &dst_box,
182 struct virgl_winsys *vws = virgl_screen(ctx->screen)->vws;
233 void *virgl_texture_transfer_map(struct pipe_context *ctx,
240 if (needs_resolve(ctx->screen, resource, usage))
241 return texture_transfer_map_resolve(ctx, resource, level, usage, box,
244 return virgl_resource_transfer_map(ctx, resource, level, usage, box, transfer);
247 static void flush_data(struct pipe_context *ctx,
251 struct virgl_winsys *vws = virgl_screen(ctx->screen)->vws;
257 void virgl_texture_transfer_unmap(struct pipe_context *ctx,
260 struct virgl_context *vctx = virgl_context(ctx);
269 flush_data(ctx, virgl_transfer(trans->resolve_transfer),
278 virgl_copy_region_with_blit(ctx,
283 ctx->flush(ctx, NULL, 0);