[PATCH 3/5] wined3d: Report WINED3D_FORMAT_CAP_BLIT for formats supporting VK_FORMAT_FEATURE_TRANSFER_SRC or VK_FORMAT_FEATURE_TRANSFER_DST.

Zebediah Figura wine at gitlab.winehq.org
Wed Jun 15 16:56:27 CDT 2022


From: Zebediah Figura <zfigura at codeweavers.com>

Vulkan 1.0 implementations without KHR_maintenance1 will still be broken. In order to work around this we would have to try creating textures with TRANSFER_* usage. This does not seem worthwhile.
---
 dlls/wined3d/utils.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 7761576c058..06c95135678 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4397,6 +4397,11 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format,
     {
         caps |= WINED3D_FORMAT_CAP_UNORDERED_ACCESS;
     }
+    if ((texture_flags & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT)
+            && (texture_flags & VK_FORMAT_FEATURE_TRANSFER_DST_BIT))
+    {
+        caps |= WINED3D_FORMAT_CAP_BLIT;
+    }
 
     if (!(~caps & (WINED3D_FORMAT_CAP_RENDERTARGET | WINED3D_FORMAT_CAP_FILTERING)))
         caps |= WINED3D_FORMAT_CAP_GEN_MIPMAP;
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/255



More information about the wine-devel mailing list