Bug 105099 - vkEnumeratePhysicalDevices just once instead of twice results in a segfault.
Summary: vkEnumeratePhysicalDevices just once instead of twice results in a segfault.
Status: RESOLVED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-14 20:13 UTC by Mike Mestnik
Modified: 2018-02-14 23:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mike Mestnik 2018-02-14 20:13:58 UTC
This clashes with the documentation for this interface but not it's general usage so it's gone unnoticed.  https://pastebin.com/tTmzeeid

      uint32_t gpu_count = 1;
      /* TODO: This just selects first GPU. */
      vkEnumeratePhysicalDevices (instance, &gpu_count, &gpu);

Changing this to...

      uint32_t gpu_count = 0;
      vkEnumeratePhysicalDevices (instance, &gpu_count, NULL);
      gpu_count = 1;
      /* TODO: This just selects first GPU. */
      vkEnumeratePhysicalDevices (instance, &gpu_count, &gpu);

works around the issue.
Comment 1 Jason Ekstrand 2018-02-14 23:30:04 UTC
I can't reproduce on my system.  Also, looking at your pastebin, the segfault is happening in libvulkan.so which is the loader, not libvulkan_intel.so which is the driver.  I think you may have found a loader bug.  The loader can be found here:  https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.