mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 16:50:13 +01:00
radv: replace radv_image::shareable by vk_image::external_handle_types
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33758>
This commit is contained in:
parent
2d540b8074
commit
b8d070eeab
3 changed files with 5 additions and 10 deletions
|
|
@ -1435,7 +1435,8 @@ radv_GetImageMemoryRequirements2(VkDevice _device, const VkImageMemoryRequiremen
|
|||
switch (ext->sType) {
|
||||
case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: {
|
||||
VkMemoryDedicatedRequirements *req = (VkMemoryDedicatedRequirements *)ext;
|
||||
req->requiresDedicatedAllocation = image->shareable && image->vk.tiling != VK_IMAGE_TILING_LINEAR;
|
||||
req->requiresDedicatedAllocation =
|
||||
image->vk.external_handle_types && image->vk.tiling != VK_IMAGE_TILING_LINEAR;
|
||||
req->prefersDedicatedAllocation = req->requiresDedicatedAllocation;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ radv_use_dcc_for_image_early(struct radv_device *device, struct radv_image *imag
|
|||
return false;
|
||||
}
|
||||
|
||||
if (image->shareable && image->vk.tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
|
||||
if (image->vk.external_handle_types && image->vk.tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
|
||||
return false;
|
||||
|
||||
/*
|
||||
|
|
@ -408,7 +408,7 @@ radv_use_htile_for_image(const struct radv_device *device, const struct radv_ima
|
|||
!(gfx_level == GFX10_3 && device->vk.enabled_features.attachmentFragmentShadingRate))
|
||||
return false;
|
||||
|
||||
return (image->vk.mip_levels == 1 || use_htile_for_mips) && !image->shareable;
|
||||
return (image->vk.mip_levels == 1 || use_htile_for_mips) && !image->vk.external_handle_types;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -1046,7 +1046,7 @@ radv_get_ac_surf_info(struct radv_device *device, const struct radv_image *image
|
|||
info.levels = image->vk.mip_levels;
|
||||
info.num_channels = vk_format_get_nr_components(image->vk.format);
|
||||
|
||||
if (!vk_format_is_depth_or_stencil(image->vk.format) && !image->shareable &&
|
||||
if (!vk_format_is_depth_or_stencil(image->vk.format) && !image->vk.external_handle_types &&
|
||||
!(image->vk.create_flags & (VK_IMAGE_CREATE_SPARSE_ALIASED_BIT | VK_IMAGE_CREATE_ALIAS_BIT |
|
||||
VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT)) &&
|
||||
image->vk.tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
|
||||
|
|
@ -1409,11 +1409,6 @@ radv_image_create(VkDevice _device, const struct radv_image_create_info *create_
|
|||
image->queue_family_mask &= ~(1u << RADV_QUEUE_SPARSE);
|
||||
}
|
||||
|
||||
const VkExternalMemoryImageCreateInfo *external_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, EXTERNAL_MEMORY_IMAGE_CREATE_INFO);
|
||||
|
||||
image->shareable = external_info;
|
||||
|
||||
if (mod_list)
|
||||
modifier = radv_select_modifier(device, format, mod_list);
|
||||
else if (explicit_mod)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ struct radv_image {
|
|||
|
||||
unsigned queue_family_mask;
|
||||
bool exclusive;
|
||||
bool shareable;
|
||||
bool dcc_sign_reinterpret;
|
||||
bool support_comp_to_single;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue