• Home
  • Raw
  • Download

Lines Matching refs:iview

308 pan_iview_get_surface(const struct pan_image_view *iview,  in pan_iview_get_surface()  argument
312 level += iview->first_level; in pan_iview_get_surface()
313 assert(level < iview->image->layout.nr_slices); in pan_iview_get_surface()
315 layer += iview->first_layer; in pan_iview_get_surface()
317 bool is_3d = iview->image->layout.dim == MALI_TEXTURE_DIMENSION_3D; in pan_iview_get_surface()
318 const struct pan_image_slice_layout *slice = &iview->image->layout.slices[level]; in pan_iview_get_surface()
319 mali_ptr base = iview->image->data.bo->ptr.gpu + iview->image->data.offset; in pan_iview_get_surface()
321 if (drm_is_afbc(iview->image->layout.modifier)) { in pan_iview_get_surface()
325 ASSERTED unsigned depth = u_minify(iview->image->layout.depth, level); in pan_iview_get_surface()
333 assert(layer < iview->image->layout.array_size); in pan_iview_get_surface()
335 panfrost_texture_offset(&iview->image->layout, in pan_iview_get_surface()
344 panfrost_texture_offset(&iview->image->layout, level, in pan_iview_get_surface()
484 GENX(panfrost_estimate_texture_payload_size)(const struct pan_image_view *iview) in GENX()
488 (iview->image->layout.modifier == DRM_FORMAT_MOD_LINEAR); in GENX()
491 panfrost_texture_num_elements(iview->first_level, iview->last_level, in GENX()
492 iview->first_layer, iview->last_layer, in GENX()
493 iview->image->layout.nr_samples, in GENX()
494 iview->dim == MALI_TEXTURE_DIMENSION_CUBE, in GENX()
594 panfrost_emit_texture_payload(const struct pan_image_view *iview, in panfrost_emit_texture_payload() argument
599 const struct pan_image_layout *layout = &iview->image->layout; in panfrost_emit_texture_payload()
603 mali_ptr base = iview->image->data.bo->ptr.gpu + iview->image->data.offset; in panfrost_emit_texture_payload()
605 if (iview->buf.size) { in panfrost_emit_texture_payload()
606 assert (iview->dim == MALI_TEXTURE_DIMENSION_1D); in panfrost_emit_texture_payload()
607 base += iview->buf.offset; in panfrost_emit_texture_payload()
623 unsigned first_layer = iview->first_layer, last_layer = iview->last_layer; in panfrost_emit_texture_payload()
627 if (iview->dim == MALI_TEXTURE_DIMENSION_CUBE) { in panfrost_emit_texture_payload()
635 iview->first_level, iview->last_level, in panfrost_emit_texture_payload()
640 panfrost_get_surface_pointer(layout, iview->dim, base, in panfrost_emit_texture_payload()
667 panfrost_needs_explicit_stride(const struct pan_image_view *iview) in panfrost_needs_explicit_stride() argument
673 if (iview->image->layout.modifier != DRM_FORMAT_MOD_LINEAR) in panfrost_needs_explicit_stride()
676 unsigned bytes_per_block = util_format_get_blocksize(iview->format); in panfrost_needs_explicit_stride()
677 unsigned block_w = util_format_get_blockwidth(iview->format); in panfrost_needs_explicit_stride()
679 for (unsigned l = iview->first_level; l <= iview->last_level; ++l) { in panfrost_needs_explicit_stride()
680 unsigned actual = iview->image->layout.slices[l].line_stride; in panfrost_needs_explicit_stride()
682 DIV_ROUND_UP(u_minify(iview->image->layout.width, l), block_w) * in panfrost_needs_explicit_stride()
709 const struct pan_image_view *iview, in GENX()
712 const struct pan_image_layout *layout = &iview->image->layout; in GENX()
713 enum pipe_format format = iview->format; in GENX()
727 iview->swizzle, in GENX()
731 swizzle = panfrost_translate_swizzle_4(iview->swizzle); in GENX()
735 panfrost_needs_explicit_stride(iview); in GENX()
737 panfrost_emit_texture_payload(iview, format, in GENX()
741 unsigned array_size = iview->last_layer - iview->first_layer + 1; in GENX()
743 if (iview->dim == MALI_TEXTURE_DIMENSION_CUBE) { in GENX()
744 assert(iview->first_layer % 6 == 0); in GENX()
745 assert(iview->last_layer % 6 == 5); in GENX()
751 if (iview->buf.size) { in GENX()
752 assert(iview->dim == MALI_TEXTURE_DIMENSION_1D); in GENX()
753 assert(!iview->first_level && !iview->last_level); in GENX()
754 assert(!iview->first_layer && !iview->last_layer); in GENX()
757 assert(iview->buf.offset + iview->buf.size <= layout->width); in GENX()
758 width = iview->buf.size; in GENX()
760 width = u_minify(layout->width, iview->first_level); in GENX()
764 cfg.dimension = iview->dim; in GENX()
767 cfg.height = u_minify(layout->height, iview->first_level); in GENX()
768 if (iview->dim == MALI_TEXTURE_DIMENSION_3D) in GENX()
769 cfg.depth = u_minify(layout->depth, iview->first_level); in GENX()
775 cfg.levels = iview->last_level - iview->first_level + 1; in GENX()