• Home
  • Raw
  • Download

Lines Matching refs:rsrc

118         struct panfrost_resource *rsrc = (struct panfrost_resource *) pt;  in panfrost_resource_get_handle()  local
119 struct renderonly_scanout *scanout = rsrc->scanout; in panfrost_resource_get_handle()
121 handle->modifier = rsrc->modifier; in panfrost_resource_get_handle()
122 rsrc->modifier_constant = true; in panfrost_resource_get_handle()
130 handle->handle = rsrc->bo->gem_handle; in panfrost_resource_get_handle()
131 handle->stride = rsrc->slices[0].stride; in panfrost_resource_get_handle()
132 handle->offset = rsrc->slices[0].offset; in panfrost_resource_get_handle()
150 int fd = panfrost_bo_export(rsrc->bo); in panfrost_resource_get_handle()
156 handle->stride = rsrc->slices[0].stride; in panfrost_resource_get_handle()
157 handle->offset = rsrc->slices[0].offset; in panfrost_resource_get_handle()
680 struct panfrost_resource *rsrc = (struct panfrost_resource *) pt; in panfrost_resource_destroy() local
682 if (rsrc->scanout) in panfrost_resource_destroy()
683 renderonly_scanout_destroy(rsrc->scanout, dev->ro); in panfrost_resource_destroy()
685 if (rsrc->bo) in panfrost_resource_destroy()
686 panfrost_bo_unreference(rsrc->bo); in panfrost_resource_destroy()
688 if (rsrc->slices[0].checksum_bo) in panfrost_resource_destroy()
689 panfrost_bo_unreference(rsrc->slices[0].checksum_bo); in panfrost_resource_destroy()
691 util_range_destroy(&rsrc->valid_buffer_range); in panfrost_resource_destroy()
692 ralloc_free(rsrc); in panfrost_resource_destroy()
755 blit.src.resource = trans->staging.rsrc; in pan_blit_from_staging()
756 blit.src.format = pan_blit_format(trans->staging.rsrc->format); in pan_blit_from_staging()
775 blit.dst.resource = trans->staging.rsrc; in pan_blit_to_staging()
776 blit.dst.format = pan_blit_format(trans->staging.rsrc->format); in pan_blit_to_staging()
795 struct panfrost_resource *rsrc = pan_resource(resource); in panfrost_ptr_map() local
796 int bytes_per_pixel = util_format_get_blocksize(rsrc->internal_format); in panfrost_ptr_map()
797 struct panfrost_bo *bo = rsrc->bo; in panfrost_ptr_map()
800 if ((usage & PIPE_MAP_DIRECTLY) && rsrc->modifier != DRM_FORMAT_MOD_LINEAR) in panfrost_ptr_map()
812 if (drm_is_afbc(rsrc->modifier)) { in panfrost_ptr_map()
813 struct panfrost_resource *staging = pan_alloc_staging(ctx, rsrc, level, box); in panfrost_ptr_map()
817 transfer->staging.rsrc = &staging->base; in panfrost_ptr_map()
824 assert(transfer->staging.rsrc != NULL); in panfrost_ptr_map()
829 panfrost_flush_batches_accessing_bo(ctx, rsrc->bo, true); in panfrost_ptr_map()
831 if ((usage & PIPE_MAP_READ) && rsrc->slices[level].initialized) { in panfrost_ptr_map()
854 && !util_ranges_intersect(&rsrc->valid_buffer_range, box->x, box->x + box->width)) && in panfrost_ptr_map()
891 memcpy(newbo->ptr.cpu, rsrc->bo->ptr.cpu, bo->size); in panfrost_ptr_map()
894 rsrc->bo = newbo; in panfrost_ptr_map()
906 … && !util_ranges_intersect(&rsrc->valid_buffer_range, box->x, box->x + box->width)) { in panfrost_ptr_map()
918 if (rsrc->modifier == DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED) { in panfrost_ptr_map()
924 if ((usage & PIPE_MAP_READ) && rsrc->slices[level].initialized) { in panfrost_ptr_map()
927 bo->ptr.cpu + rsrc->slices[level].offset, in panfrost_ptr_map()
930 rsrc->slices[level].stride, in panfrost_ptr_map()
931 rsrc->internal_format); in panfrost_ptr_map()
936 assert (rsrc->modifier == DRM_FORMAT_MOD_LINEAR); in panfrost_ptr_map()
944 if ((usage & dpw) == dpw && rsrc->index_cache) in panfrost_ptr_map()
947 transfer->base.stride = rsrc->slices[level].stride; in panfrost_ptr_map()
949 rsrc->slices, rsrc->base.target == PIPE_TEXTURE_3D, in panfrost_ptr_map()
950 rsrc->cubemap_stride, level); in panfrost_ptr_map()
956 rsrc->slices[level].initialized = true; in panfrost_ptr_map()
957 panfrost_minmax_cache_invalidate(rsrc->index_cache, &transfer->base); in panfrost_ptr_map()
961 + rsrc->slices[level].offset in panfrost_ptr_map()
963 + transfer->base.box.y * rsrc->slices[level].stride in panfrost_ptr_map()
1010 if (trans->staging.rsrc) { in panfrost_ptr_unmap()
1020 prsrc->bo = pan_resource(trans->staging.rsrc)->bo; in panfrost_ptr_unmap()
1024 …anfrost_flush_batches_accessing_bo(pan_context(pctx), pan_resource(trans->staging.rsrc)->bo, true); in panfrost_ptr_unmap()
1028 pipe_resource_reference(&trans->staging.rsrc, NULL); in panfrost_ptr_unmap()
1106 panfrost_resource_get_internal_format(struct pipe_resource *rsrc) in panfrost_resource_get_internal_format() argument
1108 struct panfrost_resource *prsrc = (struct panfrost_resource *) rsrc; in panfrost_resource_get_internal_format()
1122 struct panfrost_resource *rsrc = pan_resource(prsrc); in panfrost_generate_mipmap() local
1128 assert(rsrc->bo); in panfrost_generate_mipmap()
1130 rsrc->slices[l].initialized = false; in panfrost_generate_mipmap()
1147 struct panfrost_resource *rsrc, in panfrost_get_texture_address() argument
1150 bool is_3d = rsrc->base.target == PIPE_TEXTURE_3D; in panfrost_get_texture_address()
1151 return rsrc->bo->ptr.gpu + in panfrost_get_texture_address()
1152 panfrost_texture_offset(rsrc->slices, is_3d, in panfrost_get_texture_address()
1153 rsrc->cubemap_stride, in panfrost_get_texture_address()