iris: Check for zero in clear color compatibility fn

Both formats may interpret the clear color as zero.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20320>
This commit is contained in:
Nanley Chery
2022-12-13 16:30:01 -08:00
committed by Marge Bot
parent 002096fcc4
commit 94b4a4b2a5

View File

@@ -1129,6 +1129,13 @@ iris_render_formats_color_compatible(enum isl_format a, enum isl_format b,
return true;
}
/* Both formats may interpret the clear color as zero. */
if (!clear_color_unknown &&
isl_color_value_is_zero(color, a) &&
isl_color_value_is_zero(color, b)) {
return true;
}
return false;
}