VIDEO_CARDS has been used in two different ways: Package deps: Used to simply add PDEPENDS to existing packages: - x11-libs/libva-compat - x11-libs/libva - x11-base/xorg-drivers [a proper meta package] Build config deps: Used to change some aspect about the actual build: - media-libs/mesa - x11-libs/libdrm - dev-libs/libclc Of the first category, package deps, libva and libva-compat used VIDEO_CARDS in subtly wrong ways anyway, not to mention the general policy against dep-only USE flags in non-metapackages. This has been corrected by moving to optfeature, and is no longer a topic of conversation for this bug report. Also of the first category, package deps, x11-base/xorg-drivers, is a proper meta package. The problem is that the logic for which driver to pull in is confusing and subtly wrong. This bug report intends to fix that by observing that *most* users of Intel cards should be using the modesetting driver (found in xorg-server), and simply mentioning the unmaintained xf86-drivers-intel as an optfeature for the case of VIDEO_CARDS="intel". Of the second category, dev-libs/libclc seems to not involve Intel cards. And of the second category, x11-libs/libdrm seems to only use VIDEO_CARDS="intel" and not the fancier flags. Of the second category, media-libs/mesa, however, uses the full gamut of VIDEO_CARDS. This bug report proposes simplifying this scheme considerably, to having a single flag, VIDEO_CARDS="intel" that enables all things Intel-related. Then, the "classic" IUSE would control whether gallium is turned off or on, and in turn whether to depend on x11-libs/libdrm. A diff for this proposal is attached to this bug report. ---- These similar cleanups may well also apply to NVIDIA and/or AMD GPUs as they also have an array of flags that might be simplified. ---- Another idea discussed but rejected was to have VIDEO_CARDS="intel" then split into INTEL_GPUS="gen2 gen3 gen4 gen5 ... gen12", and have the particular "gen" map to whichever set of components are most optimal for that. However, in some cases that winds up being a bit subjective, and maintaining such a matrix definitively is difficult and likely to go stale. Another option would be to forego the use of VIDEO_CARDS="intel" all together, and instead rely on the wiki selecting individual components based on hardware generation, with the wiki displaying a large matrix of packages to emerge and USE flags to set. However, folks seem to like metapackages, and this also becomes problem some for mesa. The above proposal is a compromise middle road toward simplification. Reproducible: Always
Created attachment 749634 [details, diff] proposed changes Here are the changes proposed. Please take a look.
commit 04c32f5c2e8ad380ee20055fb8cf5e31c94864c4 Author: Matt Turner <mattst88@gentoo.org> Date: Thu Nov 18 23:31:02 2021 -0800 media-libs/mesa: Condense Intel VIDEO_CARDS options