radv: always return optimalDeviceAccess=TRUE for block-compressed formats

Required by the spec.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37817>
This commit is contained in:
Samuel Pitoiset
2025-10-10 14:40:06 +02:00
committed by Marge Bot
parent a157faee42
commit a566a933ca

View File

@@ -1309,7 +1309,15 @@ radv_GetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice,
!(instance->debug_flags & RADV_DEBUG_NO_DCC) && (base_info->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
}
host_perf_props->optimalDeviceAccess = pdev->info.gfx_level >= GFX12 || !might_enable_compression;
/**
* The Vulkan spec says:
*
* "If VkPhysicalDeviceImageFormatInfo2::format is a block-compressed format and
* vkGetPhysicalDeviceImageFormatProperties2 returns VK_SUCCESS, the implementation must
* return VK_TRUE in optimalDeviceAccess."
*/
host_perf_props->optimalDeviceAccess =
vk_format_is_block_compressed(format) || pdev->info.gfx_level >= GFX12 || !might_enable_compression;
host_perf_props->identicalMemoryLayout = base_info->tiling == VK_IMAGE_TILING_LINEAR;
}