Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 580148 - media-libs/mesa: add vulkan support
Summary: media-libs/mesa: add vulkan support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Matt Turner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-15 22:24 UTC by Mike Lothian
Modified: 2016-12-26 17:07 UTC (History)
19 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mesa-9999 ebuild (mesa-9999.ebuild,12.98 KB, text/plain)
2016-04-15 22:24 UTC, Mike Lothian
Details
mesa-9999.ebuild v2 (mesa-9999.ebuild,12.95 KB, text/plain)
2016-04-16 13:11 UTC, Mike Lothian
Details
mesa-9999.ebuild v3 (mesa-9999.ebuild,12.49 KB, text/plain)
2016-04-17 23:58 UTC, Mike Lothian
Details
mesa-9999.ebuild v4 (mesa-9999.ebuild,12.56 KB, text/plain)
2016-04-22 01:32 UTC, Mike Lothian
Details
mesa-9999.ebuild v5 (mesa-9999.ebuild,12.90 KB, text/plain)
2016-06-01 00:17 UTC, Mike Lothian
Details
mesa-12.0.1.ebuild (mesa-12.0.1.ebuild,12.73 KB, text/plain)
2016-07-12 19:42 UTC, Mike Lothian
Details
mesa-9999.ebuild v6 (mesa-9999.ebuild,12.73 KB, text/plain)
2016-07-12 19:43 UTC, Mike Lothian
Details
mesa-9999.ebuild v6 (mesa-9999.ebuild,12.73 KB, text/plain)
2016-07-12 19:44 UTC, Mike Lothian
Details
mesa-9999.ebuild v7 (mesa-9999.ebuild,12.79 KB, text/plain)
2016-11-01 21:58 UTC, Mike Lothian
Details
mesa-13.0.0.ebuild (mesa-13.0.0.ebuild,12.79 KB, text/plain)
2016-11-01 21:58 UTC, Mike Lothian
Details
OpenGL45.patch (OpenGL45.patch,1.04 KB, patch)
2016-11-01 22:00 UTC, Mike Lothian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2016-04-15 22:24:30 UTC
Created attachment 430702 [details]
mesa-9999 ebuild

I've started working on adding vulkan support to the mesa ebuild

Unfortunately the vulkan mesa driver requires python3 and the rest of the build requires python2

Not quite sure how to rectify that

I'm adding the build here incase someone else can figure it out
Comment 1 Mike Lothian 2016-04-16 13:11:39 UTC
Created attachment 430808 [details]
mesa-9999.ebuild v2

Still doesn't work due to the python issues but slightly improved
Comment 2 Mike Lothian 2016-04-17 23:58:54 UTC
Created attachment 431030 [details]
mesa-9999.ebuild v3

I still haven't been able to figure out how the python eclasses work or rather how I can use them to allow both python2 & python3 to be used in the same build

As a quick and dirty hack I've stripped out the python configuration options until I can figure it out

This gets the Intel Vulkan driver building and installing for me
Comment 3 Mike Lothian 2016-04-22 01:32:20 UTC
Created attachment 431488 [details]
mesa-9999.ebuild v4

Add back in requirement on mako - still haven't figured out the python eclasses and I'll be away next week - will look at it again when I'm back
Comment 4 Mike Lothian 2016-06-01 00:17:31 UTC
Created attachment 435980 [details]
mesa-9999.ebuild v5

Support has finally landed for building Vulkan with python2, I've resynced with portage and added Vulkan support

Those python2 patches are being backported to mesa-12 so they should be in the next release candidate
Comment 5 EoD 2016-06-07 12:20:30 UTC
Even though I am pretty inexperienced with Vulkan, the last ebuild does indeed seem to work fine, thanks!

The ebuild also looks fine to me.
Comment 6 Sven 2016-07-12 17:53:09 UTC
Did python2 support land in mesa 12.0.1? If so, can somebody post an ebuild for building mesa 12 with vulkan support?
Comment 7 Mike Lothian 2016-07-12 17:56:00 UTC
Yes it did, will give it a shot when I get home
Comment 8 Mike Lothian 2016-07-12 19:42:13 UTC
Created attachment 440518 [details]
mesa-12.0.1.ebuild

Give this a try, it won't compile for me with llvm-9999
Comment 9 Mike Lothian 2016-07-12 19:43:42 UTC
Created attachment 440520 [details]
mesa-9999.ebuild v6

Whilst I'm at it resync the 9999 ebuild with portage
Comment 10 Mike Lothian 2016-07-12 19:44:57 UTC
Created attachment 440522 [details]
mesa-9999.ebuild v6

Obsolete the old one
Comment 11 Sven 2016-07-14 21:58:27 UTC
(In reply to Mike Lothian from comment #8)
> Created attachment 440518 [details]
> mesa-12.0.1.ebuild
> 
> Give this a try, it won't compile for me with llvm-9999

Well, now I have mesa with vulkan support, but mesa caused file collisions with the vulkan-base package I was using. I had to uninstall it. So now I have libvulkan_intel.so but no libvulkan.so, no vulkaninfo, etc.

Detected file collision(s):
        /usr/include/vulkan/vulkan.h
        /usr/include/vulkan/vk_platform.h

It doesn't make any sense that mesa is installing these files. mesa should instead use the ones installed by the vulkan-base package, IMHO.
Comment 12 Mike Lothian 2016-07-17 23:36:31 UTC
I use a different vulkan-base package, so I don't see these collisions, it's currently failing with compile errors, I'll repost it once they've been sorted
Comment 13 Sven 2016-07-18 09:55:16 UTC
(In reply to Mike Lothian from comment #12)
> I use a different vulkan-base package, so I don't see these collisions, it's
> currently failing with compile errors, I'll repost it once they've been
> sorted

I'm using the vulkan-base package from the fireburn overlay. Are you sure that your the vulkan-base package doesn't provide vulkan.h? (cause that's what it should do)
Comment 14 Mike Lothian 2016-07-18 10:49:06 UTC
Sorry about that, didn't notice as I turned of the warnings over collisions 

Which package vulkan.h should we keep?
Comment 15 Sven 2016-07-18 13:42:44 UTC
(In reply to Mike Lothian from comment #14)
> Which package vulkan.h should we keep?

I think we're running straight into some upstream issue here. Why does mesa build with and install its own copy of vulkan.h? Mesa should maybe
1) use the installed vulkan.h and vk_platform.h for its own build
2) not install vulkan.h and vk_platform.h

For now, I've simply deleted the two header files from $D in the mesa ebuild. It seems I have a working intel vulkan driver, even though dota crashes. (I've got a Haswell CPU, and Vulkan for Haswell seems to be experimental.)
Comment 16 Mike Lothian 2016-07-18 13:44:49 UTC
DOTA2 crashes for me on Slylake and Talos shows over exposed images for the most part
Comment 17 Matt Turner gentoo-dev 2016-07-20 04:41:17 UTC
(In reply to Sven from comment #15)

This sounds totally plausible. I'll try to address it upstream. Thanks.
Comment 18 Amit Prakash Ambasta 2016-08-17 07:03:16 UTC
Any updates on this?
Comment 19 James Le Cuirot gentoo-dev 2016-09-30 11:15:37 UTC
Breaking news. We may see RADV in Mesa 13 at the end of October.

http://www.phoronix.com/scan.php?page=news_item&px=Mesa-13.0-October-Plan

It's also reported to be working with The Talos Principle much better now. I haven't tried it myself.
Comment 20 Emmanuel Andry 2016-11-01 17:13:05 UTC
In mesa 13rc3 Vulkan is no built by default. I think it should be nice to have a vulkan use flag to trigger it (I speak for the AMD driver, I don't know about intel)
Comment 21 Mike Lothian 2016-11-01 21:17:26 UTC
There's one in the FireBurn overlay, or I can attach it here for you
Comment 22 Mike Lothian 2016-11-01 21:58:24 UTC
Created attachment 452116 [details]
mesa-9999.ebuild v7
Comment 23 Mike Lothian 2016-11-01 21:58:58 UTC
Created attachment 452118 [details]
mesa-13.0.0.ebuild
Comment 24 Mike Lothian 2016-11-01 22:00:13 UTC
Created attachment 452120 [details, diff]
OpenGL45.patch

Forgot this is used by the ebuilds to enable OpenGL 4.5 on radeonsi and nvc0
Comment 25 Matt Turner gentoo-dev 2016-11-15 01:29:17 UTC
I've added vulkan support to Mesa. To get it, USE=vulkan and VIDEO_CARDS={i965,radeonsi}. I don't know if that's ideal or not, but best to get something into the tree.

Sorry it took so long.