Home | History | Annotate | Download | only in radeonsi

Lines Matching refs:rtex

69 static unsigned r600_texture_get_offset(struct r600_resource_texture *rtex,
72 return rtex->surface.level[level].offset +
73 layer * rtex->surface.level[level].slice_size;
148 struct r600_resource_texture *rtex,
155 if (util_format_is_depth_or_stencil(rtex->real_format)) {
156 rtex->surface.flags |= RADEON_SURF_ZBUFFER;
157 rtex->surface.flags |= RADEON_SURF_SBUFFER;
160 r = rscreen->ws->surface_init(rscreen->ws, &rtex->surface);
164 if (pitch_in_bytes_override && pitch_in_bytes_override != rtex->surface.level[0].pitch_bytes) {
168 rtex->surface.level[0].nblk_x = pitch_in_bytes_override / rtex->surface.bpe;
169 rtex->surface.level[0].pitch_bytes = pitch_in_bytes_override;
170 rtex->surface.level[0].slice_size = pitch_in_bytes_override * rtex->surface.level[0].nblk_y;
171 if (rtex->surface.flags & RADEON_SURF_SBUFFER) {
172 rtex->surface.stencil_offset = rtex->surface.level[0].slice_size;
223 struct r600_resource_texture *rtex = (struct r600_resource_texture*)ptex;
224 struct si_resource *resource = &rtex->resource;
225 struct radeon_surface *surface = &rtex->surface;
247 struct r600_resource_texture *rtex = (struct r600_resource_texture*)ptex;
248 struct si_resource *resource = &rtex->resource;
250 if (rtex->flushed_depth_texture)
251 si_resource_reference((struct si_resource **)&rtex->flushed_depth_texture, NULL);
254 FREE(rtex);
270 struct r600_resource_texture *rtex = (struct r600_resource_texture*)texture;
283 if (rtex->surface.level[level].mode != RADEON_SURF_MODE_LINEAR_ALIGNED &&
284 rtex->surface.level[level].mode != RADEON_SURF_MODE_LINEAR)
315 if (rtex->depth) {
327 trans->transfer.stride = rtex->flushed_depth_texture->surface.level[level].pitch_bytes;
328 trans->offset = r600_texture_get_offset(rtex->flushed_depth_texture, level, box->z);
370 trans->transfer.stride = rtex->surface.level[level].pitch_bytes;
371 trans->transfer.layer_stride = rtex->surface.level[level].slice_size;
372 trans->offset = r600_texture_get_offset(rtex, level, box->z);
381 struct r600_resource_texture *rtex = (struct r600_resource_texture*)texture;
390 if (rtex->depth && !rtex->is_flushing_texture) {
391 if ((transfer->usage & PIPE_TRANSFER_WRITE) && rtex->flushed_depth_texture)
392 r600_blit_push_depth(ctx, rtex);
412 struct r600_resource_texture *rtex = (struct r600_resource_texture*)transfer->resource;
414 if (rtex->flushed_depth_texture)
415 buf = rtex->flushed_depth_texture->resource.cs_buf;
441 struct r600_resource_texture *rtex = (struct r600_resource_texture*)transfer->resource;
443 if (rtex->flushed_depth_texture) {
444 buf = rtex->flushed_depth_texture->resource.cs_buf;
474 struct r600_resource_texture *rtex;
479 rtex = CALLOC_STRUCT(r600_resource_texture);
480 if (rtex == NULL)
483 resource = &rtex->resource;
488 rtex->pitch_override = pitch_in_bytes_override;
489 rtex->real_format = base->format;
492 if (util_format_is_depth_or_stencil(rtex->real_format) && permit_hardware_blit(screen, base))
493 rtex->depth = 1;
495 rtex->surface = *surface;
496 rtex, array_mode, pitch_in_bytes_override);
498 FREE(rtex);
504 unsigned base_align = rtex->surface.bo_alignment;
505 unsigned size = rtex->surface.bo_size;
507 base_align = rtex->surface.bo_alignment;
509 FREE(rtex);
518 return rtex;
554 struct r600_resource_texture *rtex = (struct r600_resource_texture*)texture;
562 /* offset = r600_texture_get_offset(rtex, level, surf_tmpl->u.tex.first_layer);*/
567 surface->base.width = rtex->surface.level[level].npix_x;
568 surface->base.height = rtex->surface.level[level].npix_y;
630 struct r600_resource_texture *rtex = (struct r600_resource_texture*)texture;
633 if (rtex->flushed_depth_texture)
648 rtex->flushed_depth_texture = (struct r600_resource_texture *)ctx->screen->resource_create(ctx->screen, &resource);
649 if (rtex->flushed_depth_texture == NULL) {
654 ((struct r600_resource_texture *)rtex->flushed_depth_texture)->is_flushing_texture = TRUE;
661 si_blit_uncompress_depth(ctx, rtex);