mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 04:54:46 +00:00
winevulkan: Move needs_unwrapping implementation to VkVariable.
This commit is contained in:
parent
a2dc7a4ad0
commit
ee4c61a1b5
|
@ -1203,6 +1203,20 @@ class VkVariable(object):
|
||||||
return not self.handle.is_dispatchable()
|
return not self.handle.is_dispatchable()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def needs_unwrapping(self):
|
||||||
|
""" Returns if variable needs unwrapping of handle. """
|
||||||
|
|
||||||
|
if self.is_struct():
|
||||||
|
return self.struct.needs_unwrapping()
|
||||||
|
|
||||||
|
if self.is_handle():
|
||||||
|
return self.handle.needs_unwrapping()
|
||||||
|
|
||||||
|
if self.is_generic_handle():
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
def needs_alloc(self, conv, unwrap):
|
def needs_alloc(self, conv, unwrap):
|
||||||
""" Returns True if conversion needs allocation """
|
""" Returns True if conversion needs allocation """
|
||||||
if self.is_dynamic_array():
|
if self.is_dynamic_array():
|
||||||
|
@ -1425,20 +1439,6 @@ class VkMember(VkVariable):
|
||||||
def is_bit_field(self):
|
def is_bit_field(self):
|
||||||
return self.bit_width is not None
|
return self.bit_width is not None
|
||||||
|
|
||||||
def needs_unwrapping(self):
|
|
||||||
""" Structures with wrapped handles need unwrapping. """
|
|
||||||
|
|
||||||
if self.is_struct():
|
|
||||||
return self.struct.needs_unwrapping()
|
|
||||||
|
|
||||||
if self.is_handle():
|
|
||||||
return self.handle.is_wrapped()
|
|
||||||
|
|
||||||
if self.is_generic_handle():
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
def needs_conversion(self, conv, unwrap, direction, struct_const):
|
def needs_conversion(self, conv, unwrap, direction, struct_const):
|
||||||
""" Check if member needs conversion. """
|
""" Check if member needs conversion. """
|
||||||
|
|
||||||
|
@ -1678,18 +1678,6 @@ class VkParam(VkVariable):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def needs_unwrapping(self):
|
|
||||||
""" Returns if parameter needs unwrapping of handle. """
|
|
||||||
|
|
||||||
# Wrapped handle parameters are handled separately, only look for wrapped handles in structs
|
|
||||||
if self.is_struct():
|
|
||||||
return self.struct.needs_unwrapping()
|
|
||||||
|
|
||||||
if self.is_handle() and self.is_dynamic_array():
|
|
||||||
return self.handle.needs_unwrapping()
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
def spec(self):
|
def spec(self):
|
||||||
""" Generate spec file entry for this parameter. """
|
""" Generate spec file entry for this parameter. """
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue