iris: use slow clear for small surfaces with Wa_18020603990

Described in Wa_18020603990, we need to use slow clear or add an
partial resolve after fast clear for surfaces where bpp <= 32 and
dim <= 256x256.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26629>
This commit is contained in:
Tapani Pälli 2023-12-11 10:13:28 +02:00 committed by Marge Bot
parent 25a32433b1
commit 2336058bbb

View file

@ -138,6 +138,16 @@ can_fast_clear_color(struct iris_context *ice,
return false;
}
/* Wa_18020603990 - slow clear surfaces up to 256x256, 32bpp. */
const struct intel_device_info *devinfo =
((struct iris_screen *)ice->ctx.screen)->devinfo;
if (intel_needs_workaround(devinfo, 18020603990)) {
if (isl_format_get_layout(res->surf.format)->bpb <= 32 &&
res->surf.logical_level0_px.w <= 256 &&
res->surf.logical_level0_px.h <= 256)
return false;
}
return true;
}