Commit 8cbad5bc authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winevulkan: Reflect USE_STRUCT_CONVERSION in _host typedefs.

parent aa26f966
...@@ -1927,15 +1927,13 @@ class VkStruct(Sequence): ...@@ -1927,15 +1927,13 @@ class VkStruct(Sequence):
text += " {0};\n".format(m.definition()) text += " {0};\n".format(m.definition())
if postfix is not None: if postfix is not None:
text += "}} {0}{1};\n\n".format(self.name, postfix) text += "}} {0}{1};\n".format(self.name, postfix)
else: else:
text += "}} {0};\n".format(self.name) text += "}} {0};\n".format(self.name)
for aliasee in self.aliased_by: for aliasee in self.aliased_by:
text += "typedef {0} {1};\n".format(self.name, aliasee.name) text += "typedef {0} {1};\n".format(self.name, aliasee.name)
text += "\n"
return text return text
def is_alias(self): def is_alias(self):
...@@ -2781,7 +2779,11 @@ class VkGenerator(object): ...@@ -2781,7 +2779,11 @@ class VkGenerator(object):
f.write("\n") f.write("\n")
for struct in self.host_structs: 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(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") f.write("\n")
for func in self.struct_chain_conversions: for func in self.struct_chain_conversions:
...@@ -3037,6 +3039,7 @@ class VkGenerator(object): ...@@ -3037,6 +3039,7 @@ class VkGenerator(object):
for struct in structs: for struct in structs:
LOGGER.debug("Generating struct: {0}".format(struct.name)) LOGGER.debug("Generating struct: {0}".format(struct.name))
f.write(struct.definition(align=True)) f.write(struct.definition(align=True))
f.write("\n")
for func in self.registry.funcs.values(): for func in self.registry.funcs.values():
if not func.is_required(): if not func.is_required():
......
...@@ -4429,6 +4429,7 @@ typedef struct VkMemoryRequirements ...@@ -4429,6 +4429,7 @@ typedef struct VkMemoryRequirements
uint32_t memoryTypeBits; uint32_t memoryTypeBits;
} VkMemoryRequirements; } VkMemoryRequirements;
typedef struct VkMutableDescriptorTypeListVALVE typedef struct VkMutableDescriptorTypeListVALVE
{ {
uint32_t descriptorTypeCount; uint32_t descriptorTypeCount;
...@@ -6483,6 +6484,7 @@ typedef struct VkPhysicalDeviceShaderClockFeaturesKHR ...@@ -6483,6 +6484,7 @@ typedef struct VkPhysicalDeviceShaderClockFeaturesKHR
VkBool32 shaderDeviceClock; VkBool32 shaderDeviceClock;
} VkPhysicalDeviceShaderClockFeaturesKHR; } VkPhysicalDeviceShaderClockFeaturesKHR;
typedef struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT typedef struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT
{ {
VkStructureType sType; VkStructureType sType;
...@@ -8563,6 +8565,7 @@ typedef struct VkPhysicalDeviceProperties2 ...@@ -8563,6 +8565,7 @@ typedef struct VkPhysicalDeviceProperties2
} VkPhysicalDeviceProperties2; } VkPhysicalDeviceProperties2;
typedef VkPhysicalDeviceProperties2 VkPhysicalDeviceProperties2KHR; typedef VkPhysicalDeviceProperties2 VkPhysicalDeviceProperties2KHR;
typedef struct VkPipelineSampleLocationsStateCreateInfoEXT typedef struct VkPipelineSampleLocationsStateCreateInfoEXT
{ {
VkStructureType sType; VkStructureType sType;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment