1 |
On Sat, 16 Jun 2018 21:40:10 -0700 |
2 |
Matt Turner <mattst88@g.o> wrote: |
3 |
|
4 |
> Hello, |
5 |
> |
6 |
> VIDEO_CARDS is an annoying mess. We used to have radeon, intel, and |
7 |
> some others in media-libs/mesa's VIDEO_CARDS. radeon and intel |
8 |
> corresponded to disparate sets of drivers -- VIDEO_CARDS=radeon has |
9 |
> meant classic r100, r200, r300, and r600 drivers and gallium r600 and |
10 |
> radeonsi drivers. VIDEO_CARDS=intel has meant classic i915 and i965 |
11 |
> drivers as well as gallium i915. |
12 |
> |
13 |
> I added more-specific VIDEO_CARDS for those separate drivers a few |
14 |
> years ago, so that users could set VIDEO_CARDS="radeon radeonsi" and |
15 |
> only get the one radeonsi driver they actually wanted while still |
16 |
> enabling support for x11-libs/libdrm's radeon support code which is |
17 |
> used by most of those radeon drivers. Of course some users want this |
18 |
> control and others don't care at all. |
19 |
> |
20 |
> The confusion comes in with "classic" DRI drivers vs Gallium drivers. |
21 |
> The Gallium abstraction layer allows a hardware driver to handle |
22 |
> multiple APIs -- OpenGL, D3D9, OpenCL, video decode APIs, etc. For |
23 |
> instance, users try to build the classic i965 driver (there is no |
24 |
> Gallium driver for this hardware) with USE=opencl or USE=vaapi and |
25 |
> don't understand why they didn't get what they wanted (or REQUIRED_USE |
26 |
> prevents them from doing so). |
27 |
> |
28 |
> Should of Mesa's USE flags, d3d9, llvm, lm_sensors, opencl, openmax, |
29 |
> unwind, vaapi, vdpau, xa, and xvmc are Gallium-only. Should I make a |
30 |
> USE_EXPAND for Gallium-only options to attempt to avoid confusion? |
31 |
> Another point of confusion: not all Gallium drivers support all of |
32 |
> these features. For instance only the r600 and radeonsi drivers |
33 |
> support OpenCL. How to best handle this? |
34 |
> |
35 |
> It seems like at one extreme you build an extensive set of |
36 |
> REQUIRED_USE conditions that force users to micromanage their USE |
37 |
> flags, or you let them enable all sorts of impossible combinations and |
38 |
> deal with the confused bug reports. |
39 |
|
40 |
My simplified understanding of your problem is as follows: |
41 |
|
42 |
- You have M video cards |
43 |
- You have N possible features |
44 |
- But not all M video cards support N features |
45 |
- One user may want support for 2xM video cards concurrently |
46 |
|
47 |
And the above combination produces an unmanageable mess. |
48 |
|
49 |
Is it at all feasible to splice mesa into a main package |
50 |
and a collection of video-card backends, where USE flags can |
51 |
be defined card-specifically? |
52 |
|
53 |
Failing that, I'd consider the possibility of a pkg_pretend phase |
54 |
that prints a matrix of the video cards support is being built for, |
55 |
showing the features from those selected that will be supported, for |
56 |
example: |
57 |
|
58 |
--- |
59 |
|
60 |
* mesa: not all features are available on all video cards, mesa will |
61 |
only build with following video card feature sets: |
62 |
|
63 |
nv : opencl vaapi xvmc |
64 |
i965 : xvmc |
65 |
|
66 |
If this is acceptable, please set MESA_MIXED_VIDEO_FEATURES=1 in |
67 |
your portage make.conf |
68 |
|
69 |
--- |
70 |
|
71 |
and then die() when that's not 1. |
72 |
|
73 |
|
74 |
This: |
75 |
- gets around needing some obscene REQUIRED_USE mess |
76 |
- still runs early prior to tree merge |
77 |
- gives users the convenience they want, while also giving transparency |
78 |
- gets around the whole "REQUIRED_USE is kinda useless because there's |
79 |
no way to document reasons behind various exclusions or suggest |
80 |
solution strategies" problem. |