Add AMDGpu wrapper for free amd driver
This commit is contained in:
parent
5f330c2185
commit
ad21f20321
|
@ -47,6 +47,7 @@ configuration.
|
|||
- `nix-env -f ./ -iA nixGLIntel`: Mesa OpenGL implementation (intel, amd, nouveau, ...).
|
||||
- `nix-env -f ./ -iA nixGLNvidiaBumblebee`: Proprietary Nvidia driver on hybrid hardware.
|
||||
- `nix-env -f ./ -iA nixGLNvidia`: Proprietary Nvidia driver.
|
||||
- `nix-env -f ./ -iA nixGLAmdGPU`: Free AMDGpu driver.
|
||||
- `nix-env -f ./ -iA nixGLDefault`: Tries to auto-detect and install Nvidia,
|
||||
if not, fallback to mesa.
|
||||
|
||||
|
|
8
Test.hs
8
Test.hs
|
@ -95,6 +95,14 @@ main = do
|
|||
describe "Vulkan" $ do
|
||||
checkVulkan "Mesa" "nixVulkanIntel"
|
||||
|
||||
describe "AMD GPU" $ do
|
||||
describe "OpenGL" $ do
|
||||
-- TODO: fill the right name for glxinfo data
|
||||
checkOpenGL "AMD" "nixGLAmdGPU"
|
||||
xdescribe "Vulkan" $ do
|
||||
-- Not tested yet
|
||||
checkVulkan "AMD" "nixVulkanAmdGPU"
|
||||
|
||||
describe "Nvidia - Bumblebee" $ do
|
||||
describe "OpenGL" $ do
|
||||
checkOpenGL "NVIDIA" "nixGLNvidiaBumblebee"
|
||||
|
|
15
nixGL.nix
15
nixGL.nix
|
@ -178,6 +178,21 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
# Support for amdgpu
|
||||
nixGLAmdGPU = writeExecutable {
|
||||
name = "nixGLAmdGPU";
|
||||
# add the 32 bits drivers if needed
|
||||
text = let
|
||||
drivers = [xorg.xf86videoamdgpu] ++ lib.optional enable32bits pkgsi686Linux.xorg.xf86videoamdgpu;
|
||||
in ''
|
||||
#!/usr/bin/env sh
|
||||
export LD_LIBRARY_PATH=${
|
||||
lib.makeLibraryPath drivers
|
||||
}:$LD_LIBRARY_PATH
|
||||
"$@"
|
||||
'';
|
||||
};
|
||||
|
||||
nixGLCommon = nixGL:
|
||||
runCommand "nixGLCommon" {
|
||||
buildInuts = [nixGL];
|
||||
|
|
Loading…
Reference in New Issue
Block a user