[Mesa-dev] [RFC 11/22] anv: Handle failure in make_hiz_surface_maybe()
Daniel Stone
daniels at collabora.com
Thu Jun 8 18:44:09 UTC 2017
From: Chad Versace <chadversary at chromium.org>
make_ccs_surface_maybe() correctly handles failure
isl_surf_get_ccs_surf(). When it fails, the resultant VkImage is still
valid, just without a ccs surface.
Same of make_mcs_surface_maybe() and isl_surf_get_mcs_surf().
Fix make_hiz_surface_maybe() to do the same.
Signed-off-by: Daniel Stone <daniels at collabora.com>
---
src/intel/vulkan/anv_image.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 6e7d943014..dae7ed9311 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -162,7 +162,9 @@ make_hiz_surface_maybe(const struct anv_device *dev,
} else {
ok = isl_surf_get_hiz_surf(&dev->isl_dev, &image->depth_surface.isl,
&image->aux_surface.isl);
- assert(ok);
+ if (!ok)
+ return;
+
add_surface(image, &image->aux_surface);
image->aux_usage = ISL_AUX_USAGE_HIZ;
}
--
2.13.0
More information about the mesa-dev
mailing list