From 373eabcdbf1dce763623bdaf87f83d584ce2c105 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Thu, 2 Apr 2026 11:55:35 -0700 Subject: [PATCH] libcl/vk: add VkCopyMemoryToImageIndirectCommandKHR and its members The members are all naturally aligned to 4, but other naturally-aligned-to-4 structs in this file still have the attribute declared (such as VkDispatchIndirectCommand), so I'm adding the attributes to these as well. Reviewed-by: Lionel Landwerlin Signed-off-by: Paulo Zanoni --- src/compiler/libcl/libcl_vk.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/compiler/libcl/libcl_vk.h b/src/compiler/libcl/libcl_vk.h index e3e8cf62423..5969d97d5ff 100644 --- a/src/compiler/libcl/libcl_vk.h +++ b/src/compiler/libcl/libcl_vk.h @@ -11,6 +11,7 @@ typedef uint32_t VkBool32; typedef uint64_t VkDeviceAddress; typedef uint64_t VkDeviceSize; typedef uint32_t VkFlags; +typedef VkFlags VkImageAspectFlags; typedef enum VkQueryType { VK_QUERY_TYPE_OCCLUSION = 0, @@ -126,6 +127,25 @@ typedef enum VkDepthBiasRepresentationEXT { VK_DEPTH_BIAS_REPRESENTATION_MAX_ENUM_EXT = 0x7FFFFFFF } VkDepthBiasRepresentationEXT; +typedef struct VkOffset3D { + int32_t x; + int32_t y; + int32_t z; +} VkOffset3D __attribute__((aligned(4))); + +typedef struct VkExtent3D { + uint32_t width; + uint32_t height; + uint32_t depth; +} VkExtent3D __attribute__((aligned(4))); + +typedef struct VkImageSubresourceLayers { + VkImageAspectFlags aspectMask; + uint32_t mipLevel; + uint32_t baseArrayLayer; + uint32_t layerCount; +} VkImageSubresourceLayers __attribute__((aligned(4))); + typedef struct VkDispatchIndirectCommand { uint32_t x; uint32_t y; @@ -187,3 +207,12 @@ typedef struct VkCopyMemoryIndirectCommandKHR { VkDeviceAddress dstAddress; VkDeviceSize size; } VkCopyMemoryIndirectCommandKHR __attribute__((aligned(4))); + +typedef struct VkCopyMemoryToImageIndirectCommandKHR { + VkDeviceAddress srcAddress; + uint32_t bufferRowLength; + uint32_t bufferImageHeight; + VkImageSubresourceLayers imageSubresource; + VkOffset3D imageOffset; + VkExtent3D imageExtent; +} VkCopyMemoryToImageIndirectCommandKHR __attribute__((aligned(4)));