Graphics: Difference between revisions

point to new renamed option
OpenCL: address possible mesa confusion
 
(One intermediate revision by one other user not shown)
Line 30: Line 30:
Mesa can installed using the option <code>hardware.graphics.enable</code>, but note that most desktop environment modules set this themselves anyway. This option writes the driver files to <code>/run/opengl-driver</code>. Additional graphics drivers packages can be added using <code>hardware.graphics.extraPackages</code>.
Mesa can installed using the option <code>hardware.graphics.enable</code>, but note that most desktop environment modules set this themselves anyway. This option writes the driver files to <code>/run/opengl-driver</code>. Additional graphics drivers packages can be added using <code>hardware.graphics.extraPackages</code>.


To verify which Mesa driver is used: <code>nix shell nixpkgs#glxinfo -c glxinfo</code>
To verify which Mesa driver is used: <code>nix shell nixpkgs#mesa-demos -c glxinfo</code>




Line 42: Line 42:
== OpenCL ==
== OpenCL ==


Computing things on the GPU is supported through the OpenCL API. To enable OpenCL support, add the right packages for your hardware to <code>hardware.graphics.extraPackages</code>. See also [https://wiki.archlinux.org/title/GPGPU the Arch Wiki].
Computing things on the GPU is supported through the OpenCL API. To enable OpenCL support, add the right packages for your hardware to <code>hardware.graphics.extraPackages</code> (note that despite Mesa being present by default, its OpenCL drivers are placed in a separate <code>opencl</code> output that must be manually added). See also [https://wiki.archlinux.org/title/GPGPU the Arch Wiki].


To verify OpenCL support: <code>nix shell nixpkgs#clinfo -c clinfo</code>
To verify OpenCL support: <code>nix shell nixpkgs#clinfo -c clinfo</code>