[Bug 105099] vkEnumeratePhysicalDevices just once instead of twice results in a segfault.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 14 20:13:58 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=105099

            Bug ID: 105099
           Summary: vkEnumeratePhysicalDevices just once instead of twice
                    results in a segfault.
           Product: Mesa
           Version: git
          Hardware: x86 (IA32)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Vulkan/intel
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: cheako+bugs_freedesktop_org at mikemestnik.net
        QA Contact: intel-3d-bugs at lists.freedesktop.org
                CC: jason at jlekstrand.net

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180214/01f0e08a/attachment-0001.html>


More information about the intel-3d-bugs mailing list