@@ -75,7 +75,7 @@ wsi_create_ahardware_buffer_image_mem(const struct wsi_swapchain *chain,
7575 const struct wsi_image_info * info ,
7676 struct wsi_image * image )
7777{
78- LOG_A ( "In wsi_create_ahardware_buffer_image_mem " );
78+ WSI_LOGT ( "not blitting " );
7979 const struct wsi_device * wsi = chain -> wsi ;
8080 VkImage old_image = image -> image ;
8181 VkResult result ;
@@ -129,7 +129,7 @@ wsi_create_ahardware_buffer_image_mem(const struct wsi_swapchain *chain,
129129 };
130130 result = wsi -> AllocateMemory (chain -> device , & memory_info ,
131131 & chain -> alloc , & image -> memory );
132- LOG_A ("wsi->AllocateMemory: %d" , result );
132+ WSI_LOGT ("wsi->AllocateMemory: %d" , result );
133133 if (result != VK_SUCCESS )
134134 return vk_errorf (NULL , result , "Failed to allocate memory" );
135135 image -> num_planes = 1 ;
@@ -142,6 +142,7 @@ wsi_create_ahardware_buffer_blit_context(const struct wsi_swapchain *chain,
142142 const struct wsi_image_info * info ,
143143 struct wsi_image * image )
144144{
145+ WSI_LOGT ("blitting" );
145146 assert (chain -> blit .type == WSI_SWAPCHAIN_IMAGE_BLIT );
146147 const struct wsi_device * wsi = chain -> wsi ;
147148 VkResult result ;
@@ -172,7 +173,7 @@ wsi_create_ahardware_buffer_blit_context(const struct wsi_swapchain *chain,
172173 .pNext = & external_format ,
173174 .handleTypes = handle_types ,
174175 };
175- const VkImageCreateInfo image_info = {
176+ VkImageCreateInfo image_info = {
176177 .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO ,
177178 .pNext = & external_memory_info ,
178179 .flags = 0u ,
@@ -191,6 +192,20 @@ wsi_create_ahardware_buffer_blit_context(const struct wsi_swapchain *chain,
191192 info -> create .pQueueFamilyIndices ,
192193 .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED ,
193194 };
195+
196+ // VVL if external_format.externalFormat
197+ // Validation Error: [ VUID-VkImageCreateInfo-pNext-01974 ] | MessageID = 0xee97da05
198+ // vkCreateImage(): pCreateInfo->pNext<VkExternalFormatANDROID>.externalFormat (40) is non-zero, format is VK_FORMAT_R8G8B8A8_UNORM.
199+ // Validation Error: [ VUID-VkImageCreateInfo-pNext-02397 ] | MessageID = 0xcac730da
200+ // vkCreateImage(): pCreateInfo->pNext<VkExternalFormatANDROID>.externalFormat (40) is non-zero, but usage is VK_IMAGE_USAGE_TRANSFER_DST_BIT.
201+ // Validation Error: [ VUID-VkImageCreateInfo-pNext-02398 ] | MessageID = 0xc94b7919
202+ // vkCreateImage(): pCreateInfo->pNext<VkExternalFormatANDROID>.externalFormat (40) is non-zero, but layout is VK_IMAGE_TILING_LINEAR.
203+ if (external_format .externalFormat != 0 ) {
204+ image_info .format = VK_FORMAT_UNDEFINED ;
205+ image_info .tiling = VK_IMAGE_TILING_OPTIMAL ;
206+ image_info .usage = VK_IMAGE_USAGE_SAMPLED_BIT ;
207+ }
208+
194209 result = wsi -> CreateImage (chain -> device , & image_info ,
195210 & chain -> alloc , & image -> blit .image );
196211 if (result != VK_SUCCESS )
0 commit comments