mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
anv/sparse: remove obsolete linear tiling code path
The code that tries to create a "pretend block shape" for linear tiling surfaces was necessary back when we were going to support sparse residency (non-opaque binds) for non-standard block shapes (since there was uncertainty about TileYs support). That hasn't been the case since before we merged sparse resources upstream, so remove the code and leave an assertion instead, just in case. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
This commit is contained in:
parent
2f65acfbb8
commit
2ac35116d1
1 changed files with 1 additions and 14 deletions
|
|
@ -844,7 +844,6 @@ anv_sparse_calc_block_shape(struct anv_physical_device *pdevice,
|
|||
{
|
||||
const struct isl_format_layout *layout =
|
||||
isl_format_get_layout(surf->format);
|
||||
const int Bpb = layout->bpb / 8;
|
||||
|
||||
struct isl_tile_info tile_info;
|
||||
isl_surf_get_tile_info(surf, &tile_info);
|
||||
|
|
@ -856,19 +855,7 @@ anv_sparse_calc_block_shape(struct anv_physical_device *pdevice,
|
|||
};
|
||||
VkExtent3D block_shape_px = vk_extent3d_el_to_px(block_shape_el, layout);
|
||||
|
||||
if (surf->tiling == ISL_TILING_LINEAR) {
|
||||
uint32_t elements_per_row = surf->row_pitch_B /
|
||||
(block_shape_el.width * Bpb);
|
||||
uint32_t rows_per_tile = ANV_SPARSE_BLOCK_SIZE /
|
||||
(elements_per_row * Bpb);
|
||||
assert(rows_per_tile * elements_per_row * Bpb == ANV_SPARSE_BLOCK_SIZE);
|
||||
|
||||
block_shape_px = (VkExtent3D) {
|
||||
.width = elements_per_row * layout->bw,
|
||||
.height = rows_per_tile * layout->bh,
|
||||
.depth = layout->bd,
|
||||
};
|
||||
}
|
||||
assert(surf->tiling != ISL_TILING_LINEAR);
|
||||
|
||||
return block_shape_px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue