Lines Matching defs:resource

62 	if (rsrc->resource.b.b.nr_samples > 1 ||
63 rdst->resource.b.b.nr_samples > 1)
81 if (!util_texrange_covers_whole_level(&rdst->resource.b.b, dst_level,
91 rctx->b.flush_resource(&rctx->b, &rsrc->resource.b.b);
111 blit.src.resource = src;
115 blit.dst.resource = dst;
139 struct pipe_resource *src = transfer->resource;
156 struct pipe_resource *dst = transfer->resource;
325 ctx->flush_resource(ctx, &rtex->resource.b.b);
338 assert(rtex->resource.b.b.nr_samples <= 1);
342 rtex->cmask.base_address_reg = rtex->resource.gpu_address >> 8;
347 if (rtex->cmask_buffer != &rtex->resource)
362 struct pipe_resource templ = rtex->resource.b.b;
371 if (rtex->resource.b.is_shared)
397 rctx->dma_copy(&rctx->b, &new_tex->resource.b.b, i, 0, 0, 0,
398 &rtex->resource.b.b, i, &box);
407 rtex->resource.b.b.bind = templ.bind;
408 pb_reference(&rtex->resource.buf, new_tex->resource.buf);
409 rtex->resource.gpu_address = new_tex->resource.gpu_address;
410 rtex->resource.vram_usage = new_tex->resource.vram_usage;
411 rtex->resource.gart_usage = new_tex->resource.gart_usage;
412 rtex->resource.bo_size = new_tex->resource.bo_size;
413 rtex->resource.bo_alignment = new_tex->resource.bo_alignment;
414 rtex->resource.domains = new_tex->resource.domains;
415 rtex->resource.flags = new_tex->resource.flags;
445 struct pipe_resource *resource,
450 struct r600_texture *rtex = (struct r600_texture*)resource;
457 if (resource->target != PIPE_BUFFER) {
472 struct pipe_resource *resource,
478 struct r600_resource *res = (struct r600_resource*)resource;
479 struct r600_texture *rtex = (struct r600_texture*)resource;
487 if (resource->target != PIPE_BUFFER) {
491 if (resource->nr_samples > 1 || rtex->is_depth)
557 r600_texture_get_info(screen, resource, &stride, &offset);
580 struct r600_resource *resource = &rtex->resource;
583 pipe_resource_reference((struct pipe_resource**)&resource->immed_buffer, NULL);
585 if (rtex->cmask_buffer != &rtex->resource) {
588 pb_reference(&resource->buf, NULL);
599 struct pipe_resource templ = rtex->resource.b.b;
661 rtex->resource.b.b.nr_samples, &rtex->fmask);
685 unsigned pitch_elements = align(rtex->resource.b.b.width0, macro_tile_width);
686 unsigned height = align(rtex->resource.b.b.height0, macro_tile_height);
697 out->size = util_num_layers(&rtex->resource.b.b, 0) *
761 (rtex->resource.b.b.width0 > 7680 ||
762 rtex->resource.b.b.height0 > 7680))
802 util_num_layers(&rtex->resource.b.b, 0) *
827 rtex->resource.b.b.width0, rtex->resource.b.b.height0,
828 rtex->resource.b.b.depth0, rtex->surface.blk_w,
830 rtex->resource.b.b.array_size, rtex->resource.b.b.last_level,
831 rtex->surface.bpe, rtex->resource.b.b.nr_samples,
832 rtex->surface.flags, util_format_short_name(rtex->resource.b.b.format));
860 for (i = 0; i <= rtex->resource.b.b.last_level; i++)
866 u_minify(rtex->resource.b.b.width0, i),
867 u_minify(rtex->resource.b.b.height0, i),
868 u_minify(rtex->resource.b.b.depth0, i),
877 for (i = 0; i <= rtex->resource.b.b.last_level; i++) {
884 u_minify(rtex->resource.b.b.width0, i),
885 u_minify(rtex->resource.b.b.height0, i),
886 u_minify(rtex->resource.b.b.depth0, i),
903 struct r600_resource *resource;
910 resource = &rtex->resource;
911 resource->b.b = *base;
912 pipe_reference_init(&resource->b.b.reference, 1);
913 resource->b.b.screen = screen;
916 rtex->is_depth = util_format_has_depth(util_format_description(rtex->resource.b.b.format));
936 if (rtex->resource.b.b.nr_samples <= 1 &&
937 (rtex->resource.b.b.format == PIPE_FORMAT_Z16_UNORM ||
938 rtex->resource.b.b.format == PIPE_FORMAT_Z32_FLOAT))
954 rtex->cmask_buffer = &rtex->resource;
965 r600_init_resource_fields(rscreen, resource, rtex->size,
968 if (!r600_alloc_resource(rscreen, resource)) {
973 resource->buf = buf;
974 resource->gpu_address = rscreen->ws->buffer_get_virtual_address(resource->buf);
975 resource->bo_size = buf->size;
976 resource->bo_alignment = 1 << buf->alignment_log2;
977 resource->domains = rscreen->ws->buffer_get_initial_domain(resource->buf);
978 if (resource->domains & RADEON_DOMAIN_VRAM)
979 resource->vram_usage = buf->size;
980 else if (resource->domains & RADEON_DOMAIN_GTT)
981 resource->gart_usage = buf->size;
993 r600_screen_clear_buffer(rscreen, &rtex->resource.b.b,
1001 (rtex->resource.gpu_address + rtex->cmask.offset) >> 8;
1005 rtex->resource.gpu_address,
1006 rtex->resource.gpu_address + rtex->resource.buf->size,
1142 rtex->resource.b.is_shared = true;
1143 rtex->resource.external_usage = usage;
1146 return &rtex->resource.b.b;
1154 struct pipe_resource resource;
1192 memset(&resource, 0, sizeof(resource));
1193 resource.target = texture->target;
1194 resource.format = pipe_format;
1195 resource.width0 = texture->width0;
1196 resource.height0 = texture->height0;
1197 resource.depth0 = texture->depth0;
1198 resource.array_size = texture->array_size;
1199 resource.last_level = texture->last_level;
1200 resource.nr_samples = texture->nr_samples;
1201 resource.usage = staging ? PIPE_USAGE_STAGING : PIPE_USAGE_DEFAULT;
1202 resource.bind = texture->bind & ~PIPE_BIND_DEPTH_STENCIL;
1203 resource.flags = texture->flags | R600_RESOURCE_FLAG_FLUSHED_DEPTH;
1206 resource.flags |= R600_RESOURCE_FLAG_TRANSFER;
1208 *flushed_depth_texture = (struct r600_texture *)ctx->screen->resource_create(ctx->screen, &resource);
1253 !rtex->resource.b.is_shared &&
1255 rtex->resource.b.b.last_level == 0 &&
1256 util_texrange_covers_whole_level(&rtex->resource.b.b, 0,
1272 r600_alloc_resource(rscreen, &rtex->resource);
1276 (rtex->resource.gpu_address + rtex->cmask.offset) >> 8;
1333 rtex->resource.domains & RADEON_DOMAIN_VRAM ||
1334 rtex->resource.flags & RADEON_FLAG_GTT_WC;
1336 else if (r600_rings_is_buffer_referenced(rctx, rtex->resource.buf,
1338 !rctx->ws->buffer_wait(rctx->ws, rtex->resource.buf, 0,
1352 pipe_resource_reference(&trans->b.b.resource, texture);
1360 if (rtex->resource.b.b.nr_samples > 1) {
1371 struct pipe_resource resource;
1373 r600_init_temp_resource_from_box(&resource, texture, box, level, 0);
1375 if (!r600_init_flushed_depth_texture(ctx, &resource, &staging_depth)) {
1382 struct pipe_resource *temp = ctx->screen->resource_create(ctx->screen, &resource);
1422 struct pipe_resource resource;
1425 r600_init_temp_resource_from_box(&resource, texture, box, level,
1427 resource.usage = (usage & PIPE_MAP_READ) ?
1431 staging = (struct r600_texture*)ctx->screen->resource_create(ctx->screen, &resource);
1437 trans->staging = &staging->resource;
1451 /* the resource is mapped directly */
1455 buf = &rtex->resource;
1473 struct pipe_resource *texture = transfer->resource;
1477 if (rtex->is_depth && rtex->resource.b.b.nr_samples <= 1) {
1510 pipe_resource_reference(&transfer->resource, NULL);
1764 fb->cbufs[i]->u.tex.last_layer != util_max_layer(&tex->resource.b.b, 0)) {
1782 if (tex->resource.b.is_shared &&
1783 !(tex->resource.external_usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
1792 if (tex->resource.b.b.nr_samples <= 1 &&
1793 tex->resource.b.b.width0 * tex->resource.b.b.height0 <= 300 * 300)
1932 rtex->resource.b.is_shared = true;
1933 rtex->resource.external_usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE;
1935 return &rtex->resource.b.b;