Bug 258375

Summary: emulators/wine : Enable vulkan by default
Product: Ports & Packages Reporter: Thibault Payet <monwarez>
Component: Individual Port(s)Assignee: Gerald Pfeifer <gerald>
Status: Closed FIXED    
Severity: Affects Only Me CC: iwtcex, sascha.folie
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
pkg-plist fix none

Description Thibault Payet 2021-09-08 21:04:08 UTC
Since we now have NVIDIA drivers that support Vulkan, and that intel gpu support it too (Don't know for amd but I guess that they support it). Is there a reason for not having both VULKAN and VKD3D enabled by default ?
Comment 1 Gerald Pfeifer freebsd_committer freebsd_triage 2021-09-16 22:08:50 UTC
(In reply to Thibault Payet from comment #0)
> Since we now have NVIDIA drivers that support Vulkan, and that intel gpu
> support it too (Don't know for amd but I guess that they support it). Is
> there a reason for not having both VULKAN and VKD3D enabled by default ?

Yes, it's always a tradeoff which options to enable by default and how
much we want a port to pull in. Imagine a user who wants to run a basic
app under Wine and finds themselves pull in more and more other stuff
they do not need.

That said, I see your point and we can give it a try for
emulators/wine-devel for now, which I plan on doing based on your
suggestion.
Comment 2 Thibault Payet 2021-09-16 23:58:40 UTC
Having it on emulators/wine-devel will be great, we could also use flavors to have multiple package of wine : like a lite one, and another one with full vulkan support ?
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-09-21 22:33:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3d5484b928571899d48e10ffa0e539042b63cedc

commit 3d5484b928571899d48e10ffa0e539042b63cedc
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2021-09-21 22:23:23 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2021-09-21 22:32:06 +0000

    emulators/wine-devel: Merge the VULKAN option into VKD3D

    When Wine gained support for the Vulkan API and D3D support via
    Vulkan we added two options (both off by default): VULKAN and
    VKD3D.

    Simplify things, in particular also from a user perspective, by only
    keeping the VKD3D option which now subsumes the former VULKAN option
    (and hence Vulkan API support).

    No change in defaults - yet.

    On the way adjust CONFIGURE_ARGS to only feature on option per line,
    which was mostly the case already anyway.

    PR:             258375

 emulators/wine-devel/Makefile | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
Comment 4 Gerald Pfeifer freebsd_committer freebsd_triage 2021-09-21 22:39:47 UTC
I will step down as maintainer of emulators/wine-devel a week from now
and am just trying to address as many issues/reuqests I am aware of as
possible until then.

Due to lack of ability to properly test the proposed change, this won't
be one I'll make. I hope this simplification I just made is going to
ease things a bit - currently and in the light of the proposal.
Comment 5 Alex S 2021-09-22 02:30:27 UTC
Strictly speaking, nowadays Wine _also_ has a Vulkan backend* for wined3d (d3d9, d3d11, etc), it's just immature and requires setting a certain registry key to enable it. Therefore, after this option merge VKD3D_DESC is no longer accurate.

* a distinct implementation from the [independent] dxvk project, by the way
Comment 6 Gerald Pfeifer freebsd_committer freebsd_triage 2021-09-23 18:15:53 UTC
(In reply to Alex S from comment #5)
> Strictly speaking, nowadays Wine _also_ has a Vulkan backend* for
> wined3d (d3d9, d3d11, etc), it's just immature and requires setting
> a certain registry key to enable it. Therefore, after this option
> merge VKD3D_DESC is no longer accurate.

Do you have a suggestion on how to update VKD3D_DESC?

Happy to improve that. My main focus here was to reduce user confusion
and combinatorial explosion of two options (= 4 cases) which nobody will
regularly test.
Comment 7 Alex S 2021-09-23 18:47:09 UTC
(In reply to Gerald Pfeifer from comment #6)

> Do you have a suggestion on how to update VKD3D_DESC?

"Vulkan and Direct3D 12 support", although I dislike this altogether.

> My main focus here was to reduce user confusion
and combinatorial explosion of two options (= 4 cases) which nobody will
regularly test.

Honestly, this option should not really exist. We don't have switchable OpenGL support, we shouln't do this for Vulkan either. Especially since dependency-wise Vulkan mostly shares packages with the OpenGL infrastructure, so disabling Vulkan alone doesn't make Wine any lighter.

Other good candidates for elimination would be OPENAL and SDL options.
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-09-24 04:40:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5a1f2db45736cb70dc556090ba6c929c51d1eb28

commit 5a1f2db45736cb70dc556090ba6c929c51d1eb28
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2021-09-24 04:37:58 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2021-09-24 04:37:58 +0000

    emulators/wine-devel: Refine VKD3D_DESC

    PR:             258375
    Suggested by:   Alex S <iwtcex@gmail.com>

 emulators/wine-devel/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 9 Gerald Pfeifer freebsd_committer freebsd_triage 2021-09-24 04:43:49 UTC
Thank you, Alex! I just made this change, and will look into enhancing
the defaults as potential next steps.

Point taken on these two aspects, Vulkan and D3D12, not being very
expensive, but they do additional dependencies. The question with Wine
partly is one of users - game/highly graphical users versus ones that
just want to run an older Window app, for example (and no Gamepad support,
say).

I do understand where you are coming from - and simpler is better, too,
yes.


(For lack of a better setting marking this one FIXED, since the report
*has* led to change and simplification and in the requested direction,
just not the final step yet. Thibault, I'll see to maybe make that extra
step, too, and will at a minimum update emulators/wine similarly.)
Comment 10 Alex S 2021-09-24 05:48:12 UTC
(In reply to Gerald Pfeifer from comment #9)

> Point taken on these two aspects, Vulkan and D3D12,
> not being very expensive, but they do additional dependencies.

I don't buy this argument. Other than vulkan-loader (a tiny library), Vulkan has exactly the same dependencies as OpenGL.

> The question with Wine partly is one of users -
> game/highly graphical users versus ones that just want to run
> an older Window app, for example (and no Gamepad support, say).

Well, is there any demand specifically for "no # support"? If these
features do not affect those users, why should they care?
Comment 11 commit-hook freebsd_committer freebsd_triage 2021-09-26 13:28:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a26036d0241f76193758c6e4379834fc0ff142d9

commit a26036d0241f76193758c6e4379834fc0ff142d9
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2021-09-26 13:22:10 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2021-09-26 13:27:50 +0000

    emulators/wine-devel: Merge the VKD3D option into X11

    Vulkan and vkd3d have few additional dependencies on top of OpenGL
    (via Mesa) so fold them into the general X11 switch.

    This further reduces the number of options in this port.

    PR:             258375

 emulators/wine-devel/Makefile  | 13 +++++--------
 emulators/wine-devel/pkg-plist |  6 +++---
 2 files changed, 8 insertions(+), 11 deletions(-)
Comment 12 commit-hook freebsd_committer freebsd_triage 2021-09-26 13:30:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=78468490119038048dd220377e1bed1771fe46a6

commit 78468490119038048dd220377e1bed1771fe46a6
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2021-09-26 13:28:55 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2021-09-26 13:28:55 +0000

    emulators/wine-devel: Enable OPENAL by default

    PR:             258375

 emulators/wine-devel/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 13 Gerald Pfeifer freebsd_committer freebsd_triage 2021-09-26 17:17:39 UTC
(In reply to Alex S from comment #10)
> [...]

Okay, convinced. ;-)

I factored what used to be the VULKAN and VKD3D into the X11 option
and enabled OPENAL by default in emulators/wine-devel.

I also plan on back porting these changes to emulators/wine after the
next quarterly branch has been created (which should happen in about a
week).

This should address your key points, Alex (and Thibault)?

> Well, is there any demand specifically for "no # support"? If these
> features do not affect those users, why should they care?

Some users care about the footprint on their system (number of ports
or packages, time to build, space, bandwidth, time to update,...).
Comment 14 Alex S 2021-09-26 18:14:19 UTC
Created attachment 228200 [details]
pkg-plist fix

(In reply to Gerald Pfeifer from comment #13)

> I factored what used to be the VULKAN and VKD3D into the X11 option
and enabled OPENAL by default in emulators/wine-devel.

Well, thank you. As for the SDL suggestion, wine-devel already
transitively depends on SDL2 through FAudio — SDL is kind of
difficult to avoid.

(Please note, I'm not holding gaming above other use cases. It's
rather that I can't comment on other build switches and dependencies,
because I'm not sufficiently familiar with them.)

> Some users care about the footprint on their system (number of ports
or packages, time to build, space, bandwidth, time to update,...).

All true, but we only can cater to a few common use cases with
defaults. My opinion is that with packages we should err on the side
of matching factionality of popular Linux distributions, which puts
a limit on how minimal our Wine defaults can be.
Comment 15 Gerald Pfeifer freebsd_committer freebsd_triage 2021-09-27 06:37:19 UTC
(In reply to Alex S from comment #14)
> Well, thank you. As for the SDL suggestion, wine-devel already
> transitively depends on SDL2 through FAudio — SDL is kind of
> difficult to avoid.

Yeah, I must have missed how SDL sneaked in via FAudio. Let me
tackle that as well. 

We agree - fewer options generally is better.

> All true, but we only can cater to a few common use cases with
> defaults. My opinion is that with packages we should err on the side
> of matching factionality of popular Linux distributions, which puts
> a limit on how minimal our Wine defaults can be.

Linux distributions (depending on packaging format, but RPM-based ones
for sure and for 20+ years) have the advantage of sub-packages where
functionality can be broken out, which FreeBSD is lacking as such.

Interestingly the case of Wine that's not used (and maybe hard) in
openSUSE, for example, which indeed has quite extensive defaults.

In any case, I expect to commit a simplification wrt. SDL tomorrow;
thanks for the feedback!
Comment 16 commit-hook freebsd_committer freebsd_triage 2021-09-28 06:43:17 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3f4627fc27ad26876fdc440d51500c960f282751

commit 3f4627fc27ad26876fdc440d51500c960f282751
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2021-09-28 06:40:56 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2021-09-28 06:42:30 +0000

    emulators/wine-devel: Unconditionally use SDL

    SDL2 is indirectly pulled in via our (unconditional) FAudio dependency
    anyway, so always use it, remove the SDL option, and simplify the port
    accordingly.

    PR:             258375

 emulators/wine-devel/Makefile | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
Comment 17 commit-hook freebsd_committer freebsd_triage 2021-10-02 07:03:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=67eda602caa464c84694459e4d09503519264b9f

commit 67eda602caa464c84694459e4d09503519264b9f
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2021-10-02 07:02:18 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2021-10-02 07:02:18 +0000

    emulators/wine: Merge the VULKAN option into VKD3D

    This back ports 3d5484b928571899d48e10ffa0e539042b63cedc and
    5a1f2db45736cb70dc556090ba6c929c51d1eb28 from emulators/wine-devel:

    When Wine gained support for the Vulkan API and D3D support via
    Vulkan we added two options (both off by default): VULKAN and
    VKD3D.

    Simplify things, in particular also from a user perspective, by only
    keeping the VKD3D option which now subsumes the former VULKAN option
    (and hence Vulkan API support).

    No change in defaults - yet.

    On the way adjust CONFIGURE_ARGS to only feature on option per line,
    which was mostly the case already anyway.

    PR:             258375

 emulators/wine/Makefile | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
Comment 18 commit-hook freebsd_committer freebsd_triage 2021-10-03 07:00:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=05382993a167f8965069743a1d0b54efe63717ed

commit 05382993a167f8965069743a1d0b54efe63717ed
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2021-10-03 06:59:51 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2021-10-03 06:59:51 +0000

    emulators/wine: Enable OPENAL by default

    This mirrors commit 78468490119038048dd220377e1bed1771fe46a6 to
    emulators/wine-devel.

    PR:             258375

 emulators/wine/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 19 Alex S 2021-10-16 10:04:49 UTC
FYI, pkg-plist is still slightly broken: all d3d12 entries should prefixed by %%X11%%.
Comment 20 Gerald Pfeifer freebsd_committer freebsd_triage 2021-10-16 10:42:41 UTC
Thank you, Alex! Indeed this was on my TODO list (that and verifying the
same around the GNUTLS option as well) and I expect I'll be able to get
to all remaining such items for wine-devel and wine this month.
Comment 21 commit-hook freebsd_committer freebsd_triage 2021-10-17 16:28:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e5b433425071d9d8d4afdeddb9d7c02aa20f84f8

commit e5b433425071d9d8d4afdeddb9d7c02aa20f84f8
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2021-10-17 16:28:05 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2021-10-17 16:28:05 +0000

    emulators/wine: Unconditionally use SDL

    Back port commit 3f4627fc27ad26876fdc440d51500c960f282751 from the
    wine-devel port:

    SDL2 is indirectly pulled in via our (unconditional) FAudio dependency
    anyway, so always use it, remove the SDL option, and simplify the port
    accordingly.

    PR:             258375

 emulators/wine/Makefile | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
Comment 22 commit-hook freebsd_committer freebsd_triage 2021-10-21 06:01:38 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1fce6b5d7da9e8231fecc2a5724887e5d1e64414

commit 1fce6b5d7da9e8231fecc2a5724887e5d1e64414
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2021-10-21 06:00:17 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2021-10-21 06:00:17 +0000

    emulators/wine: Merge the VKD3D option into X11

    Back port a26036d0241f76193758c6e4379834fc0ff142d9 from the wine-devel
    port (and integrate 8189a2a276f8dd30ee1b075b2cfa8cf171ac286a):

      Vulkan and vkd3d have few additional dependencies on top of OpenGL
      (via Mesa) so fold them into the general X11 switch.

      This further reduces the number of options in this port.

    PR:             258375

 emulators/wine/Makefile  | 15 ++++++---------
 emulators/wine/pkg-plist |  6 +++---
 2 files changed, 9 insertions(+), 12 deletions(-)