mesa: restructure driver selection to be more architecture-neutral
This allows Mesa to also build on ppc64le.
This commit is contained in:
parent
d944690b7b
commit
a1f5702755
1 changed files with 15 additions and 14 deletions
|
@ -24,24 +24,25 @@
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
if ! lists.elem stdenv.system platforms.mesaPlatforms then
|
if ! lists.elem stdenv.system platforms.mesaPlatforms then
|
||||||
throw "unsupported platform for Mesa"
|
throw "${stdenv.system}: unsupported platform for Mesa"
|
||||||
else
|
else
|
||||||
|
|
||||||
let
|
let
|
||||||
defaultGalliumDrivers =
|
inherit (stdenv) hostPlatform;
|
||||||
if stdenv.isAarch32
|
defaultGalliumDrivers = [ "virgl" "nouveau" ]
|
||||||
then ["virgl" "nouveau" "freedreno" "vc4" "etnaviv" "imx"]
|
++ (if hostPlatform.isAarch32 || hostPlatform.isAarch64 then
|
||||||
else if stdenv.isAarch64
|
[ "vc4" ]
|
||||||
then ["virgl" "nouveau" "vc4" ]
|
++ lib.optionals hostPlatform.isAarch64 [ "freedreno" "etnaviv" "imx" ]
|
||||||
else ["virgl" "svga" "i915" "r300" "r600" "radeonsi" "nouveau"];
|
else
|
||||||
defaultDriDrivers =
|
[ "r300" "r600" "radeonsi"]
|
||||||
if (stdenv.isAarch32 || stdenv.isAarch64)
|
++ lib.optionals hostPlatform.isx86 [ "i915" "svga" ]
|
||||||
then ["nouveau"]
|
);
|
||||||
else ["i915" "i965" "nouveau" "radeon" "r200"];
|
defaultDriDrivers = [ "nouveau" ]
|
||||||
|
++ lib.optionals (!hostPlatform.isAarch32 && !hostPlatform.isAarch64) [ "radeon" "r200" ]
|
||||||
|
++ lib.optionals hostPlatform.isx86 [ "i915" "i965" ];
|
||||||
defaultVulkanDrivers =
|
defaultVulkanDrivers =
|
||||||
if (stdenv.isAarch32 || stdenv.isAarch64)
|
lib.optional hostPlatform.isx86 "intel"
|
||||||
then []
|
++ lib.optional enableRadv "radeon";
|
||||||
else ["intel"] ++ lib.optional enableRadv "radeon";
|
|
||||||
in
|
in
|
||||||
|
|
||||||
let gallium_ = galliumDrivers; dri_ = driDrivers; vulkan_ = vulkanDrivers; in
|
let gallium_ = galliumDrivers; dri_ = driDrivers; vulkan_ = vulkanDrivers; in
|
||||||
|
|
Loading…
Reference in a new issue