From 5fa0e5b87df52e112dc1ffa0ba34962ffca16540 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Sun, 9 Aug 2020 14:29:54 -0700 Subject: [PATCH] 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 Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 247aa8feffa..fcebe0f770f 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -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]); }