Intel Graphics: Difference between revisions

From NixOS Wiki
imported>Colemickens
No edit summary
imported>Colemickens
No edit summary
Line 4: Line 4:


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
hardware.opengl.package =
  config = {
  (pkgs.mesa.override {
    environment.variables = {
    galliumDrivers = [ "nouveau" "virgl" "swrast" "iris" ];
      MESA_LOADER_DRIVER_OVERRIDE = "iris";
   });
    };
    hardware.opengl.package = (pkgs.mesa.override {
      galliumDrivers = [ "nouveau" "virgl" "swrast" "iris" ];
    });
   };
</syntaxHighlight>
</syntaxHighlight>



Revision as of 22:02, 18 July 2019

Iris

To use the new Gallium iris driver, you can use the following in your system configuration:

  config = {
    environment.variables = {
      MESA_LOADER_DRIVER_OVERRIDE = "iris";
    };
    hardware.opengl.package = (pkgs.mesa.override {
      galliumDrivers = [ "nouveau" "virgl" "swrast" "iris" ];
    });
  };

Note that you might want additional entries in extraPackages, for example, to enable "accelerated video playback".

(See this GitHub thread for context and explanation. nouveau is included to trigger the gallium-xa build, which is currently required because the nix derivation expects to copy the gallium-xa pkg-config files into place. Without swrast and/or virgl, it complains about needing softpipe/llvmpipe to build the nine state tracker.)