Henri Verbeet : wined3d: Properly convert Vulkan sample count format information.

Alexandre Julliard julliard at winehq.org
Thu Jan 21 16:19:15 CST 2021


Module: wine
Branch: master
Commit: e796da7a5eda98f455fb02c7a1ca1e188c01faa0
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e796da7a5eda98f455fb02c7a1ca1e188c01faa0

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Jan 21 10:55:49 2021 +0100

wined3d: Properly convert Vulkan sample count format information.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/utils.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 4ec6e4db42d..e7e04e81557 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4133,6 +4133,7 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format,
     unsigned int flags;
     const char *fixup;
     unsigned int i;
+    uint32_t mask;
     VkResult vr;
 
     for (i = 0; i < ARRAY_SIZE(vulkan_formats); ++i)
@@ -4208,7 +4209,13 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format,
             ERR("Failed to get image format properties, vr %s.\n", wined3d_debug_vkresult(vr));
             return;
         }
-        format->f.multisample_types = image_properties.sampleCounts;
+
+        mask = image_properties.sampleCounts & 0x3f;
+        while (mask)
+        {
+            i = (1u << wined3d_bit_scan(&mask)) - 1;
+            format->f.multisample_types |= 1u << i;
+        }
     }
 }
 




More information about the wine-cvs mailing list