iris: Inline iris_can_sample_mcs_with_clear

Now that there's only one user, inline the function.

While we're here, update the stale comment about unknown sampling
formats causing us to implement a simplified workaround.  We've had
visibility into the formats that blorp_copy will use for some time now.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24446>
This commit is contained in:
Nanley Chery 2023-07-25 14:09:48 -04:00 committed by Marge Bot
parent 1d1dbbd03f
commit 9da56a3698
2 changed files with 6 additions and 22 deletions

View file

@ -1087,24 +1087,6 @@ iris_image_view_aux_usage(struct iris_context *ice,
return res->aux.usage;
}
bool
iris_can_sample_mcs_with_clear(const struct intel_device_info *devinfo,
const struct iris_resource *res)
{
assert(isl_aux_usage_has_mcs(res->aux.usage));
/* On TGL, the sampler has an issue with some 8 and 16bpp MSAA fast clears.
* See HSD 1707282275, wa_14013111325. Due to the use of
* format-reinterpretation, a simplified workaround is implemented.
*/
if (intel_needs_workaround(devinfo, 14013111325) &&
isl_format_get_layout(res->surf.format)->bpb <= 16) {
return false;
}
return true;
}
static bool
formats_are_fast_clear_compatible(enum isl_format a, enum isl_format b)
{
@ -1166,8 +1148,13 @@ iris_resource_prepare_texture(struct iris_context *ice,
clear_supported = false;
}
/* On gfx12.0, the sampler has an issue with some 8 and 16bpp MSAA fast
* clears. See HSD 1707282275, wa_14013111325. A simplified workaround is
* implemented, but we could implement something more specific.
*/
if (isl_aux_usage_has_mcs(aux_usage) &&
!iris_can_sample_mcs_with_clear(devinfo, res)) {
intel_needs_workaround(devinfo, 14013111325) &&
isl_format_get_layout(res->surf.format)->bpb <= 16) {
clear_supported = false;
}

View file

@ -491,9 +491,6 @@ bool iris_resource_level_has_hiz(const struct intel_device_info *devinfo,
bool iris_sample_with_depth_aux(const struct intel_device_info *devinfo,
const struct iris_resource *res);
bool iris_can_sample_mcs_with_clear(const struct intel_device_info *devinfo,
const struct iris_resource *res);
bool iris_has_color_unresolved(const struct iris_resource *res,
unsigned start_level, unsigned num_levels,
unsigned start_layer, unsigned num_layers);