diff --git a/src/panfrost/lib/pan_layout.c b/src/panfrost/lib/pan_layout.c index b1af38a2f89..b5f7d6788a0 100644 --- a/src/panfrost/lib/pan_layout.c +++ b/src/panfrost/lib/pan_layout.c @@ -120,7 +120,7 @@ pan_image_renderblock_size_el(uint64_t modifier, enum pipe_format format, static void init_slice_crc_info(unsigned arch, struct pan_image_slice_layout *slice, - unsigned width_px, unsigned height_px, unsigned offset_B) + unsigned width_px, unsigned height_px, uint64_t offset_B) { unsigned checksum_region_size_px = pan_meta_tile_size(arch); unsigned checksum_x_tile_per_region = diff --git a/src/panfrost/lib/pan_layout.h b/src/panfrost/lib/pan_layout.h index d366366dbae..360ec75bfdd 100644 --- a/src/panfrost/lib/pan_layout.h +++ b/src/panfrost/lib/pan_layout.h @@ -32,7 +32,10 @@ struct pan_image_slice_layout { * - report image subres layout and memory requirement * - bind image memory */ - unsigned offset_B; + uint64_t offset_B; + + /* Size of the MIP level in bytes. */ + uint64_t size_B; /* For AFBC images, the number of bytes between two rows of AFBC * headers. @@ -71,12 +74,10 @@ struct pan_image_slice_layout { /* If checksumming is enabled following the slice, what * is its offset/stride? */ struct { - unsigned offset_B; + uint64_t offset_B; unsigned stride_B; unsigned size_B; } crc; - - unsigned size_B; }; struct pan_image_extent { @@ -113,7 +114,7 @@ struct pan_image_layout_constraints { * To be noted, this offset might be adjusted to choose an optimal alignment, * unless the layout constraints are explicit (wsi_row_patch_B != 0). */ - unsigned offset_B; + uint64_t offset_B; /* Row pitch in bytes. Non-zero if layout is explicit. */ unsigned wsi_row_pitch_B; @@ -176,7 +177,7 @@ bool pan_image_layout_init( const struct pan_image_layout_constraints *layout_constraints, struct pan_image_layout *layout); -static inline unsigned +static inline uint64_t pan_image_get_wsi_offset(const struct pan_image_layout *layout, unsigned level) { return layout->slices[level].offset_B;