Lines Matching defs:resource
49 static bool si_texture_is_aux_plane(const struct pipe_resource *resource);
60 blit.src.resource = src;
64 blit.dst.resource = dst;
91 struct pipe_resource *src = transfer->resource;
107 struct pipe_resource *dst = transfer->resource;
572 struct pipe_resource *resource, unsigned plane, unsigned layer,
577 while (plane && resource->next && !si_texture_is_aux_plane(resource->next)) {
579 resource = resource->next;
583 struct si_texture *tex = (struct si_texture *)resource;
588 if (resource->target == PIPE_BUFFER)
597 if (resource->target == PIPE_BUFFER)
605 if (resource->target == PIPE_BUFFER) {
630 if (!screen->resource_get_handle(screen, context, resource, &whandle, handle_usage))
641 static void si_texture_get_info(struct pipe_screen *screen, struct pipe_resource *resource,
647 si_resource_get_param(screen, NULL, resource, 0, 0, 0, PIPE_RESOURCE_PARAM_STRIDE, 0, &value);
652 si_resource_get_param(screen, NULL, resource, 0, 0, 0, PIPE_RESOURCE_PARAM_OFFSET, 0, &value);
658 struct pipe_resource *resource, struct winsys_handle *whandle,
663 struct si_resource *res = si_resource(resource);
664 struct si_texture *tex = (struct si_texture *)resource;
673 if (resource->target != PIPE_BUFFER) {
677 while (plane && resource->next && !si_texture_is_aux_plane(resource->next)) {
678 resource = resource->next;
682 res = si_resource(resource);
683 tex = (struct si_texture *)resource;
688 if (resource->nr_samples > 1 || tex->is_depth) {
801 si_texture_get_info(screen, resource, &stride, &offset);
905 * \param base resource template
922 struct si_resource *resource;
937 resource = &tex->buffer;
938 resource->b.b = *base;
939 pipe_reference_init(&resource->b.b.reference, 1);
940 resource->b.b.screen = screen;
1024 resource->bo_size = plane0->buffer.bo_size;
1025 resource->bo_alignment_log2 = plane0->buffer.bo_alignment_log2;
1026 resource->flags = plane0->buffer.flags;
1027 resource->domains = plane0->buffer.domains;
1028 resource->memory_usage_kb = plane0->buffer.memory_usage_kb;
1030 radeon_bo_reference(sscreen->ws, &resource->buf, plane0->buffer.buf);
1031 resource->gpu_address = plane0->buffer.gpu_address;
1034 resource->b.b.flags |= PIPE_RESOURCE_FLAG_UNMAPPABLE;
1036 resource->b.b.flags |= SI_RESOURCE_FLAG_GL2_BYPASS;
1039 si_init_resource_fields(sscreen, resource, alloc_size, alignment);
1041 if (!si_alloc_resource(sscreen, resource))
1044 resource->buf = imported_buf;
1045 resource->gpu_address = sscreen->ws->buffer_get_virtual_address(resource->buf);
1046 resource->bo_size = imported_buf->size;
1047 resource->bo_alignment_log2 = imported_buf->alignment_log2;
1048 resource->domains = sscreen->ws->buffer_get_initial_domain(resource->buf);
1049 resource->memory_usage_kb = MAX2(1, resource->bo_size / 1024);
1051 resource->flags = sscreen->ws->buffer_get_flags(resource->buf);
1402 * resource flushes, but the app has no way to promise doing
1529 static bool si_texture_is_aux_plane(const struct pipe_resource *resource)
1531 return resource->flags & SI_RESOURCE_AUX_PLANE;
1694 struct pipe_resource resource;
1727 memset(&resource, 0, sizeof(resource));
1728 resource.target = texture->target;
1729 resource.format = pipe_format;
1730 resource.width0 = texture->width0;
1731 resource.height0 = texture->height0;
1732 resource.depth0 = texture->depth0;
1733 resource.array_size = texture->array_size;
1734 resource.last_level = texture->last_level;
1735 resource.nr_samples = texture->nr_samples;
1736 resource.nr_storage_samples = texture->nr_storage_samples;
1737 resource.usage = PIPE_USAGE_DEFAULT;
1738 resource.bind = texture->bind & ~PIPE_BIND_DEPTH_STENCIL;
1739 resource.flags = texture->flags | SI_RESOURCE_FLAG_FLUSHED_DEPTH;
1742 (struct si_texture *)ctx->screen->resource_create(ctx->screen, &resource);
1893 pipe_resource_reference(&trans->b.b.resource, texture);
1899 struct pipe_resource resource;
1904 si_init_temp_resource_from_box(&resource, texture, box, real_level, bo_usage,
1912 resource.format = util_blitter_get_color_format_for_zs(resource.format);
1915 staging = (struct si_texture *)ctx->screen->resource_create(ctx->screen, &resource);
1933 /* the resource is mapped directly */
1953 pipe_resource_reference(&trans->b.b.resource, NULL);
1962 struct pipe_resource *texture = transfer->resource;
2000 pipe_resource_reference(&transfer->resource, NULL);
2270 static bool si_check_resource_capability(struct pipe_screen *screen, struct pipe_resource *resource,
2273 struct si_texture *tex = (struct si_texture *)resource;
2276 if (resource->target == PIPE_BUFFER)