Lines Matching defs:xa
139 struct xa_tracker *xa = calloc(1, sizeof(struct xa_tracker));
143 if (!xa)
146 xa->screen = driver_descriptor.create_screen(drm_fd);
147 if (!xa->screen)
150 xa->default_ctx = xa_context_create(xa);
151 if (!xa->default_ctx)
159 xa->supported_formats = calloc(num_formats, sizeof(*xa->supported_formats));
160 if (!xa->supported_formats)
163 xa->supported_formats[0] = xa_format_unknown;
165 memset(xa->format_map, 0, sizeof(xa->format_map));
177 if (xa->screen->is_format_supported(xa->screen, fdesc.format,
179 if (xa->format_map[stype][0] == 0)
180 xa->format_map[stype][0] = num_formats;
181 xa->format_map[stype][1] = num_formats;
182 xa->supported_formats[num_formats++] = xa_format;
186 return xa;
189 xa_context_destroy(xa->default_ctx);
191 xa->screen->destroy(xa->screen);
193 free(xa);
198 xa_tracker_destroy(struct xa_tracker *xa)
200 free(xa->supported_formats);
201 xa_context_destroy(xa->default_ctx);
202 xa->screen->destroy(xa->screen);
203 free(xa);
235 xa_get_format_stype_depth(struct xa_tracker *xa,
242 for (i = xa->format_map[stype][0]; i <= xa->format_map[stype][1]; ++i) {
243 fdesc = xa_get_pipe_format(xa->supported_formats[i]);
258 xa_format_check_supported(struct xa_tracker *xa,
275 if (!xa->screen->is_format_supported(xa->screen, fdesc.format,
283 xa_surface_create(struct xa_tracker *xa,
295 fdesc = xa_get_format_stype_depth(xa, stype, depth);
323 srf->tex = xa->screen->resource_create(xa->screen, template);
327 srf->xa = xa;
350 struct xa_tracker *xa = srf->xa;
358 fdesc = xa_get_format_stype_depth(xa, stype, depth);
380 if (!xa->screen->is_format_supported(xa->screen, fdesc.format,
395 texture = xa->screen->resource_create(xa->screen, template);
404 struct pipe_context *pipe = xa->default_ctx->pipe;
410 pipe->flush(pipe, &xa->default_ctx->last_fence);
442 struct pipe_screen *screen = srf->xa->screen;