Commit 2ad6d865 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winevulkan: Convert dispatchable handle array struct members.

parent a8539fc9
......@@ -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
......
......@@ -16020,6 +16020,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)
{
if (!in) return;
......@@ -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 */
......@@ -16181,20 +16195,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)
{
if (!in) return;
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