anv: unify blit_cts_workaround handling

This makes the code easier to read.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39840>
This commit is contained in:
Paulo Zanoni 2026-02-10 17:22:29 -08:00 committed by Marge Bot
parent 5fbaef795a
commit f160d8db91

View file

@ -845,16 +845,16 @@ anv_get_image_format_features2(const struct anv_physical_device *physical_device
vk_format == VK_FORMAT_R64_UINT ||
vk_format == VK_FORMAT_R64_SINT;
if (!blit_cts_workaround)
if (!blit_cts_workaround) {
flags |= VK_FORMAT_FEATURE_2_BLIT_SRC_BIT;
/* Blit destination requires rendering support. */
if (isl_format_supports_rendering(devinfo, plane_format.isl_format))
flags |= VK_FORMAT_FEATURE_2_BLIT_DST_BIT;
}
flags |= VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT |
VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT;
/* Blit destination requires rendering support. */
if (isl_format_supports_rendering(devinfo, plane_format.isl_format) &&
!blit_cts_workaround)
flags |= VK_FORMAT_FEATURE_2_BLIT_DST_BIT;
}
/* XXX: We handle 3-channel formats by switching them out for RGBX or