Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Microsoft's d3d12 and dozen drivers #26746

Closed
wants to merge 2 commits into from

Conversation

FireBurn
Copy link
Contributor

@FireBurn FireBurn commented Aug 5, 2022

These are usable under WSL, but can compile without WSL

The drivers require directx-headers to be built, I had issues building mesa with clang unless these were built with clang too

I'm not sure if video_cards_microsoft needs to be marked or not

@gentoo-bot
Copy link

Pull Request assignment

Submitter: @FireBurn
Areas affected: ebuilds
Packages affected: dev-util/directx-headers, media-libs/mesa

dev-util/directx-headers: @gentoo/proxy-maint (new package)
media-libs/mesa: @gentoo/x11

Linked bugs

No bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment.

If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers.


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added new package The PR is adding a new package. assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels Aug 5, 2022
dev-util/directx-headers/directx-headers-1.606.3.ebuild Outdated Show resolved Hide resolved
dev-util/directx-headers/directx-headers-1.606.3.ebuild Outdated Show resolved Hide resolved
local emesonargs=()

emesonargs+=(
-Dbuild-test=false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emesonargs code is unnecessarily split. It can be:

	local emesonargs=(
		-Dbuild-test=false
	)

dev-util/directx-headers/directx-headers-1.606.3.ebuild Outdated Show resolved Hide resolved
dev-util/directx-headers/directx-headers-1.606.3.ebuild Outdated Show resolved Hide resolved
</maintainer>
<maintainer type="person">
<email>sarnex@gentoo.org</email>
<name>Nick Sarnie</name>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarnex
See if you want to actually maintain it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd happily put my own name down, but I think it has to be an official maintainer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to drop @sarnex as the maintainer since he hasn't expressed interest.

Copy link
Member

@sarnex sarnex Sep 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Matt, yeah no interest rn

@Arfrever
Copy link
Contributor

Arfrever commented Aug 7, 2022

Although opencl-headers, spirv-headers and vulkan-headers are currently in dev-util category, choice of this category seems questionable, since they are headers, not tools.
dev-libs or maybe gui-libs category seems better for headers packages. (E.g. part of dev-libs/boost is headers-only libraries.)
At least directx-headers and vulkan-headers seem to better fit gui-libs.
I am not sure how GUI-related are opencl-headers and spirv-headers.

@FireBurn
Copy link
Contributor Author

FireBurn commented Aug 7, 2022

When it's devices where in portage you want this, I'll make the necessary changes

Absolutely copyed from vulkan-headers, no point reinventing the wheel

@FireBurn FireBurn force-pushed the mesa-microsoft branch 2 times, most recently from 049ba38 to 92d8cbb Compare August 9, 2022 17:33
@FireBurn
Copy link
Contributor Author

FireBurn commented Aug 9, 2022

@mattst88

@mattst88
Copy link
Contributor

mattst88 commented Aug 9, 2022

unknown USE flag: 'video_cards_microsoft'

Need to add a description to profiles/desc/video_cards.desc and mask/unmask the flag in the arch profiles.

@FireBurn
Copy link
Contributor Author

FireBurn commented Aug 9, 2022

unknown USE flag: 'video_cards_microsoft'

Need to add a description to profiles/desc/video_cards.desc and mask/unmask the flag in the arch profiles.

Ah thanks, I couldn't figure out where that was needing to go

@FireBurn
Copy link
Contributor Author

FireBurn commented Aug 9, 2022

@mattst88 how would you feel about me putting you down as the maintainer of the new ebuild, or can I put myself down as a proxy-maintainer?

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2022-08-09 18:46 UTC
Newest commit scanned: e674339
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/2b883a2baa/output.html

@BratishkaErik
Copy link
Contributor

I hope you'll will find it useful microsoft/DirectXShaderCompiler#4178

@FireBurn
Copy link
Contributor Author

@mattst88 Ping

This is required to enable the d3d12 and dozen drivers in mesa

This enables OpenGL and Vulkan support within WSL

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2022-09-04 09:42 UTC
Newest commit scanned: e1e448e
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/f58e6de65f/output.html

This adds supoprt for the d3d12 gallium driver and the dozen vulkan
driver. It uses the video_cards_microsoft flag

It optionally adds in video acceleration if vaapi or vdpau is enabled

It's been compiled tested with GCC 12.1 & Clang 14

If building mesa with Clang, directx-headers must be build with clang
too, otherwise you'll experience linking errors

Signed-off-by: Mike Lothain <mike@fireburn.co.uk>
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2022-09-04 10:12 UTC
Newest commit scanned: bac7158
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/973f930a51/output.html

Copy link
Contributor

@mattst88 mattst88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make the changes locally I noted. Thanks for your contribution (and your patience!)

@@ -0,0 +1,30 @@
# Copyright 1999-2023 Gentoo Authors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet 2023.

@@ -0,0 +1,30 @@
# Copyright 1999-2023 Gentoo Authors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet 2023.


multilib_src_configure() {
local emesonargs=(
-Dbuild-test=false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we disable the tests?

</maintainer>
<maintainer type="person">
<email>sarnex@gentoo.org</email>
<name>Nick Sarnie</name>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to drop @sarnex as the maintainer since he hasn't expressed interest.

@@ -25,7 +25,7 @@ SLOT="0"
RESTRICT="!test? ( test )"

RADEON_CARDS="r300 r600 radeon radeonsi"
VIDEO_CARDS="${RADEON_CARDS} freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware"
VIDEO_CARDS="${RADEON_CARDS} freedreno intel lima microsoft nouveau panfrost v3d vc4 virgl vivante vmware"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to rename VIDEO_CARDS="microsoft" to VIDEO_CARDS="d3d12". I think that's a little clearer.

@@ -225,6 +226,7 @@ pkg_pretend() {
if use vulkan; then
if ! use video_cards_freedreno &&
! use video_cards_intel &&
! use video_cards_microsoft &&
! use video_cards_radeonsi &&
! use video_cards_v3d; then
ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, intel, radeonsi, or v3d"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to list microsoft here.

@@ -129,6 +129,7 @@
-video_cards_i965
-video_cards_intel
-video_cards_iris
-video_cards_microsoft
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to allow this on x86? (I have no idea)

@mattst88
Copy link
Contributor

mattst88 commented Sep 6, 2022

One commit has

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>

while the other has

Signed-off-by: Mike Lothain <mike@fireburn.co.uk>

Definitely run pkgcheck scan --commits. Super useful for catching all kinds of small mistakes like this.

@gentoo-bot gentoo-bot closed this in a4ca7cc Sep 6, 2022
negge pushed a commit to negge/gentoo that referenced this pull request Sep 7, 2022
This adds support for the d3d12 gallium driver and the dozen vulkan
driver. It uses the video_cards_microsoft flag

It optionally adds in video acceleration if vaapi or vdpau is enabled

It's been compiled tested with GCC 12.1 & Clang 14

If building mesa with Clang, directx-headers must be build with clang
too, otherwise you'll experience linking errors

Closes: gentoo#26746
Signed-off-by: Mike Lothain <mike@fireburn.co.uk>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). new package The PR is adding a new package. no bug found No Bug/Closes found in the commits.
Projects
None yet
8 participants