anv: Enable host_image_copy on emulated formats

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37691>
This commit is contained in:
Lucas Fryzek
2025-10-02 11:46:52 -04:00
committed by Marge Bot
parent b558968f8e
commit 4e6120f5af
2 changed files with 7 additions and 3 deletions

View File

@@ -669,11 +669,13 @@ anv_get_image_format_features2(const struct anv_physical_device *physical_device
VK_FORMAT_FEATURE_2_BLIT_SRC_BIT |
VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT |
VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT |
VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT;
VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT |
VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT;
} else if (vk_tiling == VK_IMAGE_TILING_LINEAR) {
/* Images used for transfers */
flags |= VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT |
VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT;
VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT |
VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT;
}
return flags;
}
@@ -765,6 +767,8 @@ anv_get_image_format_features2(const struct anv_physical_device *physical_device
* compressed format to an uncompressed one.
*
* We handle modifier tilings further down in this function.
*
* TODO: check if we could enable HOST copies in that non emulated case.
*/
if (vk_tiling == VK_IMAGE_TILING_LINEAR &&
isl_format_get_layout(plane_format.isl_format)->txc == ISL_TXC_ASTC)

View File

@@ -310,7 +310,7 @@ get_device_extensions(const struct anv_physical_device *device,
VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR,
.EXT_graphics_pipeline_library = !(device->instance->debug & ANV_DEBUG_NO_GPL),
.EXT_hdr_metadata = true,
.EXT_host_image_copy = !device->emu_astc_ldr,
.EXT_host_image_copy = true,
.EXT_host_query_reset = true,
.EXT_image_2d_view_of_3d = true,
/* Because of Xe2 PAT selected compression and the Vulkan spec