anv: Enable HiZ on multi-LOD depth buffers.

Initial work by Rafael Antognolli <rafael.antognolli@intel.com>

Reworks
 - Rebase to main
 - Emit the right hiz op for higher mip levels when transitioning the
   depth buffer

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28629>
This commit is contained in:
Rohan Garg
2024-04-05 11:51:11 +02:00
committed by Marge Bot
parent 599e8bf921
commit 5efecc9782
2 changed files with 28 additions and 10 deletions

View File

@@ -785,7 +785,8 @@ add_aux_surface_if_supported(struct anv_device *device,
return VK_SUCCESS;
}
if (image->vk.mip_levels > 1) {
/* TODO: Adjust blorp for multi-LOD HiZ surface on Gen8 - Gen9*/
if (image->vk.mip_levels > 1 && device->info->ver <= 9) {
anv_perf_warn(VK_LOG_OBJS(&image->vk.base), "Enable multi-LOD HiZ");
return VK_SUCCESS;
}