protonscr

Feature Request: options to disable dxgi/d3d*

dxvkclosed enhancementbuild
doitsujin/dxvk#1040 · opened 2019-05-02 by pchome · updated 2019-05-15 · 6 comments · github
Ppchome 2019-05-02 github

Example: 0001-build-Support-separate-d3d-dxgi-builds.patch.txt (based on d9vk)

Such changes are questionable for DXVK, so not a PR.

Motivation:

  • can be useful for package maintainers, e.g. to build separate
    • dxvk-dxgi (or skip, as it's optional for recent WINE versions)
    • dxvk-d3d10
    • dxvk-d3d11
  • can drastically reduce compile times for d9vk git users/testers/developers, who currently compiles "whole DXVK/DX9VK" but uses only d3d9.dll.

Well, we can go deeper, and extend this changes to produce dxvk-libs, and then optionally reuse them when found in systems library paths.

Ddoitsujin maintainer 2019-05-02 github

I'm not opposed to such changes in general and have considered doing something like that already, as long as they are reasonably simple and don't try to restructure the entire code base (dxvk-libs sounds suspicious). I don't consider it high-priority though, so it might take a while for this to happen (if at all).

Ppchome 2019-05-02 github

"restructure the entire code base"

The explanation for code base changes:

  • shaders/ folders moved to src/, to make them visible for dxgi/dxvk/d3d9 when dxgi/ disabled.
    Otherwise src/dxgi/shaders/* can be moved to src/d3d11/ and src/d3d9, where they used.
    Less changes, same effect. But harder for developers to track shader changes in two separate copies. The reason I decided to move all shaders, actually.

  • dxvk-libs -- dxbc/dxso/util/... statics, with meson install : get_option('install_libs'), or so. Lets name it dxvk-core. Just to not compile them for every d3d* package.
    But such changes not included in current subject.

Ppchome 2019-05-05 github

Well, while it (separate builds) still possible with such changes, I'm not doing this in my gentoo overlay. Instead I'm using similar changes to produce one additional package dxvk-tests, where everything disabled except tests/ and deps.

So, removing this "separate builds" from title, sounds like something overcomplicated.

D9VK and separate package for DXVK sample programs is more viable examples.

Ppchome 2019-05-12 github

One more option will be good to have is enable_openvr.
Prototype patch: dxvk-1.1.1-optional-openvr.patch.txt

Ddoitsujin maintainer 2019-05-12 github

One more option will be good to have is enable_openvr

Why? It won't be used if the application doesn't use it.

Ppchome 2019-05-12 github

Why? It won't be used if the application doesn't use it.

  • Saves a few kilobytes

  • The power of Gentoo is it's USE flags.
    Things can be disabled/enabled, also additional dependencies can be forced for different flags. So unlike other distros, which usually build everything, in Gentoo user can decide what he/she want.

    The main reason I'm asking about optional dependencies here and there.

    Example: if there will be d3d10 flag, then could be a meta package for a game with the vulkan flag, which will trigger DXVK to be built with +d3d11 +d3d10 -d3d9 -dxgi -openvr flags. Or openvr can trigger additional dependencies, like libusb, which don't needed otherwise. Also all those flags could be disabled to build only sample programs. Just example.

  • I don't mind if anyone else will also benefit from those flags. Some users manually building DXVK, so potentially will like to have a choice.

DLLs