[Mesa-dev] [PATCH 4/5] vulkan/wsi: Use the interface from the real modifiers extension
Jason Ekstrand
jason at jlekstrand.net
Wed Oct 3 12:53:15 UTC 2018
On Wed, Oct 3, 2018 at 6:15 AM Daniel Stone <daniel at fooishbar.org> wrote:
> 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.
>
But that's the "tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT" branch.
I'm very confused how you can get to that case if that branch is not
taken. That said, I'll freely admit to not having tested this branch all
that thoroughly.
--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181003/03365255/attachment.html>
More information about the mesa-dev
mailing list