mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
nixos ati: support glamor, disabled by default
This is from @ambrop72 #1969.
This commit is contained in:
parent
eac9324034
commit
a245aeaef1
1 changed files with 17 additions and 0 deletions
|
@ -20,6 +20,7 @@ let
|
||||||
nvidiaLegacy304 = { modules = [ kernelPackages.nvidia_x11_legacy304 ]; driverName = "nvidia"; };
|
nvidiaLegacy304 = { modules = [ kernelPackages.nvidia_x11_legacy304 ]; driverName = "nvidia"; };
|
||||||
unichrome = { modules = [ pkgs.xorgVideoUnichrome ]; };
|
unichrome = { modules = [ pkgs.xorgVideoUnichrome ]; };
|
||||||
virtualbox = { modules = [ kernelPackages.virtualboxGuestAdditions ]; driverName = "vboxvideo"; };
|
virtualbox = { modules = [ kernelPackages.virtualboxGuestAdditions ]; driverName = "vboxvideo"; };
|
||||||
|
ati = { modules = [ pkgs.xorg.xf86videoati pkgs.xorg.glamoregl ]; };
|
||||||
};
|
};
|
||||||
|
|
||||||
driverNames = config.hardware.opengl.videoDrivers;
|
driverNames = config.hardware.opengl.videoDrivers;
|
||||||
|
@ -372,6 +373,14 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useGlamor = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to use the Glamor module for 2D acceleration,
|
||||||
|
if possible.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -523,6 +532,13 @@ in
|
||||||
'')}
|
'')}
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
|
${if cfg.useGlamor then ''
|
||||||
|
Section "Module"
|
||||||
|
Load "dri2"
|
||||||
|
Load "glamoregl"
|
||||||
|
EndSection
|
||||||
|
'' else ""}
|
||||||
|
|
||||||
# For each supported driver, add a "Device" and "Screen"
|
# For each supported driver, add a "Device" and "Screen"
|
||||||
# section.
|
# section.
|
||||||
${flip concatMapStrings drivers (driver: ''
|
${flip concatMapStrings drivers (driver: ''
|
||||||
|
@ -530,6 +546,7 @@ in
|
||||||
Section "Device"
|
Section "Device"
|
||||||
Identifier "Device-${driver.name}[0]"
|
Identifier "Device-${driver.name}[0]"
|
||||||
Driver "${driver.driverName}"
|
Driver "${driver.driverName}"
|
||||||
|
${if cfg.useGlamor then ''Option "AccelMethod" "glamor"'' else ""}
|
||||||
${cfg.deviceSection}
|
${cfg.deviceSection}
|
||||||
${xrandrDeviceSection}
|
${xrandrDeviceSection}
|
||||||
EndSection
|
EndSection
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue