anv: Fix check for isl_fmt in assert
authorNataraj Deshpande <nataraj.deshpande@intel.com>
Wed, 5 Jun 2019 19:32:01 +0000 (12:32 -0700)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 6 Jun 2019 06:24:08 +0000 (09:24 +0300)
Checking isl_fmt returned value in assert seems appropriate
instead of format variable.

Fixes: f1654fa7e31 "anv/android: support creating images from external format"
Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
src/intel/vulkan/anv_image.c

index 8e45803a7bcf7924900dada2c5855e5301a55801..038a01f8a396017cfa867c82b71970454870ef93 100644 (file)
@@ -821,7 +821,7 @@ resolve_ahw_image(struct anv_device *device,
                                                 vk_format,
                                                 VK_IMAGE_ASPECT_COLOR_BIT,
                                                 vk_tiling);
-   assert(format != ISL_FORMAT_UNSUPPORTED);
+   assert(isl_fmt != ISL_FORMAT_UNSUPPORTED);
 
    /* Handle RGB(X)->RGBA fallback. */
    switch (desc.format) {