Lines Matching refs:resource
38 struct pipe_resource *texture = transfer->resource; in r600_copy_to_staging_texture()
50 struct pipe_resource *texture = transfer->resource; in r600_copy_from_staging_texture()
164 struct pipe_resource *ptex = &rtex->resource.b.b; in r600_setup_surface()
210 struct r600_resource *resource = &rtex->resource; in r600_texture_get_handle() local
214 rscreen->ws->buffer_set_tiling(resource->buf, in r600_texture_get_handle()
226 return rscreen->ws->buffer_get_handle(resource->buf, in r600_texture_get_handle()
234 struct r600_resource *resource = &rtex->resource; in r600_texture_destroy() local
239 pb_reference(&resource->buf, NULL); in r600_texture_destroy()
313 rtex->resource.b.b.nr_samples, &fmask); in r600_texture_allocate_fmask()
387 struct r600_resource *resource; in r600_texture_create_object() local
395 resource = &rtex->resource; in r600_texture_create_object()
396 resource->b.b = *base; in r600_texture_create_object()
397 resource->b.vtbl = &r600_texture_vtbl; in r600_texture_create_object()
398 pipe_reference_init(&resource->b.b.reference, 1); in r600_texture_create_object()
399 resource->b.b.screen = screen; in r600_texture_create_object()
403 rtex->is_depth = util_format_has_depth(util_format_description(rtex->resource.b.b.format)); in r600_texture_create_object()
429 if (!r600_init_resource(rscreen, resource, rtex->size, base_align, base->bind, usage)) { in r600_texture_create_object()
434 resource->buf = buf; in r600_texture_create_object()
435 resource->cs_buf = rscreen->ws->buffer_get_cs_handle(buf); in r600_texture_create_object()
436 resource->domains = RADEON_DOMAIN_GTT | RADEON_DOMAIN_VRAM; in r600_texture_create_object()
441 char *ptr = rscreen->ws->buffer_map(resource->cs_buf, NULL, PIPE_TRANSFER_WRITE); in r600_texture_create_object()
443 rscreen->ws->buffer_unmap(resource->cs_buf); in r600_texture_create_object()
565 struct pipe_resource resource; in r600_init_flushed_depth_texture() local
572 resource.target = texture->target; in r600_init_flushed_depth_texture()
573 resource.format = texture->format; in r600_init_flushed_depth_texture()
574 resource.width0 = texture->width0; in r600_init_flushed_depth_texture()
575 resource.height0 = texture->height0; in r600_init_flushed_depth_texture()
576 resource.depth0 = texture->depth0; in r600_init_flushed_depth_texture()
577 resource.array_size = texture->array_size; in r600_init_flushed_depth_texture()
578 resource.last_level = texture->last_level; in r600_init_flushed_depth_texture()
579 resource.nr_samples = texture->nr_samples; in r600_init_flushed_depth_texture()
580 resource.usage = staging ? PIPE_USAGE_STAGING : PIPE_USAGE_STATIC; in r600_init_flushed_depth_texture()
581 resource.bind = texture->bind & ~PIPE_BIND_DEPTH_STENCIL; in r600_init_flushed_depth_texture()
582 resource.flags = texture->flags | R600_RESOURCE_FLAG_FLUSHED_DEPTH; in r600_init_flushed_depth_texture()
585 resource.flags |= R600_RESOURCE_FLAG_TRANSFER; in r600_init_flushed_depth_texture()
587 …lushed_depth_texture = (struct r600_texture *)ctx->screen->resource_create(ctx->screen, &resource); in r600_init_flushed_depth_texture()
605 struct pipe_resource resource; in r600_texture_get_transfer() local
622 (rctx->ws->cs_is_buffer_referenced(rctx->cs, rtex->resource.cs_buf, RADEON_USAGE_READWRITE) || in r600_texture_get_transfer()
623 rctx->ws->buffer_is_busy(rtex->resource.buf, RADEON_USAGE_READWRITE))) { in r600_texture_get_transfer()
638 pipe_resource_reference(&trans->transfer.resource, texture); in r600_texture_get_transfer()
651 pipe_resource_reference(&trans->transfer.resource, NULL); in r600_texture_get_transfer()
666 resource.target = PIPE_TEXTURE_2D; in r600_texture_get_transfer()
667 resource.format = texture->format; in r600_texture_get_transfer()
668 resource.width0 = box->width; in r600_texture_get_transfer()
669 resource.height0 = box->height; in r600_texture_get_transfer()
670 resource.depth0 = 1; in r600_texture_get_transfer()
671 resource.array_size = 1; in r600_texture_get_transfer()
672 resource.last_level = 0; in r600_texture_get_transfer()
673 resource.nr_samples = 0; in r600_texture_get_transfer()
674 resource.usage = PIPE_USAGE_STAGING; in r600_texture_get_transfer()
675 resource.bind = 0; in r600_texture_get_transfer()
676 resource.flags = R600_RESOURCE_FLAG_TRANSFER; in r600_texture_get_transfer()
680 resource.bind |= PIPE_BIND_RENDER_TARGET; in r600_texture_get_transfer()
685 resource.bind |= PIPE_BIND_SAMPLER_VIEW; in r600_texture_get_transfer()
688 trans->staging = (struct r600_resource*)ctx->screen->resource_create(ctx->screen, &resource); in r600_texture_get_transfer()
691 pipe_resource_reference(&trans->transfer.resource, NULL); in r600_texture_get_transfer()
715 struct pipe_resource *texture = transfer->resource; in r600_texture_transfer_destroy()
732 pipe_resource_reference(&transfer->resource, NULL); in r600_texture_transfer_destroy()
743 (struct r600_texture*)transfer->resource; in r600_texture_transfer_map()
744 enum pipe_format format = transfer->resource->format; in r600_texture_transfer_map()
748 if ((transfer->resource->bind & PIPE_BIND_GLOBAL) && transfer->resource->target == PIPE_BUFFER) { in r600_texture_transfer_map()
755 buf = ((struct r600_resource *)transfer->resource)->cs_buf; in r600_texture_transfer_map()
777 if ((transfer->resource->bind & PIPE_BIND_GLOBAL) && transfer->resource->target == PIPE_BUFFER) { in r600_texture_transfer_unmap()
784 buf = ((struct r600_resource *)transfer->resource)->cs_buf; in r600_texture_transfer_unmap()