The HostAddressRangeEXTBuilder::address( ... ) function currently sets the size field of the underlying HostAddressRangeEXT to the length of the supplied address. From the Vulkan reference:
"The size member of each element of pDescriptors must be greater than or equal to the value returned by vkGetPhysicalDeviceDescriptorSizeEXT with a descriptorType equal to VK_DESCRIPTOR_TYPE_SAMPLER"
(I used the sampler page as an example but the corresponding image and buffer pages are very similar)
This seems to suggest that size indicates the size of the descriptor pointed to by address; no relation to address.len() (which, as far as I can tell, just gives you the size in bytes of the address pointer).
I think the way to fix this would be to modify the generator to create a new HostAddressRangeEXTBuilder::size( ... ) function which sets the size.
The
HostAddressRangeEXTBuilder::address( ... )function currently sets thesizefield of the underlyingHostAddressRangeEXTto the length of the suppliedaddress. From the Vulkan reference:"The size member of each element of pDescriptors must be greater than or equal to the value returned by vkGetPhysicalDeviceDescriptorSizeEXT with a descriptorType equal to VK_DESCRIPTOR_TYPE_SAMPLER"
(I used the sampler page as an example but the corresponding image and buffer pages are very similar)
This seems to suggest that
sizeindicates the size of the descriptor pointed to byaddress; no relation toaddress.len()(which, as far as I can tell, just gives you the size in bytes of theaddresspointer).I think the way to fix this would be to modify the generator to create a new
HostAddressRangeEXTBuilder::size( ... )function which sets the size.