isl_surf_usage_flags_t usage)
{
enum isl_format format = isl_format_for_pipe_format(pformat);
- const struct isl_format_layout *fmtl = isl_format_get_layout(format);
struct isl_swizzle swizzle = ISL_SWIZZLE_IDENTITY;
+ if (format == ISL_FORMAT_UNSUPPORTED)
+ return (struct iris_format_info) { .fmt = format, .swizzle = swizzle };
+
+ const struct isl_format_layout *fmtl = isl_format_get_layout(format);
+
if (!util_format_is_srgb(pformat)) {
if (util_format_is_intensity(pformat)) {
swizzle = ISL_SWIZZLE(RED, RED, RED, RED);
enum isl_format linear_format = isl_format_srgb_to_linear(rt_format);
- if (!isl_format_supports_ccs_e(devinfo, linear_format))
+ if (linear_format == ISL_FORMAT_UNSUPPORTED ||
+ !isl_format_supports_ccs_e(devinfo, linear_format))
return false;
return devinfo->gen >= 9 && devinfo->gen <= 11;