OpenCL-CTS icon indicating copy to clipboard operation
OpenCL-CTS copied to clipboard

Corrected procedure to collect proper size of image from VkImageCreateInfo

Open shajder opened this issue 10 months ago • 2 comments

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 avatar Feb 21 '25 12:02 shajder

@shajder is this ready for review? I see you removed the "focused review" label - thanks!

bashbaug avatar Apr 01 '25 17:04 bashbaug

@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.

shajder avatar Apr 01 '25 17:04 shajder

I still see a segfault in vkGetImageSubresourceLayout

joshqti avatar Apr 15 '25 15:04 joshqti

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

joshqti avatar Apr 15 '25 15:04 joshqti

`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)

shajder avatar Apr 17 '25 09:04 shajder

Merging as discussed in the May 27th memory subgroup.

bashbaug avatar May 27 '25 17:05 bashbaug