Bug 95537

Summary: Invalid argument in anv_ioctl called from anv_physical_device_init
Product: Mesa Reporter: Paul le Roux <xonar.leroux>
Component: Drivers/Vulkan/intelAssignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: ngoquang2708
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Paul le Roux 2016-05-23 10:32:43 UTC
When calling vkEnumeratePhysicalDevices it ends up failing at the ioctl call within anv_physical_device_init. It correctly opens the device /dev/dri/renderD128, but then fails with invalid argument when it tries to get the chipset id.

This is run on a i7-3630QM with a HD4000. There is also a GTX 675MX present, but it's not used.

Im running an updated Arch-Linux system (23 May 2016)

I build mesa with debug enabled and used the intel_vulkan library, but when trying to run any vulkan application (like vulkaninfo) it fails with 

anv_device.c:77: failed to get chipset id: Invalid argument (VK_ERROR_INITIALIZATION_FAILED)
Comment 1 Jason Ekstrand 2016-05-25 03:55:07 UTC
Can you try it with the wip/anv-multi-device branch on my freedesktop.org:

https://cgit.freedesktop.org/~jekstrand/mesa/

It has a couple of patches that *should* let it work even if there are multiple GPUs in the system.
Comment 2 Paul le Roux 2016-05-25 12:55:44 UTC
Running it with J. Ekstrand git branch:

I just get this warning

WARNING: Ivy Bridge Vulkan support is incomplete

The cube and triangle demo works, but when running vulkaninfo

vulkaninfo: anv_formats.c:268: anv_get_format: Assertion `vk_format_aspects(vk_format) == VK_IMAGE_ASPECT_COLOR_BIT' failed.

Although I think this is now a seperate issue.
Comment 3 Jason Ekstrand 2016-05-28 00:20:16 UTC
(In reply to Paul le Roux from comment #2)
> Running it with J. Ekstrand git branch:
> 
> I just get this warning
> 
> WARNING: Ivy Bridge Vulkan support is incomplete
> 
> The cube and triangle demo works, but when running vulkaninfo

Cool.  I just pushed the multi-gpu patches.

> vulkaninfo: anv_formats.c:268: anv_get_format: Assertion
> `vk_format_aspects(vk_format) == VK_IMAGE_ASPECT_COLOR_BIT' failed.
> 
> Although I think this is now a seperate issue.

Yes, and I just fixed it!  I'm closing this bug now.  If you continue to have issues, please file them under a new bug.

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.