From a7922e7188bbc1a0d258eac5635ada24f4ff5085 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Mon, 22 Sep 2025 11:19:55 -0400 Subject: [PATCH] tu/fdm: Use better bounds for LRZ overallocation with FDM offset Use tile_max_w/h which is the HW bound for the tile width/height and is much smaller than the theoretical maximum width/height with a lopsided tile with just the depth attachment. Part-of: --- src/freedreno/vulkan/tu_image.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/freedreno/vulkan/tu_image.cc b/src/freedreno/vulkan/tu_image.cc index e644c9c3e0f..0d031955973 100644 --- a/src/freedreno/vulkan/tu_image.cc +++ b/src/freedreno/vulkan/tu_image.cc @@ -601,13 +601,10 @@ tu_image_update_layout(struct tu_device *device, struct tu_image *image, uint32_t extra_width = 0, extra_height = 0; if (image->vk.create_flags & VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT) { - uint32_t gmem_pixels = - device->physical_device->gmem_size / - (desc->block.bits / 8); - extra_width = gmem_pixels / - device->physical_device->info->tile_align_h; - extra_height = gmem_pixels / - device->physical_device->info->tile_align_w; + extra_width = + device->physical_device->info->tile_max_w; + extra_height = + device->physical_device->info->tile_max_h; } fdl6_lrz_layout_init(&image->lrz_layout, &image->layout[0],