winevulkan: Convert dispatchable handle array struct members.

This commit is contained in:
Jacek Caban 2022-11-12 01:15:53 +01:00 committed by Alexandre Julliard
parent a8539fc979
commit 2ad6d865d1
2 changed files with 20 additions and 16 deletions

View file

@ -1396,7 +1396,9 @@ class VkMember(VkVariable):
count = self.array_len
if direction == Direction.OUTPUT:
# Needed by VkMemoryHeap.memoryHeaps
return "convert_{0}_array_host_to_{5}({2}{1}, {3}{1}, {4});\n".format(self.type, self.name, input, output, count, win_type)
host_part = "host" if unwrap else "unwrapped_host"
return "convert_{0}_array_{6}_to_{5}({2}{1}, {3}{1}, {4});\n".format(
self.type, self.name, input, output, count, win_type, host_part)
else:
# Nothing needed this yet.
LOGGER.warn("TODO: implement copying of static array for {0}.{1}".format(self.type, self.name))
@ -1485,6 +1487,8 @@ class VkMember(VkVariable):
if self.is_handle():
if unwrap and self.handle.is_wrapped():
return True
if conv and self.handle.is_dispatchable():
return True
elif self.is_generic_handle():
if unwrap:
return True

View file

@ -16019,6 +16019,20 @@ static inline void convert_VkDebugMarkerObjectTagInfoEXT_win32_to_host(const VkD
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPhysicalDevice_array_unwrapped_host_to_win32(const VkPhysicalDevice *in, VkPhysicalDevice *out, uint32_t count)
{
unsigned int i;
if (!in) return;
for (i = 0; i < count; i++)
{
out[i] = in[i];
}
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPhysicalDeviceGroupProperties_win32_to_unwrapped_host(const VkPhysicalDeviceGroupProperties32 *in, VkPhysicalDeviceGroupProperties *out)
{
@ -16035,7 +16049,7 @@ static inline void convert_VkPhysicalDeviceGroupProperties_unwrapped_host_to_win
if (!in) return;
out->physicalDeviceCount = in->physicalDeviceCount;
memcpy(out->physicalDevices, in->physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice));
convert_VkPhysicalDevice_array_unwrapped_host_to_win32(in->physicalDevices, out->physicalDevices, VK_MAX_DEVICE_GROUP_SIZE);
out->subsetAllocation = in->subsetAllocation;
}
#endif /* USE_STRUCT_CONVERSION */
@ -16180,20 +16194,6 @@ static inline void convert_VkPerformanceCounterDescriptionKHR_array_host_to_win3
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkPhysicalDevice_array_unwrapped_host_to_win32(const VkPhysicalDevice *in, VkPhysicalDevice *out, uint32_t count)
{
unsigned int i;
if (!in) return;
for (i = 0; i < count; i++)
{
out[i] = in[i];
}
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkMappedMemoryRange_win32_to_host(const VkMappedMemoryRange32 *in, VkMappedMemoryRange *out)
{