intel/isl: Add isl_format_is_valid
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
This commit is contained in:
parent
272bef0601
commit
bd3392423d
|
@ -89,6 +89,14 @@ isl_format_layouts[] = {
|
|||
% 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)
|
||||
{
|
||||
|
|
|
@ -1410,6 +1410,8 @@ isl_format_get_layout(enum isl_format fmt)
|
|||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue