From 692625a36a3e09780919ac7396d9c460db486c01 Mon Sep 17 00:00:00 2001 From: Jacek Caban <jacek@codeweavers.com> Date: Fri, 4 Nov 2022 10:36:10 +0100 Subject: [PATCH] winevulkan: Don't declare host types for structs that don't need it. --- dlls/winevulkan/make_vulkan | 3 +-- dlls/winevulkan/vulkan_thunks.h | 30 ------------------------------ 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 56f3db64389..2d506e031aa 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2097,7 +2097,6 @@ class ArrayConversionFunction(object): def __init__(self, array, direction, conv, unwrap): self.array = array self.direction = direction - self.operand = array.struct if array.is_struct() else array.handle self.type = array.type self.conv = conv self.unwrap = unwrap or not array.needs_unwrapping() @@ -2302,7 +2301,7 @@ class VkGenerator(object): if not any(c == conv for c in self.conversions): self.conversions.append(conv) - if not isinstance(conv.operand, VkStruct): + if not isinstance(conv, StructConversionFunction) or not conv.operand.needs_host_type(): continue # Structs can be used in different ways by different conversions diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h index 43e43664bd3..d77a6c0c3be 100644 --- a/dlls/winevulkan/vulkan_thunks.h +++ b/dlls/winevulkan/vulkan_thunks.h @@ -1762,23 +1762,6 @@ typedef struct VkBindSparseInfo_host typedef VkBindSparseInfo VkBindSparseInfo_host; #endif -#if defined(USE_STRUCT_CONVERSION) -typedef struct VkSubmitInfo_host -{ - VkStructureType sType; - const void *pNext; - uint32_t waitSemaphoreCount; - const VkSemaphore *pWaitSemaphores; - const VkPipelineStageFlags *pWaitDstStageMask; - uint32_t commandBufferCount; - const VkCommandBuffer *pCommandBuffers; - uint32_t signalSemaphoreCount; - const VkSemaphore *pSignalSemaphores; -} VkSubmitInfo_host; -#else -typedef VkSubmitInfo VkSubmitInfo_host; -#endif - #if defined(USE_STRUCT_CONVERSION) typedef struct VkSemaphoreSubmitInfo_host { @@ -1794,19 +1777,6 @@ typedef VkSemaphoreSubmitInfo VkSemaphoreSubmitInfoKHR; typedef VkSemaphoreSubmitInfo VkSemaphoreSubmitInfo_host; #endif -#if defined(USE_STRUCT_CONVERSION) -typedef struct VkCommandBufferSubmitInfo_host -{ - VkStructureType sType; - const void *pNext; - VkCommandBuffer commandBuffer; - uint32_t deviceMask; -} VkCommandBufferSubmitInfo_host; -typedef VkCommandBufferSubmitInfo VkCommandBufferSubmitInfoKHR; -#else -typedef VkCommandBufferSubmitInfo VkCommandBufferSubmitInfo_host; -#endif - #if defined(USE_STRUCT_CONVERSION) typedef struct VkSubmitInfo2_host { -- GitLab