anv: disable aux for exportable images without modifiers
This makes import easier on different gfx generations and we don't have to lock down on a certain aux layout just yet. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10609>
This commit is contained in:
parent
d75502be33
commit
e08370dc37
|
@ -1020,11 +1020,17 @@ add_all_surfaces_implicit_layout(
|
|||
const VkImageFormatListCreateInfo *format_list_info,
|
||||
uint32_t stride,
|
||||
isl_tiling_flags_t isl_tiling_flags,
|
||||
isl_surf_usage_flags_t isl_extra_usage_flags)
|
||||
const struct anv_image_create_info *create_info)
|
||||
{
|
||||
const struct intel_device_info *devinfo = &device->info;
|
||||
isl_surf_usage_flags_t isl_extra_usage_flags =
|
||||
create_info->isl_extra_usage_flags;
|
||||
VkResult result;
|
||||
|
||||
const VkExternalMemoryImageCreateInfo *ext_mem_info =
|
||||
vk_find_struct_const(create_info->vk_info->pNext,
|
||||
EXTERNAL_MEMORY_IMAGE_CREATE_INFO);
|
||||
|
||||
u_foreach_bit(b, image->aspects) {
|
||||
VkImageAspectFlagBits aspect = 1 << b;
|
||||
uint32_t plane = anv_image_aspect_to_plane(image->aspects, aspect);
|
||||
|
@ -1061,6 +1067,11 @@ add_all_surfaces_implicit_layout(
|
|||
return result;
|
||||
}
|
||||
|
||||
/* Disable aux if image supports export without modifiers. */
|
||||
if (ext_mem_info && ext_mem_info->handleTypes != 0 &&
|
||||
image->tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
|
||||
continue;
|
||||
|
||||
result = add_aux_surface_if_supported(device, image, plane, plane_format,
|
||||
format_list_info,
|
||||
ANV_OFFSET_IMPLICIT, stride,
|
||||
|
@ -1371,7 +1382,7 @@ anv_image_create(VkDevice _device,
|
|||
} else {
|
||||
r = add_all_surfaces_implicit_layout(device, image, fmt_list, 0,
|
||||
isl_tiling_flags,
|
||||
create_info->isl_extra_usage_flags);
|
||||
create_info);
|
||||
}
|
||||
|
||||
if (r != VK_SUCCESS)
|
||||
|
|
Loading…
Reference in New Issue