mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 09:47:52 +00:00
[Hardware/AMD] Fix Mesa RADV not being preferred over AMDVLK
This commit is contained in:
parent
5a33b8fd2e
commit
a8f78f35db
1 changed files with 13 additions and 3 deletions
|
|
@ -9,6 +9,11 @@ in
|
||||||
options.aviallon.hardware.amd = {
|
options.aviallon.hardware.amd = {
|
||||||
enable = mkEnableOption "AMD gpus";
|
enable = mkEnableOption "AMD gpus";
|
||||||
useProprietary = mkEnableOption "Use proprietary AMDGPU Pro";
|
useProprietary = mkEnableOption "Use proprietary AMDGPU Pro";
|
||||||
|
defaultVulkanImplementation = mkOption {
|
||||||
|
description = "Wether to use RADV or AMDVLK by default";
|
||||||
|
type = with types; enum [ "amdvlk" "radv" ];
|
||||||
|
default = "radv";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.enable) {
|
config = mkIf (cfg.enable) {
|
||||||
|
|
@ -44,15 +49,20 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.opengl.enable = true;
|
hardware.opengl.enable = true;
|
||||||
hardware.opengl.extraPackages = with pkgs; mkIf (!cfg.useProprietary) [
|
hardware.opengl.extraPackages = with pkgs; mkIf (!cfg.useProprietary) (mkAfter [
|
||||||
rocm-opencl-icd
|
rocm-opencl-icd
|
||||||
rocm-opencl-runtime
|
rocm-opencl-runtime
|
||||||
|
mesa
|
||||||
amdvlk
|
amdvlk
|
||||||
];
|
]);
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
"AMD_VULKAN_ICD" = strings.toUpper cfg.defaultVulkanImplementation;
|
||||||
|
};
|
||||||
|
|
||||||
hardware.opengl.extraPackages32 = with pkgs.driversi686Linux; mkIf (!cfg.useProprietary) [
|
hardware.opengl.extraPackages32 = with pkgs.driversi686Linux; mkIf (!cfg.useProprietary) [
|
||||||
amdvlk
|
|
||||||
mesa
|
mesa
|
||||||
|
amdvlk
|
||||||
];
|
];
|
||||||
|
|
||||||
# Make rocblas and rocfft work
|
# Make rocblas and rocfft work
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue