Jan Sikorski (@jsikorski) commented about dlls/wined3d/texture.c:
TRACE("Created image view 0x%s.\n", wine_dbgstr_longlong(texture_vk->default_image_info.imageView));
texture_vk->default_image_info.sampler = VK_NULL_HANDLE; - texture_vk->default_image_info.imageLayout = texture_vk->layout; + if (texture_vk->layout == VK_IMAGE_LAYOUT_GENERAL) + texture_vk->default_image_info.imageLayout = VK_IMAGE_LAYOUT_GENERAL; + else + texture_vk->default_image_info.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
It looks correct, but fairly brittle in that it depends on how we're setting things up elsewhere, as you mentioned below the commit message; I think it deserves a short explanation inline with the code. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2455#note_29301