winevulkan: Reflect USE_STRUCT_CONVERSION in _host typedefs.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-05-31 16:16:54 +02:00 committed by Alexandre Julliard
parent aa26f96622
commit 8cbad5bc6d
3 changed files with 433 additions and 109 deletions

View File

@ -1927,15 +1927,13 @@ class VkStruct(Sequence):
text += " {0};\n".format(m.definition())
if postfix is not None:
text += "}} {0}{1};\n\n".format(self.name, postfix)
text += "}} {0}{1};\n".format(self.name, postfix)
else:
text += "}} {0};\n".format(self.name)
for aliasee in self.aliased_by:
text += "typedef {0} {1};\n".format(self.name, aliasee.name)
text += "\n"
return text
def is_alias(self):
@ -2781,7 +2779,11 @@ class VkGenerator(object):
f.write("\n")
for struct in self.host_structs:
f.write("#if defined(USE_STRUCT_CONVERSION)\n")
f.write(struct.definition(align=False, conv=True, postfix="_host"))
f.write("#else\n")
f.write("typedef {0} {0}_host;\n".format(struct.name))
f.write("#endif\n\n")
f.write("\n")
for func in self.struct_chain_conversions:
@ -3037,6 +3039,7 @@ class VkGenerator(object):
for struct in structs:
LOGGER.debug("Generating struct: {0}".format(struct.name))
f.write(struct.definition(align=True))
f.write("\n")
for func in self.registry.funcs.values():
if not func.is_required():

File diff suppressed because it is too large Load Diff

View File

@ -4429,6 +4429,7 @@ typedef struct VkMemoryRequirements
uint32_t memoryTypeBits;
} VkMemoryRequirements;
typedef struct VkMutableDescriptorTypeListVALVE
{
uint32_t descriptorTypeCount;
@ -6483,6 +6484,7 @@ typedef struct VkPhysicalDeviceShaderClockFeaturesKHR
VkBool32 shaderDeviceClock;
} VkPhysicalDeviceShaderClockFeaturesKHR;
typedef struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT
{
VkStructureType sType;
@ -8563,6 +8565,7 @@ typedef struct VkPhysicalDeviceProperties2
} VkPhysicalDeviceProperties2;
typedef VkPhysicalDeviceProperties2 VkPhysicalDeviceProperties2KHR;
typedef struct VkPipelineSampleLocationsStateCreateInfoEXT
{
VkStructureType sType;