Commit 0a2bffa7 authored by Georg Lehmann's avatar Georg Lehmann Committed by Alexandre Julliard

winevulkan: Fix handling bitmasks in needs_alignment.

parent e05a8697
...@@ -1557,14 +1557,14 @@ struct vkCmdResetEvent2_params ...@@ -1557,14 +1557,14 @@ struct vkCmdResetEvent2_params
{ {
VkCommandBuffer commandBuffer; VkCommandBuffer commandBuffer;
VkEvent DECLSPEC_ALIGN(8) event; VkEvent DECLSPEC_ALIGN(8) event;
VkPipelineStageFlags2 stageMask; VkPipelineStageFlags2 DECLSPEC_ALIGN(8) stageMask;
}; };
struct vkCmdResetEvent2KHR_params struct vkCmdResetEvent2KHR_params
{ {
VkCommandBuffer commandBuffer; VkCommandBuffer commandBuffer;
VkEvent DECLSPEC_ALIGN(8) event; VkEvent DECLSPEC_ALIGN(8) event;
VkPipelineStageFlags2 stageMask; VkPipelineStageFlags2 DECLSPEC_ALIGN(8) stageMask;
}; };
struct vkCmdResetQueryPool_params struct vkCmdResetQueryPool_params
...@@ -2316,7 +2316,7 @@ struct vkCmdWriteAccelerationStructuresPropertiesNV_params ...@@ -2316,7 +2316,7 @@ struct vkCmdWriteAccelerationStructuresPropertiesNV_params
struct vkCmdWriteBufferMarker2AMD_params struct vkCmdWriteBufferMarker2AMD_params
{ {
VkCommandBuffer commandBuffer; VkCommandBuffer commandBuffer;
VkPipelineStageFlags2 stage; VkPipelineStageFlags2 DECLSPEC_ALIGN(8) stage;
VkBuffer DECLSPEC_ALIGN(8) dstBuffer; VkBuffer DECLSPEC_ALIGN(8) dstBuffer;
VkDeviceSize DECLSPEC_ALIGN(8) dstOffset; VkDeviceSize DECLSPEC_ALIGN(8) dstOffset;
uint32_t marker; uint32_t marker;
...@@ -2352,7 +2352,7 @@ struct vkCmdWriteTimestamp_params ...@@ -2352,7 +2352,7 @@ struct vkCmdWriteTimestamp_params
struct vkCmdWriteTimestamp2_params struct vkCmdWriteTimestamp2_params
{ {
VkCommandBuffer commandBuffer; VkCommandBuffer commandBuffer;
VkPipelineStageFlags2 stage; VkPipelineStageFlags2 DECLSPEC_ALIGN(8) stage;
VkQueryPool DECLSPEC_ALIGN(8) queryPool; VkQueryPool DECLSPEC_ALIGN(8) queryPool;
uint32_t query; uint32_t query;
}; };
...@@ -2360,7 +2360,7 @@ struct vkCmdWriteTimestamp2_params ...@@ -2360,7 +2360,7 @@ struct vkCmdWriteTimestamp2_params
struct vkCmdWriteTimestamp2KHR_params struct vkCmdWriteTimestamp2KHR_params
{ {
VkCommandBuffer commandBuffer; VkCommandBuffer commandBuffer;
VkPipelineStageFlags2 stage; VkPipelineStageFlags2 DECLSPEC_ALIGN(8) stage;
VkQueryPool DECLSPEC_ALIGN(8) queryPool; VkQueryPool DECLSPEC_ALIGN(8) queryPool;
uint32_t query; uint32_t query;
}; };
......
...@@ -1165,6 +1165,9 @@ class VkVariable(object): ...@@ -1165,6 +1165,9 @@ class VkVariable(object):
def is_union(self): def is_union(self):
return self.type_info["category"] == "union" return self.type_info["category"] == "union"
def is_bitmask(self):
return self.type_info["category"] == "bitmask"
def is_dynamic_array(self): def is_dynamic_array(self):
""" Returns if the member is an array element. """ Returns if the member is an array element.
Vulkan uses this for dynamically sized arrays for which Vulkan uses this for dynamically sized arrays for which
...@@ -1197,6 +1200,8 @@ class VkVariable(object): ...@@ -1197,6 +1200,8 @@ class VkVariable(object):
return False return False
elif self.type in ["uint64_t", "VkDeviceAddress", "VkDeviceSize"]: elif self.type in ["uint64_t", "VkDeviceAddress", "VkDeviceSize"]:
return True return True
elif self.is_bitmask():
return self.type_info["data"].type == "VkFlags64"
elif self.is_struct() or self.is_union(): elif self.is_struct() or self.is_union():
return self.type_info["data"].needs_alignment() return self.type_info["data"].needs_alignment()
elif self.is_handle(): elif self.is_handle():
......
...@@ -4989,10 +4989,10 @@ typedef struct VkBufferMemoryBarrier2 ...@@ -4989,10 +4989,10 @@ typedef struct VkBufferMemoryBarrier2
{ {
VkStructureType sType; VkStructureType sType;
const void *pNext; const void *pNext;
VkPipelineStageFlags2 srcStageMask; VkPipelineStageFlags2 WINE_VK_ALIGN(8) srcStageMask;
VkAccessFlags2 srcAccessMask; VkAccessFlags2 WINE_VK_ALIGN(8) srcAccessMask;
VkPipelineStageFlags2 dstStageMask; VkPipelineStageFlags2 WINE_VK_ALIGN(8) dstStageMask;
VkAccessFlags2 dstAccessMask; VkAccessFlags2 WINE_VK_ALIGN(8) dstAccessMask;
uint32_t srcQueueFamilyIndex; uint32_t srcQueueFamilyIndex;
uint32_t dstQueueFamilyIndex; uint32_t dstQueueFamilyIndex;
VkBuffer WINE_VK_ALIGN(8) buffer; VkBuffer WINE_VK_ALIGN(8) buffer;
...@@ -5039,7 +5039,7 @@ typedef struct VkCheckpointData2NV ...@@ -5039,7 +5039,7 @@ typedef struct VkCheckpointData2NV
{ {
VkStructureType sType; VkStructureType sType;
void *pNext; void *pNext;
VkPipelineStageFlags2 stage; VkPipelineStageFlags2 WINE_VK_ALIGN(8) stage;
void *pCheckpointMarker; void *pCheckpointMarker;
} VkCheckpointData2NV; } VkCheckpointData2NV;
...@@ -5375,7 +5375,7 @@ typedef struct VkDecompressMemoryRegionNV ...@@ -5375,7 +5375,7 @@ typedef struct VkDecompressMemoryRegionNV
VkDeviceAddress WINE_VK_ALIGN(8) dstAddress; VkDeviceAddress WINE_VK_ALIGN(8) dstAddress;
VkDeviceSize WINE_VK_ALIGN(8) compressedSize; VkDeviceSize WINE_VK_ALIGN(8) compressedSize;
VkDeviceSize WINE_VK_ALIGN(8) decompressedSize; VkDeviceSize WINE_VK_ALIGN(8) decompressedSize;
VkMemoryDecompressionMethodFlagsNV decompressionMethod; VkMemoryDecompressionMethodFlagsNV WINE_VK_ALIGN(8) decompressionMethod;
} VkDecompressMemoryRegionNV; } VkDecompressMemoryRegionNV;
typedef struct VkDedicatedAllocationBufferCreateInfoNV typedef struct VkDedicatedAllocationBufferCreateInfoNV
...@@ -5876,9 +5876,9 @@ typedef struct VkFormatProperties3 ...@@ -5876,9 +5876,9 @@ typedef struct VkFormatProperties3
{ {
VkStructureType sType; VkStructureType sType;
void *pNext; void *pNext;
VkFormatFeatureFlags2 linearTilingFeatures; VkFormatFeatureFlags2 WINE_VK_ALIGN(8) linearTilingFeatures;
VkFormatFeatureFlags2 optimalTilingFeatures; VkFormatFeatureFlags2 WINE_VK_ALIGN(8) optimalTilingFeatures;
VkFormatFeatureFlags2 bufferFeatures; VkFormatFeatureFlags2 WINE_VK_ALIGN(8) bufferFeatures;
} VkFormatProperties3; } VkFormatProperties3;
typedef VkFormatProperties3 VkFormatProperties3KHR; typedef VkFormatProperties3 VkFormatProperties3KHR;
...@@ -6278,10 +6278,10 @@ typedef struct VkMemoryBarrier2 ...@@ -6278,10 +6278,10 @@ typedef struct VkMemoryBarrier2
{ {
VkStructureType sType; VkStructureType sType;
const void *pNext; const void *pNext;
VkPipelineStageFlags2 srcStageMask; VkPipelineStageFlags2 WINE_VK_ALIGN(8) srcStageMask;
VkAccessFlags2 srcAccessMask; VkAccessFlags2 WINE_VK_ALIGN(8) srcAccessMask;
VkPipelineStageFlags2 dstStageMask; VkPipelineStageFlags2 WINE_VK_ALIGN(8) dstStageMask;
VkAccessFlags2 dstAccessMask; VkAccessFlags2 WINE_VK_ALIGN(8) dstAccessMask;
} VkMemoryBarrier2; } VkMemoryBarrier2;
typedef VkMemoryBarrier2 VkMemoryBarrier2KHR; typedef VkMemoryBarrier2 VkMemoryBarrier2KHR;
...@@ -7670,7 +7670,7 @@ typedef struct VkPhysicalDeviceMemoryDecompressionPropertiesNV ...@@ -7670,7 +7670,7 @@ typedef struct VkPhysicalDeviceMemoryDecompressionPropertiesNV
{ {
VkStructureType sType; VkStructureType sType;
void *pNext; void *pNext;
VkMemoryDecompressionMethodFlagsNV decompressionMethods; VkMemoryDecompressionMethodFlagsNV WINE_VK_ALIGN(8) decompressionMethods;
uint64_t WINE_VK_ALIGN(8) maxDecompressionIndirectCount; uint64_t WINE_VK_ALIGN(8) maxDecompressionIndirectCount;
} VkPhysicalDeviceMemoryDecompressionPropertiesNV; } VkPhysicalDeviceMemoryDecompressionPropertiesNV;
...@@ -9376,7 +9376,7 @@ typedef struct VkQueueFamilyCheckpointProperties2NV ...@@ -9376,7 +9376,7 @@ typedef struct VkQueueFamilyCheckpointProperties2NV
{ {
VkStructureType sType; VkStructureType sType;
void *pNext; void *pNext;
VkPipelineStageFlags2 checkpointExecutionStageMask; VkPipelineStageFlags2 WINE_VK_ALIGN(8) checkpointExecutionStageMask;
} VkQueueFamilyCheckpointProperties2NV; } VkQueueFamilyCheckpointProperties2NV;
typedef struct VkQueueFamilyCheckpointPropertiesNV typedef struct VkQueueFamilyCheckpointPropertiesNV
...@@ -9712,7 +9712,7 @@ typedef struct VkSemaphoreSubmitInfo ...@@ -9712,7 +9712,7 @@ typedef struct VkSemaphoreSubmitInfo
const void *pNext; const void *pNext;
VkSemaphore WINE_VK_ALIGN(8) semaphore; VkSemaphore WINE_VK_ALIGN(8) semaphore;
uint64_t WINE_VK_ALIGN(8) value; uint64_t WINE_VK_ALIGN(8) value;
VkPipelineStageFlags2 stageMask; VkPipelineStageFlags2 WINE_VK_ALIGN(8) stageMask;
uint32_t deviceIndex; uint32_t deviceIndex;
} VkSemaphoreSubmitInfo; } VkSemaphoreSubmitInfo;
typedef VkSemaphoreSubmitInfo VkSemaphoreSubmitInfoKHR; typedef VkSemaphoreSubmitInfo VkSemaphoreSubmitInfoKHR;
...@@ -10708,10 +10708,10 @@ typedef struct VkImageMemoryBarrier2 ...@@ -10708,10 +10708,10 @@ typedef struct VkImageMemoryBarrier2
{ {
VkStructureType sType; VkStructureType sType;
const void *pNext; const void *pNext;
VkPipelineStageFlags2 srcStageMask; VkPipelineStageFlags2 WINE_VK_ALIGN(8) srcStageMask;
VkAccessFlags2 srcAccessMask; VkAccessFlags2 WINE_VK_ALIGN(8) srcAccessMask;
VkPipelineStageFlags2 dstStageMask; VkPipelineStageFlags2 WINE_VK_ALIGN(8) dstStageMask;
VkAccessFlags2 dstAccessMask; VkAccessFlags2 WINE_VK_ALIGN(8) dstAccessMask;
VkImageLayout oldLayout; VkImageLayout oldLayout;
VkImageLayout newLayout; VkImageLayout newLayout;
uint32_t srcQueueFamilyIndex; uint32_t srcQueueFamilyIndex;
......
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