Commit c3769732 authored by Georg Lehmann's avatar Georg Lehmann Committed by Alexandre Julliard

winevulkan: VkDeviceAddress needs alignment.

parent b04d0915
...@@ -1051,7 +1051,7 @@ struct vkCmdCopyImageToBuffer2KHR_params ...@@ -1051,7 +1051,7 @@ struct vkCmdCopyImageToBuffer2KHR_params
struct vkCmdCopyMemoryIndirectNV_params struct vkCmdCopyMemoryIndirectNV_params
{ {
VkCommandBuffer commandBuffer; VkCommandBuffer commandBuffer;
VkDeviceAddress copyBufferAddress; VkDeviceAddress DECLSPEC_ALIGN(8) copyBufferAddress;
uint32_t copyCount; uint32_t copyCount;
uint32_t stride; uint32_t stride;
}; };
...@@ -1065,7 +1065,7 @@ struct vkCmdCopyMemoryToAccelerationStructureKHR_params ...@@ -1065,7 +1065,7 @@ struct vkCmdCopyMemoryToAccelerationStructureKHR_params
struct vkCmdCopyMemoryToImageIndirectNV_params struct vkCmdCopyMemoryToImageIndirectNV_params
{ {
VkCommandBuffer commandBuffer; VkCommandBuffer commandBuffer;
VkDeviceAddress copyBufferAddress; VkDeviceAddress DECLSPEC_ALIGN(8) copyBufferAddress;
uint32_t copyCount; uint32_t copyCount;
uint32_t stride; uint32_t stride;
VkImage DECLSPEC_ALIGN(8) dstImage; VkImage DECLSPEC_ALIGN(8) dstImage;
...@@ -1129,8 +1129,8 @@ struct vkCmdDebugMarkerInsertEXT_params ...@@ -1129,8 +1129,8 @@ struct vkCmdDebugMarkerInsertEXT_params
struct vkCmdDecompressMemoryIndirectCountNV_params struct vkCmdDecompressMemoryIndirectCountNV_params
{ {
VkCommandBuffer commandBuffer; VkCommandBuffer commandBuffer;
VkDeviceAddress indirectCommandsAddress; VkDeviceAddress DECLSPEC_ALIGN(8) indirectCommandsAddress;
VkDeviceAddress indirectCommandsCountAddress; VkDeviceAddress DECLSPEC_ALIGN(8) indirectCommandsCountAddress;
uint32_t stride; uint32_t stride;
}; };
...@@ -2209,7 +2209,7 @@ struct vkCmdSubpassShadingHUAWEI_params ...@@ -2209,7 +2209,7 @@ struct vkCmdSubpassShadingHUAWEI_params
struct vkCmdTraceRaysIndirect2KHR_params struct vkCmdTraceRaysIndirect2KHR_params
{ {
VkCommandBuffer commandBuffer; VkCommandBuffer commandBuffer;
VkDeviceAddress indirectDeviceAddress; VkDeviceAddress DECLSPEC_ALIGN(8) indirectDeviceAddress;
}; };
struct vkCmdTraceRaysIndirectKHR_params struct vkCmdTraceRaysIndirectKHR_params
...@@ -2219,7 +2219,7 @@ struct vkCmdTraceRaysIndirectKHR_params ...@@ -2219,7 +2219,7 @@ struct vkCmdTraceRaysIndirectKHR_params
const VkStridedDeviceAddressRegionKHR *pMissShaderBindingTable; const VkStridedDeviceAddressRegionKHR *pMissShaderBindingTable;
const VkStridedDeviceAddressRegionKHR *pHitShaderBindingTable; const VkStridedDeviceAddressRegionKHR *pHitShaderBindingTable;
const VkStridedDeviceAddressRegionKHR *pCallableShaderBindingTable; const VkStridedDeviceAddressRegionKHR *pCallableShaderBindingTable;
VkDeviceAddress indirectDeviceAddress; VkDeviceAddress DECLSPEC_ALIGN(8) indirectDeviceAddress;
}; };
struct vkCmdTraceRaysKHR_params struct vkCmdTraceRaysKHR_params
......
...@@ -1176,7 +1176,7 @@ class VkVariable(object): ...@@ -1176,7 +1176,7 @@ class VkVariable(object):
return False return False
elif self.type == "size_t": elif self.type == "size_t":
return False return False
elif self.type in ["uint64_t", "VkDeviceSize"]: elif self.type in ["uint64_t", "VkDeviceAddress", "VkDeviceSize"]:
return True return True
elif self.is_struct(): elif self.is_struct():
return self.struct.needs_alignment() return self.struct.needs_alignment()
......
...@@ -4695,7 +4695,7 @@ typedef struct VkAccelerationStructureCreateInfoKHR ...@@ -4695,7 +4695,7 @@ typedef struct VkAccelerationStructureCreateInfoKHR
VkDeviceSize WINE_VK_ALIGN(8) offset; VkDeviceSize WINE_VK_ALIGN(8) offset;
VkDeviceSize WINE_VK_ALIGN(8) size; VkDeviceSize WINE_VK_ALIGN(8) size;
VkAccelerationStructureTypeKHR type; VkAccelerationStructureTypeKHR type;
VkDeviceAddress deviceAddress; VkDeviceAddress WINE_VK_ALIGN(8) deviceAddress;
} VkAccelerationStructureCreateInfoKHR; } VkAccelerationStructureCreateInfoKHR;
typedef struct VkAccelerationStructureDeviceAddressInfoKHR typedef struct VkAccelerationStructureDeviceAddressInfoKHR
...@@ -4910,7 +4910,7 @@ typedef VkBindImagePlaneMemoryInfo VkBindImagePlaneMemoryInfoKHR; ...@@ -4910,7 +4910,7 @@ typedef VkBindImagePlaneMemoryInfo VkBindImagePlaneMemoryInfoKHR;
typedef struct VkBindIndexBufferIndirectCommandNV typedef struct VkBindIndexBufferIndirectCommandNV
{ {
VkDeviceAddress bufferAddress; VkDeviceAddress WINE_VK_ALIGN(8) bufferAddress;
uint32_t size; uint32_t size;
VkIndexType indexType; VkIndexType indexType;
} VkBindIndexBufferIndirectCommandNV; } VkBindIndexBufferIndirectCommandNV;
...@@ -4922,7 +4922,7 @@ typedef struct VkBindShaderGroupIndirectCommandNV ...@@ -4922,7 +4922,7 @@ typedef struct VkBindShaderGroupIndirectCommandNV
typedef struct VkBindVertexBufferIndirectCommandNV typedef struct VkBindVertexBufferIndirectCommandNV
{ {
VkDeviceAddress bufferAddress; VkDeviceAddress WINE_VK_ALIGN(8) bufferAddress;
uint32_t size; uint32_t size;
uint32_t stride; uint32_t stride;
} VkBindVertexBufferIndirectCommandNV; } VkBindVertexBufferIndirectCommandNV;
...@@ -4960,7 +4960,7 @@ typedef struct VkBufferDeviceAddressCreateInfoEXT ...@@ -4960,7 +4960,7 @@ typedef struct VkBufferDeviceAddressCreateInfoEXT
{ {
VkStructureType sType; VkStructureType sType;
const void *pNext; const void *pNext;
VkDeviceAddress deviceAddress; VkDeviceAddress WINE_VK_ALIGN(8) deviceAddress;
} VkBufferDeviceAddressCreateInfoEXT; } VkBufferDeviceAddressCreateInfoEXT;
typedef struct VkBufferDeviceAddressInfo typedef struct VkBufferDeviceAddressInfo
...@@ -5245,8 +5245,8 @@ typedef struct VkCopyDescriptorSet ...@@ -5245,8 +5245,8 @@ typedef struct VkCopyDescriptorSet
typedef struct VkCopyMemoryIndirectCommandNV typedef struct VkCopyMemoryIndirectCommandNV
{ {
VkDeviceAddress srcAddress; VkDeviceAddress WINE_VK_ALIGN(8) srcAddress;
VkDeviceAddress dstAddress; VkDeviceAddress WINE_VK_ALIGN(8) dstAddress;
VkDeviceSize WINE_VK_ALIGN(8) size; VkDeviceSize WINE_VK_ALIGN(8) size;
} VkCopyMemoryIndirectCommandNV; } VkCopyMemoryIndirectCommandNV;
...@@ -5371,8 +5371,8 @@ typedef struct VkDebugUtilsObjectTagInfoEXT ...@@ -5371,8 +5371,8 @@ typedef struct VkDebugUtilsObjectTagInfoEXT
typedef struct VkDecompressMemoryRegionNV typedef struct VkDecompressMemoryRegionNV
{ {
VkDeviceAddress srcAddress; VkDeviceAddress WINE_VK_ALIGN(8) srcAddress;
VkDeviceAddress 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 decompressionMethod;
...@@ -5521,7 +5521,7 @@ typedef struct VkDeviceAddressBindingCallbackDataEXT ...@@ -5521,7 +5521,7 @@ typedef struct VkDeviceAddressBindingCallbackDataEXT
VkStructureType sType; VkStructureType sType;
void *pNext; void *pNext;
VkDeviceAddressBindingFlagsEXT flags; VkDeviceAddressBindingFlagsEXT flags;
VkDeviceAddress baseAddress; VkDeviceAddress WINE_VK_ALIGN(8) baseAddress;
VkDeviceSize WINE_VK_ALIGN(8) size; VkDeviceSize WINE_VK_ALIGN(8) size;
VkDeviceAddressBindingTypeEXT bindingType; VkDeviceAddressBindingTypeEXT bindingType;
} VkDeviceAddressBindingCallbackDataEXT; } VkDeviceAddressBindingCallbackDataEXT;
...@@ -5544,7 +5544,7 @@ typedef struct VkDeviceDiagnosticsConfigCreateInfoNV ...@@ -5544,7 +5544,7 @@ typedef struct VkDeviceDiagnosticsConfigCreateInfoNV
typedef struct VkDeviceFaultAddressInfoEXT typedef struct VkDeviceFaultAddressInfoEXT
{ {
VkDeviceFaultAddressTypeEXT addressType; VkDeviceFaultAddressTypeEXT addressType;
VkDeviceAddress reportedAddress; VkDeviceAddress WINE_VK_ALIGN(8) reportedAddress;
VkDeviceSize WINE_VK_ALIGN(8) addressPrecision; VkDeviceSize WINE_VK_ALIGN(8) addressPrecision;
} VkDeviceFaultAddressInfoEXT; } VkDeviceFaultAddressInfoEXT;
...@@ -5657,13 +5657,13 @@ typedef struct VkDeviceMemoryOverallocationCreateInfoAMD ...@@ -5657,13 +5657,13 @@ typedef struct VkDeviceMemoryOverallocationCreateInfoAMD
typedef union VkDeviceOrHostAddressConstKHR typedef union VkDeviceOrHostAddressConstKHR
{ {
VkDeviceAddress deviceAddress; VkDeviceAddress WINE_VK_ALIGN(8) deviceAddress;
const void *hostAddress; const void *hostAddress;
} VkDeviceOrHostAddressConstKHR; } VkDeviceOrHostAddressConstKHR;
typedef union VkDeviceOrHostAddressKHR typedef union VkDeviceOrHostAddressKHR
{ {
VkDeviceAddress deviceAddress; VkDeviceAddress WINE_VK_ALIGN(8) deviceAddress;
void *hostAddress; void *hostAddress;
} VkDeviceOrHostAddressKHR; } VkDeviceOrHostAddressKHR;
...@@ -6123,7 +6123,7 @@ typedef struct VkImageViewAddressPropertiesNVX ...@@ -6123,7 +6123,7 @@ typedef struct VkImageViewAddressPropertiesNVX
{ {
VkStructureType sType; VkStructureType sType;
void *pNext; void *pNext;
VkDeviceAddress deviceAddress; VkDeviceAddress WINE_VK_ALIGN(8) deviceAddress;
VkDeviceSize WINE_VK_ALIGN(8) size; VkDeviceSize WINE_VK_ALIGN(8) size;
} VkImageViewAddressPropertiesNVX; } VkImageViewAddressPropertiesNVX;
...@@ -6386,7 +6386,7 @@ typedef struct VkMicromapCreateInfoEXT ...@@ -6386,7 +6386,7 @@ typedef struct VkMicromapCreateInfoEXT
VkDeviceSize WINE_VK_ALIGN(8) offset; VkDeviceSize WINE_VK_ALIGN(8) offset;
VkDeviceSize WINE_VK_ALIGN(8) size; VkDeviceSize WINE_VK_ALIGN(8) size;
VkMicromapTypeEXT type; VkMicromapTypeEXT type;
VkDeviceAddress deviceAddress; VkDeviceAddress WINE_VK_ALIGN(8) deviceAddress;
} VkMicromapCreateInfoEXT; } VkMicromapCreateInfoEXT;
typedef struct VkMicromapTriangleEXT typedef struct VkMicromapTriangleEXT
...@@ -9870,7 +9870,7 @@ typedef struct VkStencilOpState ...@@ -9870,7 +9870,7 @@ typedef struct VkStencilOpState
typedef struct VkStridedDeviceAddressRegionKHR typedef struct VkStridedDeviceAddressRegionKHR
{ {
VkDeviceAddress deviceAddress; VkDeviceAddress WINE_VK_ALIGN(8) deviceAddress;
VkDeviceSize WINE_VK_ALIGN(8) stride; VkDeviceSize WINE_VK_ALIGN(8) stride;
VkDeviceSize WINE_VK_ALIGN(8) size; VkDeviceSize WINE_VK_ALIGN(8) size;
} VkStridedDeviceAddressRegionKHR; } VkStridedDeviceAddressRegionKHR;
...@@ -10115,15 +10115,15 @@ typedef VkTimelineSemaphoreSubmitInfo VkTimelineSemaphoreSubmitInfoKHR; ...@@ -10115,15 +10115,15 @@ typedef VkTimelineSemaphoreSubmitInfo VkTimelineSemaphoreSubmitInfoKHR;
typedef struct VkTraceRaysIndirectCommand2KHR typedef struct VkTraceRaysIndirectCommand2KHR
{ {
VkDeviceAddress raygenShaderRecordAddress; VkDeviceAddress WINE_VK_ALIGN(8) raygenShaderRecordAddress;
VkDeviceSize WINE_VK_ALIGN(8) raygenShaderRecordSize; VkDeviceSize WINE_VK_ALIGN(8) raygenShaderRecordSize;
VkDeviceAddress missShaderBindingTableAddress; VkDeviceAddress WINE_VK_ALIGN(8) missShaderBindingTableAddress;
VkDeviceSize WINE_VK_ALIGN(8) missShaderBindingTableSize; VkDeviceSize WINE_VK_ALIGN(8) missShaderBindingTableSize;
VkDeviceSize WINE_VK_ALIGN(8) missShaderBindingTableStride; VkDeviceSize WINE_VK_ALIGN(8) missShaderBindingTableStride;
VkDeviceAddress hitShaderBindingTableAddress; VkDeviceAddress WINE_VK_ALIGN(8) hitShaderBindingTableAddress;
VkDeviceSize WINE_VK_ALIGN(8) hitShaderBindingTableSize; VkDeviceSize WINE_VK_ALIGN(8) hitShaderBindingTableSize;
VkDeviceSize WINE_VK_ALIGN(8) hitShaderBindingTableStride; VkDeviceSize WINE_VK_ALIGN(8) hitShaderBindingTableStride;
VkDeviceAddress callableShaderBindingTableAddress; VkDeviceAddress WINE_VK_ALIGN(8) callableShaderBindingTableAddress;
VkDeviceSize WINE_VK_ALIGN(8) callableShaderBindingTableSize; VkDeviceSize WINE_VK_ALIGN(8) callableShaderBindingTableSize;
VkDeviceSize WINE_VK_ALIGN(8) callableShaderBindingTableStride; VkDeviceSize WINE_VK_ALIGN(8) callableShaderBindingTableStride;
uint32_t width; uint32_t width;
...@@ -10490,7 +10490,7 @@ typedef struct VkCopyMemoryToAccelerationStructureInfoKHR ...@@ -10490,7 +10490,7 @@ typedef struct VkCopyMemoryToAccelerationStructureInfoKHR
typedef struct VkCopyMemoryToImageIndirectCommandNV typedef struct VkCopyMemoryToImageIndirectCommandNV
{ {
VkDeviceAddress srcAddress; VkDeviceAddress WINE_VK_ALIGN(8) srcAddress;
uint32_t bufferRowLength; uint32_t bufferRowLength;
uint32_t bufferImageHeight; uint32_t bufferImageHeight;
VkImageSubresourceLayers imageSubresource; VkImageSubresourceLayers imageSubresource;
......
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