anv: Support multiple aspects in anv_formats_ccs_e_compatible
Prevents the next patch from causing the following assert failure: Test case 'dEQP-VK.ycbcr.copy.g8_b8_r8_3plane_420_unorm.g8_b8_r8_3plane_444_unorm.linear_linear_disjoint'.. deqp-vk: ../../src/intel/vulkan/anv_private.h:4962: anv_aspect_to_plane: Assertion `!(aspect & ~all_aspects)' failed. We still disable CCS for multiplane formats elsewhere. I've attempted enabling CCS for those cases but end up with failures in CI that I cannot reproduce locally. Hopefully this change gets the next person a step closer towards enabling this feature. Reviewed-by: Rohan Garg <rohan.garg@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29094>
This commit is contained in:
@@ -511,24 +511,27 @@ anv_formats_ccs_e_compatible(const struct intel_device_info *devinfo,
|
|||||||
VkImageUsageFlags vk_usage,
|
VkImageUsageFlags vk_usage,
|
||||||
const VkImageFormatListCreateInfo *fmt_list)
|
const VkImageFormatListCreateInfo *fmt_list)
|
||||||
{
|
{
|
||||||
enum isl_format format =
|
u_foreach_bit(b, vk_format_aspects(vk_format)) {
|
||||||
anv_get_isl_format(devinfo, vk_format, VK_IMAGE_ASPECT_COLOR_BIT,
|
VkImageAspectFlagBits aspect = 1 << b;
|
||||||
vk_tiling);
|
enum isl_format format =
|
||||||
|
anv_get_isl_format(devinfo, vk_format, aspect, vk_tiling);
|
||||||
|
|
||||||
if (!formats_ccs_e_compatible(devinfo, create_flags, format, vk_tiling,
|
if (!formats_ccs_e_compatible(devinfo, create_flags, format, vk_tiling,
|
||||||
fmt_list))
|
fmt_list))
|
||||||
return false;
|
|
||||||
|
|
||||||
if (vk_usage & VK_IMAGE_USAGE_STORAGE_BIT) {
|
|
||||||
if (devinfo->verx10 < 125)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Disable compression when surface can be potentially used for atomic
|
if (vk_usage & VK_IMAGE_USAGE_STORAGE_BIT) {
|
||||||
* operation.
|
if (devinfo->verx10 < 125)
|
||||||
*/
|
return false;
|
||||||
if (storage_image_format_supports_atomic(devinfo, create_flags, format,
|
|
||||||
vk_tiling, fmt_list))
|
/* Disable compression when surface can be potentially used for
|
||||||
return false;
|
* atomic operation.
|
||||||
|
*/
|
||||||
|
if (storage_image_format_supports_atomic(devinfo, create_flags,
|
||||||
|
format, vk_tiling,
|
||||||
|
fmt_list))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user