Add option to enable ACO shader compiler on Mesa >= 19.3

This commit is contained in:
Mathieu Comandon 2020-03-28 16:34:17 -07:00
parent 13ddb444db
commit 19667e01fe
4 changed files with 21 additions and 1 deletions

3
debian/changelog vendored
View file

@ -2,6 +2,8 @@ lutris (0.5.5) eoan; urgency=medium
* Initial support for Humble Bundle
* Add resolution switching support for Wayland (Mutter only)
* Add option to enable ACO shader compiler on Mesa >= 19.3
* Add initial support for Humble Bundle
* DXVK is enabled by default
* Add initial support for VKD3D
* Migrate D9VK configs to use DXVK
@ -11,7 +13,6 @@ lutris (0.5.5) eoan; urgency=medium
* Better handle authentication failure for GOG
* Fix case issue with key lookup in Steam VDF files
* Add Yuzu runner
* Add initial support for Humble Bundle
* Add bsnes-hd beta and smsplus libretro cores
* Add sound device option for Mednafen
* Remove bundled winetricks

View file

@ -443,6 +443,9 @@ class Game(GObject.Object):
).communicate()
xkbcomp.communicate()
if system_config.get("aco"):
env["RADV_PERFTEST"] = "aco"
pulse_latency = system_config.get("pulse_latency")
if pulse_latency:
env["PULSE_LATENCY_MSEC"] = "60"

View file

@ -219,6 +219,16 @@ system_options = [ # pylint: disable=invalid-name
"condition": bool(system.find_executable("strangle")),
"help": "Limit the game's fps to desired number",
},
{
"option": "aco",
"type": "bool",
"label": "Enable ACO shader compiler",
"condition": system.LINUX_SYSTEM.is_feature_supported("ACO"),
"help": (
"Enable ACO shader compiler, improving performance in a lot of games. "
"Requires Mesa 19.3 or later."
)
},
{
"option": "gamemode",
"type": "bool",

View file

@ -364,6 +364,12 @@ class LinuxSystem:
def is_feature_supported(self, feature):
"""Return whether the system has the necessary libs to support a feature"""
if feature == "ACO":
try:
mesa_version = LINUX_SYSTEM.glxinfo.GLX_MESA_query_renderer.version
return mesa_version >= "19.3"
except AttributeError:
return False
return not self.get_missing_requirement_libs(feature)[0]