Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

vkEnumeratePhysicalDevices() invoking unsupported vkGetPhysicalDeviceProperties2() structure type?

331 views
Skip to first unread message

alla...@google.com

unread,
Nov 11, 2021, 2:45:02 PM11/11/21
to swiftshader
I have ToT Swiftshader installed locally on gLinux.

After I create a Vulkan 1.2 instance, I see that `vkEnumeratePhysicalDevices()` is repeatedly trying to get the PCI bus info properties using vkGetPhysicalDeviceProperties2().

The results in two "UNSUPPORTED()" messages to the terminal for each call to `vkEnumeratePhysicalDevices`:
  • .../SwiftShader/src/Vulkan/libVulkan.cpp:3484 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
    .../SwiftShader/src/Vulkan/libVulkan.cpp:3484 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
The sType appears to map to:
  • VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000,
I believe I am building a release build of Swiftshader.

I am using the 1.2.189 SDK so perhaps the ICD (?) implementation is the culprit.

I thought this was an interesting behavior... happy to file a bug. 

-Allan

Nicolas Capens

unread,
Nov 11, 2021, 2:57:37 PM11/11/21
to alla...@google.com, swiftshader
Hi Allan,

Thanks for reporting this! It might be closely related to, or identical to, a problem we're trying to fix with the reporting of extended features: https://swiftshader-review.googlesource.com/c/SwiftShader/+/59408.

Let's check if your issue still exists once that lands.

Cheers,
Nicolas

--
You received this message because you are subscribed to the Google Groups "swiftshader" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swiftshader...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swiftshader/1b9302f5-6472-4d58-8443-2115371100b3n%40googlegroups.com.

Alexis Hétu

unread,
Nov 11, 2021, 3:10:26 PM11/11/21
to alla...@google.com, swiftshader
Hi Allan,

  This is not a bug. This is signaling that the application using SwiftShader is trying to use the VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT enum, which is part of the VK_EXT_pci_bus_info extension, which SwiftShader does not support or advertise.
  According to the Vulkan spec, it is not illegal for an application to send unsupported enums to a driver, which is then allowed to ignore them. SwiftShader does ignore them, but prints out a warning that the application may be expecting an extension to be supported by the driver, while it is not, so this helps us debug issues with some potentially misbehaving applications.

Thanks

Alexis

--

Nicolas Capens

unread,
Nov 15, 2021, 12:09:45 PM11/15/21
to alla...@google.com, swiftshader, Sean Risser
The patch has landed. Please check if you still run into this issue with tip-of-tree SwiftShader.

Allan MacKinnon

unread,
Nov 15, 2021, 12:26:43 PM11/15/21
to Nicolas Capens, swiftshader, Sean Risser
That appears to have fixed the issue.

Thank you!

Allan MacKinnon

unread,
Nov 15, 2021, 12:33:03 PM11/15/21
to Nicolas Capens, swiftshader, Sean Risser
Hold on... there is still an issue when there are multiple ICDs.

One ICD -- SwiftShader:

allanmac@allanmac1:~/home/google/SwiftShader/build/Linux$ export VK_ICD_FILENAMES="/home/allanmac/home/google/SwiftShader/build/Linux/vk_swiftshader_icd.json"
allanmac@allanmac1:~/home/google/SwiftShader/build/Linux$ ~/home/bin/vulkancapsviewer_3.04
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Unknown property align
Unknown property align
 
All ICDs:

$ export VK_ICD_FILENAMES="/home/allanmac/home/google/SwiftShader/build/Linux/vk_swiftshader_icd.json:/usr/share/vulkan/icd.d/lvp_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json:/usr/share/vulkan/icd.d/nvidia_icd.json"allanmac@allanmac1:~/home/google/SwiftShader/build/Linux$ ~/home/bin/vulkancapsviewer_3.04
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
/home/allanmac/home/google/SwiftShader/src/Vulkan/libVulkan.cpp:3329 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
/home/allanmac/home/google/SwiftShader/src/Vulkan/libVulkan.cpp:3329 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
/home/allanmac/home/google/SwiftShader/src/Vulkan/libVulkan.cpp:3329 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
/home/allanmac/home/google/SwiftShader/src/Vulkan/libVulkan.cpp:3329 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
Unknown property align
Unknown property align
 
Two ICDs:

$ export VK_ICD_FILENAMES="/home/allanmac/home/google/SwiftShader/build/Linux/vk_swiftshader_icd.json:/usr/share/vulkan/icd.d/nvidia_icd.json"
allanmac@allanmac1:~/home/google/SwiftShader/build/Linux$ ~/home/bin/vulkancapsviewer_3.04
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
/home/allanmac/home/google/SwiftShader/src/Vulkan/libVulkan.cpp:3329 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
/home/allanmac/home/google/SwiftShader/src/Vulkan/libVulkan.cpp:3329 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
/home/allanmac/home/google/SwiftShader/src/Vulkan/libVulkan.cpp:3329 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
/home/allanmac/home/google/SwiftShader/src/Vulkan/libVulkan.cpp:3329 WARNING: UNSUPPORTED: pProperties->pNext sType = 1000212000
Unknown property align
Unknown property align
 

Nicolas Capens

unread,
Nov 23, 2021, 10:39:17 PM11/23/21
to Allan MacKinnon, swiftshader, Sean Risser
Thanks for the heads-up! In our Debug build we relatively aggressively report unrecognized Vulkan extension structures, to catch potential bugs where we're not handling structures that we should (because we claim to support the extension), or applications expect behavioral changes where we can't (because we don't support the extension).

This has proven helpful in practice a few times already. In this particular case a VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT structure is being used, which is part of the VK_EXT_pci_bus_info extension which SwiftShader (obviously) doesn't support. There's an active discussion at Khronos about whether or not applications (or in this case the Vukan Loader) are allowed to use structures of unsupported extensions: https://gitlab.khronos.org/vulkan/vulkan/-/issues/2442.

For what it's worth, I've recently noticed another case where our Debug build might be a bit overzealous. We detect some cases that produce undefined values. This usually indicates an application bug people want to know about, but conformance tests may just want to verify that this doesn't result in undefined behavior, like crashing. So there appears to be a need to discern between different levels of pedantry in Debug builds.

Anyway, let's see how the Khronos discussion plays out before tackling this particular case. In the meantime I value people's opinions on the matter so that perhaps we can make pedantry levels part of the future go/project-vkosystem effort.

Nicolas Capens

unread,
Feb 11, 2022, 10:55:00 PM2/11/22
to swiftshader
FYI: As part of https://issuetracker.google.com/215555135 it was discovered that the root cause of the VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT usage was a bug in the Vulkan Loader, which has been fixed.
Reply all
Reply to author
Forward
0 new messages