Commit a6cd7ee2 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winevulkan: Remove unneeded needs_conversion() calls.

parent 844f1b17
......@@ -654,19 +654,6 @@ class VkFunction(object):
def returns_longlong(self):
return self.type in ["uint64_t", "VkDeviceAddress"]
def needs_conversion(self):
""" Check if the function needs any input/output type conversion.
Functions need input/output conversion if struct parameters have
alignment differences between Win32 and Linux 32-bit.
"""
for p in self.params:
if p.needs_conversion():
LOGGER.debug("Parameter {0} to {1} requires conversion".format(p.name, self.name))
return True
return False
def needs_unwrapping(self):
""" Check if the function needs any input/output type unwrapping.
Functions need input/output unwrapping if struct parameters have
......@@ -1098,9 +1085,6 @@ class VkHandle(object):
def is_wrapped(self):
return self.native_handle("test") is not None
def needs_conversion(self):
return False
def needs_unwrapping(self):
return self.is_wrapped()
......@@ -1384,20 +1368,17 @@ class VkMember(VkVariable):
def get_conversions(self, func=None):
""" Return any conversion description for this member and its children when conversion is needed. """
# Check if we need conversion either for this member itself or for any child members
# in case member represents a struct.
if not self.needs_conversion() and not self.needs_unwrapping():
return None
conversions = []
# Collect any conversion for any member structs.
if self.is_struct():
struct = self.type_info["data"]
for m in struct:
if m.type == struct.name:
continue
m.needs_struct_extensions_conversion()
if m.needs_conversion() or m.needs_unwrapping():
conversions.extend(m.get_conversions(func))
conversions.extend(m.get_conversions(func))
struct.needs_struct_extensions_conversion()
direction = Direction.OUTPUT if struct.returnedonly else Direction.INPUT
......@@ -1640,9 +1621,6 @@ class VkParam(VkVariable):
elif not self.is_handle():
return None
if not self.needs_conversion() and not self.needs_unwrapping():
return None
conversions = []
# Collect any member conversions first, so we can guarantee
......@@ -1653,9 +1631,6 @@ class VkParam(VkVariable):
if not m.is_struct():
continue
if not m.needs_conversion() and not m.needs_unwrapping():
continue
conversions.extend(m.get_conversions(func))
# Conversion requirements for the 'parent' parameter.
......@@ -2334,9 +2309,6 @@ class VkGenerator(object):
if not func.is_required():
continue
if not func.needs_conversion() and not func.needs_unwrapping():
continue
conversions = func.get_conversions()
for conv in conversions:
# Append if we don't already have this conversion.
......
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