anv/image: Check surface offsets after adding each surface

Pre-patch, we checked the offsets once per aspect after adding all
surfaces for the aspect. The additional checks will make it easier to
diagnose layout bugs.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Chad Versace
2020-08-09 14:29:54 -07:00
parent 9f0abc2a22
commit 5fa0e5b87d

View File

@@ -691,12 +691,14 @@ add_all_surfaces(struct anv_device *device,
isl_tiling_flags, isl_usage);
if (result != VK_SUCCESS)
return result;
check_surfaces(image, &image->planes[plane]);
if (needs_shadow) {
result = add_shadow_surface(device, image, plane, plane_format, stride,
vk_usage);
if (result != VK_SUCCESS)
return result;
check_surfaces(image, &image->planes[plane]);
}
result = add_aux_surface_if_supported(device, image, plane, plane_format,
@@ -704,7 +706,6 @@ add_all_surfaces(struct anv_device *device,
isl_extra_usage_flags);
if (result != VK_SUCCESS)
return result;
check_surfaces(image, &image->planes[plane]);
}