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