From dd9a7ec64581fa72c80c4d6b2139fcc9bc20949d Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Thu, 22 Oct 2015 15:31:56 -0600 Subject: bug-14827: Make DescriptorInfo a union of bufferInfo, imageInfo, and bufferView --- include/vulkan.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'include/vulkan.h') diff --git a/include/vulkan.h b/include/vulkan.h index c85d5112..ebff03f3 100644 --- a/include/vulkan.h +++ b/include/vulkan.h @@ -1812,18 +1812,26 @@ typedef struct { const VkDescriptorTypeCount* pTypeCount; } VkDescriptorPoolCreateInfo; +typedef struct { + VkSampler sampler; + VkImageView imageView; + VkImageLayout imageLayout; +} VkDescriptorImageInfo; + typedef struct { VkBuffer buffer; VkDeviceSize offset; VkDeviceSize range; } VkDescriptorBufferInfo; +/* TODO: this should be union, except that causes a compiler error: + * error: member 'VkDescriptorImageInfo ::imageInfo' with constructor not allowed in union + * This issue should go away when the change to remove the constructor lands. + */ typedef struct { - VkBufferView bufferView; - VkSampler sampler; - VkImageView imageView; - VkImageLayout imageLayout; + VkDescriptorImageInfo imageInfo; VkDescriptorBufferInfo bufferInfo; + VkBufferView texelBufferView; } VkDescriptorInfo; typedef struct { -- cgit v1.2.3