[PATCH 1/2] 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(a)nvidia.com> Signed-off-by: Piers Daniell <pdaniell(a)nvidia.com> --- 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" -- 2.30.0
Signed-off-by: Liam Middlebrook <lmiddlebrook(a)nvidia.com> Signed-off-by: Piers Daniell <pdaniell(a)nvidia.com> --- dlls/winevulkan/make_vulkan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index f341c3c5ad0..1243f211b5e 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -64,7 +64,7 @@ from enum import Enum LOGGER = logging.Logger("vulkan") LOGGER.addHandler(logging.StreamHandler()) -VK_XML_VERSION = "1.2.168" +VK_XML_VERSION = "1.2.170" WINE_VK_VERSION = (1, 2) # Filenames to create. -- 2.30.0
On 15.02.21 11:18, Liam Middlebrook wrote:
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(a)nvidia.com> Signed-off-by: Piers Daniell <pdaniell(a)nvidia.com> --- 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"
Hi Liam, This aren't the only changes needed to support 64bit flags: - VkMember::needs_alignment doesn't return True for 64bit flags - there's still an enum generated in include/vulkan.h instead of individual constants Thanks, Georg Lehmann
participants (2)
-
Georg Lehmann -
Liam Middlebrook