winevulkan: Support functions with basic_c return types.

Needed for VK_KHR_buffer_device_address which uses uint64_t as a return type.

Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Piers Daniell <pdaniell@nvidia.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Liam Middlebrook 2020-01-07 13:54:05 -08:00 committed by Alexandre Julliard
parent d82a2683b1
commit 9058f5e08b
1 changed files with 8 additions and 1 deletions

View File

@ -2845,6 +2845,7 @@ class VkRegistry(object):
for t in types: for t in types:
type_info = {} type_info = {}
type_info["category"] = t.attrib.get("category", None) type_info["category"] = t.attrib.get("category", None)
type_info["requires"] = t.attrib.get("requires", None)
# We parse aliases in a second pass when we know more. # We parse aliases in a second pass when we know more.
alias = t.attrib.get("alias") alias = t.attrib.get("alias")
@ -2863,13 +2864,19 @@ class VkRegistry(object):
base_types.append(basetype) base_types.append(basetype)
type_info["data"] = basetype type_info["data"] = basetype
# Basic C types don't need us to define them, but we do need data for them
if type_info["requires"] == "vk_platform":
requires = type_info["requires"]
basic_c = VkBaseType(name, _type, requires=requires)
type_info["data"] = basic_c
if type_info["category"] == "bitmask": if type_info["category"] == "bitmask":
name = t.find("name").text name = t.find("name").text
_type = t.find("type").text _type = t.find("type").text
# Most bitmasks have a requires attribute used to pull in # Most bitmasks have a requires attribute used to pull in
# required '*FlagBits" enum. # required '*FlagBits" enum.
requires = t.attrib.get("requires") requires = type_info["requires"]
bitmask = VkBaseType(name, _type, requires=requires) bitmask = VkBaseType(name, _type, requires=requires)
bitmasks.append(bitmask) bitmasks.append(bitmask)
type_info["data"] = bitmask type_info["data"] = bitmask