Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
% endfor
};
+bool
+isl_format_is_valid(enum isl_format format)
+{
+ if (format >= sizeof(isl_format_layouts) / sizeof(isl_format_layouts[0]))
+ return false;
+ return isl_format_layouts[format].name;
+}
+
enum isl_format
isl_format_srgb_to_linear(enum isl_format format)
{
return &isl_format_layouts[fmt];
}
+bool isl_format_is_valid(enum isl_format);
+
static inline const char * ATTRIBUTE_CONST
isl_format_get_name(enum isl_format fmt)
{