Liam Middlebrook : winevulkan: Handle bitmask types backed by VkFlags64.

Alexandre Julliard julliard at winehq.org
Mon Feb 15 16:09:50 CST 2021


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

Author: Liam Middlebrook <lmiddlebrook at nvidia.com>
Date:   Mon Feb 15 02:18:47 2021 -0800

winevulkan: Handle bitmask types backed by VkFlags64.

Previously bitmask types were always treated as 32-bit values, now the basetype of each bitmask must
be checked.

Signed-off-by: Liam Middlebrook <lmiddlebrook at nvidia.com>
Signed-off-by: Piers Daniell <pdaniell at nvidia.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winevulkan/make_vulkan | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 76eba97180b..f341c3c5ad0 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -1375,7 +1375,14 @@ class VkParam(object):
         if self.is_static_array() or self.is_pointer():
             self.format_str = "%p"
         else:
-            if self.type_info["category"] in ["bitmask", "enum"]:
+            if self.type_info["category"] in ["bitmask"]:
+                # Since 1.2.170 bitmasks can be 32 or 64-bit, check the basetype.
+                if self.type_info["data"].type == "VkFlags64":
+                    self.format_str = "0x%s"
+                    self.format_conv = "wine_dbgstr_longlong({0})"
+                else:
+                    self.format_str = "%#x"
+            elif self.type_info["category"] in ["enum"]:
                 self.format_str = "%#x"
             elif self.is_handle():
                 # We use uint64_t for non-dispatchable handles as opposed to pointers
@@ -1577,7 +1584,13 @@ class VkParam(object):
             return "str"
         if self.is_dispatchable() or self.is_pointer() or self.is_static_array():
             return "ptr"
-        if self.type_info["category"] in ["bitmask", "enum"]:
+        if self.type_info["category"] in ["bitmask"]:
+            # Since 1.2.170 bitmasks can be 32 or 64-bit, check the basetype.
+            if self.type_info["data"].type == "VkFlags64":
+                return "int64"
+            else:
+                return "long"
+        if self.type_info["category"] in ["enum"]:
             return "long"
         if self.is_handle() and not self.is_dispatchable():
             return "int64"




More information about the wine-cvs mailing list