diff --git a/README.md b/README.md index 2007104..80ba090 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/Test.hs b/Test.hs index 64581c5..97bad2a 100755 --- a/Test.hs +++ b/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" diff --git a/nixGL.nix b/nixGL.nix index de18c01..3cd7675 100644 --- a/nixGL.nix +++ b/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];