[PATCH 1/2] winevulkan: Handle bitmask types backed by VkFlags64
Georg Lehmann
dadschoorse at gmail.com
Mon Feb 15 06:12:26 CST 2021
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 at nvidia.com>
> Signed-off-by: Piers Daniell <pdaniell at 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
More information about the wine-devel
mailing list