iris: Update check for sampler field changes

Use isl_get_sampler_clear_field_offset() to more accurately determine
when the sampler will change the field it reads from on gfx11-12. This
avoids partial resolving in a number of cases.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
This commit is contained in:
Nanley Chery
2025-05-28 10:13:29 -04:00
committed by Marge Bot
parent 69d91ae975
commit a5bc71dc56
+4 -6
View File
@@ -1153,14 +1153,12 @@ iris_resource_prepare_texture(struct iris_context *ice,
}
/* With indirect clear colors, the sampler reads clear values stored in
* pixel form. The location the sampler reads from is dependent on the
* bits-per-channel of the format. Disable support for clear colors if the
* new format points the sampler to an incompatible location. See
* isl_get_sampler_clear_field_offset() for more information.
* pixel form. Disable support for clear colors if the new format points
* the sampler to an incompatibly formatted location.
*/
if (res->aux.clear_color_bo &&
if (res->aux.clear_color_bo && res->surf.format != view_format &&
isl_format_get_layout(res->surf.format)->channels.r.bits != 32 &&
isl_format_get_layout(view_format)->channels.r.bits == 32) {
isl_get_sampler_clear_field_offset(devinfo, view_format, false) == 0) {
clear_supported = false;
}