mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-15 02:10:36 +02:00
panfrost: s/panfrost_slice.size0/panfrost_slice.surface_stride/
This field is encoding the stride between two consecutive surface in a 3D texture. Let's use a name reflecting that. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>
This commit is contained in:
parent
284c43ed4b
commit
25eb7c52dc
4 changed files with 7 additions and 7 deletions
|
|
@ -139,7 +139,7 @@ panfrost_mfbd_rt_set_buf(struct pipe_surface *surf,
|
|||
/* Only set layer_stride for layered MSAA rendering */
|
||||
|
||||
unsigned nr_samples = surf->texture->nr_samples;
|
||||
unsigned layer_stride = (nr_samples > 1) ? rsrc->slices[level].size0 : 0;
|
||||
unsigned layer_stride = (nr_samples > 1) ? rsrc->slices[level].surface_stride : 0;
|
||||
mali_ptr base = panfrost_get_texture_address(rsrc, level, first_layer, 0);
|
||||
|
||||
if (layer_stride)
|
||||
|
|
@ -310,7 +310,7 @@ panfrost_mfbd_zs_crc_ext_set_bufs(struct panfrost_batch *batch,
|
|||
|
||||
int row_stride = rsrc->slices[level].row_stride;
|
||||
|
||||
unsigned layer_stride = (nr_samples > 1) ? rsrc->slices[level].size0 : 0;
|
||||
unsigned layer_stride = (nr_samples > 1) ? rsrc->slices[level].surface_stride : 0;
|
||||
|
||||
ext->zs_writeback_base = base;
|
||||
ext->zs_writeback_row_stride = row_stride;
|
||||
|
|
@ -359,7 +359,7 @@ panfrost_mfbd_zs_crc_ext_set_bufs(struct panfrost_batch *batch,
|
|||
|
||||
struct panfrost_resource *stencil = rsrc->separate_stencil;
|
||||
struct panfrost_slice stencil_slice = stencil->slices[level];
|
||||
unsigned stencil_layer_stride = (nr_samples > 1) ? stencil_slice.size0 : 0;
|
||||
unsigned stencil_layer_stride = (nr_samples > 1) ? stencil_slice.surface_stride : 0;
|
||||
|
||||
ext->s_writeback_base = panfrost_get_texture_address(stencil, level, first_layer, 0);
|
||||
ext->s_writeback_row_stride = stencil_slice.row_stride;
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ panfrost_setup_slices(struct panfrost_device *dev,
|
|||
unsigned slice_one_size = slice->line_stride * effective_height;
|
||||
unsigned slice_full_size = slice_one_size * effective_depth;
|
||||
|
||||
slice->size0 = slice_one_size;
|
||||
slice->surface_stride = slice_one_size;
|
||||
|
||||
/* Report 2D size for 3D texturing */
|
||||
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ panfrost_compute_checksum_size(
|
|||
unsigned
|
||||
panfrost_get_layer_stride(struct panfrost_slice *slices, bool is_3d, unsigned cube_stride, unsigned level)
|
||||
{
|
||||
return is_3d ? slices[level].size0 : cube_stride;
|
||||
return is_3d ? slices[level].surface_stride : cube_stride;
|
||||
}
|
||||
|
||||
/* Computes the offset into a texture at a particular level/face. Add to
|
||||
|
|
@ -523,5 +523,5 @@ unsigned
|
|||
panfrost_texture_offset(struct panfrost_slice *slices, bool is_3d, unsigned cube_stride, unsigned level, unsigned face, unsigned sample)
|
||||
{
|
||||
unsigned layer_stride = panfrost_get_layer_stride(slices, is_3d, cube_stride, level);
|
||||
return slices[level].offset + (face * layer_stride) + (sample * slices[level].size0);
|
||||
return slices[level].offset + (face * layer_stride) + (sample * slices[level].surface_stride);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ struct panfrost_slice {
|
|||
unsigned offset;
|
||||
unsigned line_stride;
|
||||
unsigned row_stride;
|
||||
unsigned size0;
|
||||
unsigned surface_stride;
|
||||
|
||||
/* If there is a header preceding each slice, how big is
|
||||
* that header? Used for AFBC */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue