Corrected procedure to collect proper size of image from VkImageCreateInfo
Fixes #2155 according to issue description
Additional remark: The image size was previously calculated based on the memory size, which seems unusual. Due to Vulkan's configuration capabilities, the size of memory allocated for a specific texture may differ from what would be expected based on the texture dimensions. Thus, calculating the image dimensions back from the memory size of a Vulkan texture can be challenging.
@shajder is this ready for review? I see you removed the "focused review" label - thanks!
@shajder is this ready for review? I see you removed the "focused review" label - thanks!
yes - it is ready for review. I removed the label "focused review" because @joshqti mentioned he needed more time for debugging.
I still see a segfault in vkGetImageSubresourceLayout
VUID-vkGetImageSubresourceLayout-mipLevel-01716(ERROR / SPEC): msgNum: -1906823971 - Validation Error: [ VUID-vkGetImageSubresourceLayout-mipLevel-01716 ] Object 0: handle = 0x90c9290000000714, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x8e582cdd | vkGetImageSubresourceLayout(): pSubresource.mipLevel (1) must be less than 1. The Vulkan spec states: The mipLevel member of pSubresource must be less than the mipLevels specified in VkImageCreateInfo when image was created (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkGetImageSubresourceLayout-mipLevel-01716) Objects: 1 [0] 0x90c9290000000714, type: 10, name: NULL
`VUID-vkGetImageSubresourceLayout-mipLevel-01716(ERROR / SPEC): msgNum: -1906823971 - Validation Error: [ VUID-vkGetImageSubresourceLayout-mipLevel-01716 ] Object 0: handle = 0x90c9290000000714, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x8e582cdd | vkGetImageSubresourceLayout(): pSubresource.mipLevel (1) must be less than 1...
This one is fixed, still it didn't cause crash at my machine (nvidia driver version: 550.120)
Merging as discussed in the May 27th memory subgroup.