<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Oct 3, 2018 at 6:15 AM Daniel Stone <<a href="mailto:daniel@fooishbar.org">daniel@fooishbar.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On Mon, 1 Oct 2018 at 22:25, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>> wrote:<br>
> index 70594d6c053..2850349a619 100644<br>
> --- a/src/intel/vulkan/anv_image.c<br>
> +++ b/src/intel/vulkan/anv_image.c<br>
> @@ -109,6 +109,8 @@ choose_isl_tiling_flags(const struct anv_image_create_info *anv_info,<br>
> case VK_IMAGE_TILING_LINEAR:<br>
> flags = ISL_TILING_LINEAR_BIT;<br>
> break;<br>
> + case VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT:<br>
> + flags = 1 << isl_mod_info->tiling;<br>
<br>
This will break non-modifier-aware setups, as we'll call<br>
choose_isl_tiling_flags(isl_mod_info == NULL) ...<br>
<br>
> @@ -563,10 +562,13 @@ anv_image_create(VkDevice _device,<br>
><br>
> const struct wsi_image_create_info *wsi_info =<br>
> vk_find_struct_const(pCreateInfo->pNext, WSI_IMAGE_CREATE_INFO_MESA);<br>
> - if (wsi_info && wsi_info->modifier_count > 0) {<br>
> +<br>
> + if (pCreateInfo->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {<br>
> + const VkImageDrmFormatModifierListCreateInfoEXT *mod_info =<br>
> + vk_find_struct_const(pCreateInfo->pNext, IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT);<br>
> isl_mod_info = choose_drm_format_mod(&device->instance->physicalDevice,<br>
> - wsi_info->modifier_count,<br>
> - wsi_info->modifiers);<br>
> + mod_info->drmFormatModifierCount,<br>
> + mod_info->pDrmFormatModifiers);<br>
> assert(isl_mod_info);<br>
> }<br>
<br>
... when this branch is not taken.<br></blockquote><div><br></div><div>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.</div><div><br></div><div>--Jason<br></div></div></div>