Repository navigation
layers: Report the import VUID of the struct that was used - #13430
Conversation
|
User apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
e6425cf to
0737d19
Compare
|
User apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
0737d19 to
cd9935d
Compare
|
User apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
spencer-lunarg
left a comment
There was a problem hiding this comment.
With the final comment
cd9935d to
a3f9b7e
Compare
|
User apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
a3f9b7e to
63a294d
Compare
|
User apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
|
CI Vulkan-ValidationLayers build queued with queue ID 154325. |
|
CI Vulkan-ValidationLayers build # 24923 running. |
|
CI Vulkan-ValidationLayers build # 24923 failed. |
|
btw, |
When memory imported from an external handle is bound to a buffer, image or tensor that can't import that handle type, the error was always VUID-VkImportMemoryWin32HandleInfoKHR-handleType-09861, even on Linux for memory imported with VkImportMemoryFdInfoKHR. Report the VUID of the import structure the memory was allocated with: 09861 for Win32 handles, 09862 for fds and 01747 for host pointers.
|
Thanks for letting me know, im pretty sure its bc the image test had an image with an unsupported handle type (00990), which is allowed by RADV but likely not by Mali. The buffer test already uses the same helper, so I removed the image test - should pass CI now. |
63a294d to
237e039
Compare
|
User apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
|
@apollo-2006 the fix I found locally was index 4125608dd..a171ad801 100644
--- i/tests/unit/external_memory_sync.cpp
+++ w/tests/unit/external_memory_sync.cpp
@@ -2391,10 +2391,10 @@ TEST_F(NegativeExternalMemorySync, ImportMemoryFdBindImageSupport) {
external_image_info.handleTypes = handle_type;
auto image_info = vkt::Image::ImageCreateInfo2D(64, 64, 1, 1, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_USAGE_SAMPLED_BIT);
image_info.pNext = &external_image_info;
- if (FindSupportedExternalMemoryHandleTypes(Gpu(), image_info, VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT) & handle_type) {
- GTEST_SKIP() << "Need an image that can't import DMA_BUF";
+ if (!(FindSupportedExternalMemoryHandleTypes(Gpu(), image_info, VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT) & handle_type) ||
+ (FindSupportedExternalMemoryHandleTypes(Gpu(), image_info, VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT) & handle_type)) {
+ GTEST_SKIP() << "Need an image that can export DMA_BUF but not import it";
}
- m_errorMonitor->SetAllowedFailureMsg("VUID-VkImageCreateInfo-pNext-00990");
vkt::Image image(*m_device, image_info, vkt::no_mem);so if you want to add it back with this patch |
237e039 to
68f22e1
Compare
|
User apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
|
Nice, thanks for finding that :) added it back with your patch |
|
CI Vulkan-ValidationLayers build queued with queue ID 158208. |
|
CI Vulkan-ValidationLayers build # 24967 running. |
|
CI Vulkan-ValidationLayers build # 24967 failed. |
| external_image_info.handleTypes = handle_type; | ||
| auto image_info = vkt::Image::ImageCreateInfo2D(64, 64, 1, 1, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_USAGE_SAMPLED_BIT); | ||
| image_info.pNext = &external_image_info; | ||
| if (!(FindSupportedExternalMemoryHandleTypes(Gpu(), image_info, VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT) & handle_type) || |
There was a problem hiding this comment.
its getting things like
Failed
Validation Error: [ VUID-VkPhysicalDeviceExternalImageFormatInfo-handleType-parameter ] | MessageID = 0xd33b6c8a
vkGetPhysicalDeviceImageFormatProperties2(): pImageFormatInfo->pNext<VkPhysicalDeviceExternalImageFormatInfo>.handleType has VkExternalMemoryHandleTypeFlagBits values (VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA) that require the extensions VK_FUCHSIA_external_memory.
The Vulkan spec states: If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBits value (https://docs.vulkan.org/spec/latest/chapters/capabilities.html#VUID-VkPhysicalDeviceExternalImageFormatInfo-handleType-parameter)
Objects: 1
[0] VkPhysicalDevice 0xb40000796fcad670
... ok, this was my fault, I am happy to just remove the ImportMemoryFdBindImageSupport and call it a day
There was a problem hiding this comment.
No worries, removed it :)
68f22e1 to
237e039
Compare
|
User apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
While reading the external memory checks for #10507 I noticed that the bind-time "handle type must be importable" error always uses
VUID-VkImportMemoryWin32HandleInfoKHR-handleType-09861, regardless of which import structure was used to import the memory. For example, on Linux, importing memory withVkImportMemoryFdInfoKHRand binding it to a buffer that cannot import that handle type would trigger this validation error:The fd and host pointer structs have their own VUIDs for the same rule (
VUID-VkImportMemoryFdInfoKHR-handleType-09862,VUID-VkImportMemoryHostPointerInfoEXT-handleType-01747).It chooses the VUID from the import struct in the memory's
VkMemoryAllocateInfochain, in the same order asGetImportHandleType, for the buffer/image/tensor binds. For Win32, the 09861 remains, so thatImportMemoryWin32BufferSupportworks as before.Tests:
NegativeExternalMemorySync.ImportMemoryFdBindBufferSupportandImportMemoryFdBindImageSupportexport a realDMA_BUFfd, then import it without a dedicated allocation and bind to a buffer/image which cannot importDMA_BUF. On main both get 09861; with this change they get 09862.DMA_BUFfor both, so they are skipped.VUID-vkBindImageMemory-image-01445: RADV requires those images to be dedicated, and the test deliberately isn't.I couldn't build the Win32 branch locally, but it's guarded the same way as
GetImportHandleType. Happy to change how the VUID is picked if you'd rather do it differently.