anv/image: Fail earlier in anv_get_image_format_properties

If anv_get_image_format_features reports that the inputs are
unsupported, fail immediately.

Without the early fail, I have less confidence in the function's
correctness when a DRM format modifier is present.

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-08 18:45:48 -05:00
parent 8c5b4b1e1d
commit ce4f6bda66

View file

@ -925,6 +925,8 @@ anv_get_image_format_properties(
format_feature_flags = anv_get_image_format_features(devinfo, info->format,
format, info->tiling,
isl_mod_info);
if (!format_feature_flags)
goto unsupported;
switch (info->type) {
default: