[Mesa-dev] [PATCH 4/5] vulkan/wsi: Use the interface from the real modifiers extension
Daniel Stone
daniel at fooishbar.org
Wed Oct 3 11:15:15 UTC 2018
Hi,
On Mon, 1 Oct 2018 at 22:25, Jason Ekstrand <jason at jlekstrand.net> wrote:
> index 70594d6c053..2850349a619 100644
> --- a/src/intel/vulkan/anv_image.c
> +++ b/src/intel/vulkan/anv_image.c
> @@ -109,6 +109,8 @@ choose_isl_tiling_flags(const struct anv_image_create_info *anv_info,
> case VK_IMAGE_TILING_LINEAR:
> flags = ISL_TILING_LINEAR_BIT;
> break;
> + case VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT:
> + flags = 1 << isl_mod_info->tiling;
This will break non-modifier-aware setups, as we'll call
choose_isl_tiling_flags(isl_mod_info == NULL) ...
> @@ -563,10 +562,13 @@ anv_image_create(VkDevice _device,
>
> const struct wsi_image_create_info *wsi_info =
> vk_find_struct_const(pCreateInfo->pNext, WSI_IMAGE_CREATE_INFO_MESA);
> - if (wsi_info && wsi_info->modifier_count > 0) {
> +
> + if (pCreateInfo->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
> + const VkImageDrmFormatModifierListCreateInfoEXT *mod_info =
> + vk_find_struct_const(pCreateInfo->pNext, IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT);
> isl_mod_info = choose_drm_format_mod(&device->instance->physicalDevice,
> - wsi_info->modifier_count,
> - wsi_info->modifiers);
> + mod_info->drmFormatModifierCount,
> + mod_info->pDrmFormatModifiers);
> assert(isl_mod_info);
> }
... when this branch is not taken.
Cheers,
Daniel
More information about the mesa-dev
mailing list