Bug 104039 - anv: Don't fail vkEnumeratePhysicalDevices due to non-requested winsys
Summary: anv: Don't fail vkEnumeratePhysicalDevices due to non-requested winsys
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-02 16:01 UTC by Chad Versace
Modified: 2017-12-04 16:40 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Chad Versace 2017-12-02 16:01:12 UTC
If either wsi_wl_init_wsi() or wsi_x11_init_wsi() fail during anv_EnumeratePhysicalDevices(), then anv_EnumeratePhysicalDevices() fails, even if the user did no ask for either winsys at vkCreateInstance. In particular, if the user asked for no winsys at all, then anv_EnumeratePhysicalDevices() still fails if winsys initialization fails.

A user requests winsys support by requesting instance extensions VK_KHR_{wayland,xlib,xcb}_surface at time of vkCreateInstance.

We should wait until jekstrand's big vulkan/wsi series lands before fixing this.

(I observed this bug during code review, by reading code but not running code. So maybe this is NOTABUG.)
Comment 1 Chad Versace 2017-12-02 16:02:44 UTC
This probably affects radv too.

See https://bugs.freedesktop.org/show_bug.cgi?id=104038.
Comment 2 Jason Ekstrand 2017-12-02 16:28:49 UTC
Failing winsys init just means that we failed to allocate some memory to deal with the winsys.  It never actually opens any connections.  If you're failing memory allocations on driver startup, you have bigger problems.
Comment 3 Chad Versace 2017-12-04 16:40:40 UTC
My mistake. I assumed the winsys init code did something non-trivial, something other than allocation.


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.