Gentoo Archives: gentoo-dev

From: Matt Turner <mattst88@g.o>
To: gentoo development <gentoo-dev@l.g.o>
Cc: x11 <x11@g.o>
Subject: [gentoo-dev] Suggestions for simplifying VIDEO_CARDS situation
Date: Sun, 17 Jun 2018 04:40:40
1 Hello,
3 VIDEO_CARDS is an annoying mess. We used to have radeon, intel, and
4 some others in media-libs/mesa's VIDEO_CARDS. radeon and intel
5 corresponded to disparate sets of drivers -- VIDEO_CARDS=radeon has
6 meant classic r100, r200, r300, and r600 drivers and gallium r600 and
7 radeonsi drivers. VIDEO_CARDS=intel has meant classic i915 and i965
8 drivers as well as gallium i915.
10 I added more-specific VIDEO_CARDS for those separate drivers a few
11 years ago, so that users could set VIDEO_CARDS="radeon radeonsi" and
12 only get the one radeonsi driver they actually wanted while still
13 enabling support for x11-libs/libdrm's radeon support code which is
14 used by most of those radeon drivers. Of course some users want this
15 control and others don't care at all.
17 The confusion comes in with "classic" DRI drivers vs Gallium drivers.
18 The Gallium abstraction layer allows a hardware driver to handle
19 multiple APIs -- OpenGL, D3D9, OpenCL, video decode APIs, etc. For
20 instance, users try to build the classic i965 driver (there is no
21 Gallium driver for this hardware) with USE=opencl or USE=vaapi and
22 don't understand why they didn't get what they wanted (or REQUIRED_USE
23 prevents them from doing so).
25 Should of Mesa's USE flags, d3d9, llvm, lm_sensors, opencl, openmax,
26 unwind, vaapi, vdpau, xa, and xvmc are Gallium-only. Should I make a
27 USE_EXPAND for Gallium-only options to attempt to avoid confusion?
28 Another point of confusion: not all Gallium drivers support all of
29 these features. For instance only the r600 and radeonsi drivers
30 support OpenCL. How to best handle this?
32 It seems like at one extreme you build an extensive set of
33 REQUIRED_USE conditions that force users to micromanage their USE
34 flags, or you let them enable all sorts of impossible combinations and
35 deal with the confused bug reports.
37 I would like to somehow get rid of the 'classic' and 'gallium' USE
38 flags entirely, but I'm not totally sure how. Maybe I can enable them
39 dependent on VIDEO_CARDS...
41 Suggestions welcome.