[Mesa-dev] [PATCH 11/16] anv/image: Assert that the image format is actually supported
Jason Ekstrand
jason at jlekstrand.net
Fri Jul 22 04:21:59 UTC 2016
Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Cc: "12.0" <mesa-dev at lists.freedesktop.org>
---
src/intel/vulkan/anv_image.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index e467e87..dff51bc 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -137,10 +137,13 @@ make_surface(const struct anv_device *dev,
image->extent = anv_sanitize_image_extent(vk_info->imageType,
vk_info->extent);
+ enum isl_format format = anv_get_isl_format(&dev->info, vk_info->format,
+ aspect, vk_info->tiling);
+ assert(format != ISL_FORMAT_UNSUPPORTED);
+
ok = isl_surf_init(&dev->isl_dev, &anv_surf->isl,
.dim = vk_to_isl_surf_dim[vk_info->imageType],
- .format = anv_get_isl_format(&dev->info, vk_info->format,
- aspect, vk_info->tiling),
+ .format = format,
.width = image->extent.width,
.height = image->extent.height,
.depth = image->extent.depth,
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list