mirror of
https://github.com/pabloaul/lsfg-vk-flake.git
synced 2025-08-27 19:06:28 -03:00
Compare commits
5 commits
51fc478dae
...
ec1b66adcb
Author | SHA1 | Date | |
---|---|---|---|
|
ec1b66adcb | ||
|
de1d2031dc | ||
|
f6d9f06778 | ||
|
5421d0a4bb | ||
|
9e8162794b |
4 changed files with 51 additions and 16 deletions
34
README.md
34
README.md
|
@ -9,7 +9,7 @@ Nix flake for using [Lossless Scaling's frame generation on Linux](https://githu
|
||||||
### System-wide (NixOS module)
|
### System-wide (NixOS module)
|
||||||
This approach will install an implicit layer to ``/etc/vulkan/implicit_layer.d/``
|
This approach will install an implicit layer to ``/etc/vulkan/implicit_layer.d/``
|
||||||
|
|
||||||
Add this repository to your flake inputs, output function and module list:
|
Add this to your flake inputs, output function and modules list:
|
||||||
```nix
|
```nix
|
||||||
inputs = {
|
inputs = {
|
||||||
...
|
...
|
||||||
|
@ -29,25 +29,39 @@ outputs = {nixpkgs, lsfg-vk-flake, ...}: {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
And then you should be able to enable this in your system config using:
|
And then enable this in your system config:
|
||||||
```nix
|
```nix
|
||||||
services.lsfg-vk.enable = true;
|
services.lsfg-vk.enable = true;
|
||||||
```
|
```
|
||||||
|
|
||||||
### User install (manual)
|
### User install (manual)
|
||||||
1. Build the library:
|
1. Build the library:
|
||||||
``nix build``
|
```bash
|
||||||
3. Create the following path in case it does not exist:
|
nix build
|
||||||
``mkdir -p $HOME/.local/share/vulkan/implicit_layer.d``
|
```
|
||||||
|
2. Create the following path in case it does not exist:
|
||||||
|
```bash
|
||||||
|
mkdir -p $HOME/.local/share/vulkan/implicit_layer.d
|
||||||
|
```
|
||||||
3. Symlink the build results to your $HOME/.local/
|
3. Symlink the build results to your $HOME/.local/
|
||||||
``cp -ifrsv "$(readlink -f ./result)"/* $HOME/.local/``
|
```bash
|
||||||
|
cp -ifrsv "$(readlink -f ./result)"/* $HOME/.local/
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Run a Vulkan application with the environment variable ``ENABLE_LSFG=1`` set.
|
Run a Vulkan application with the environment variable ``ENABLE_LSFG=1`` set.
|
||||||
|
|
||||||
Example: ``ENABLE_LSFG=1 vkcube`` and look for output like this in the terminal: lsfg-vk(...): ...
|
Example:
|
||||||
|
```bash
|
||||||
|
ENABLE_LSFG=1 vkcube
|
||||||
|
```
|
||||||
|
|
||||||
You can also enable it per game on Steam by adding this to the launch options of a game like this:
|
To confirm that it is working, look for output like this in the terminal: lsfg-vk(...): ...
|
||||||
``ENABLE_LSFG=1 %COMMAND%``
|
|
||||||
|
|
||||||
There are many more options that can be set. Consult the original repository for further documentation.
|
You can also enable it per game on Steam by adding this to the launch options:
|
||||||
|
```
|
||||||
|
ENABLE_LSFG=1 %COMMAND%
|
||||||
|
```
|
||||||
|
|
||||||
|
>[!NOTE]
|
||||||
|
> If the environment variable is set but the program doesn't show any lsfg-vk output, you may need to add the application to your lsfg-vk configuration file at `~/.config/lsfg-vk/config.toml`. Read more about it in the [Wiki](https://github.com/PancakeTAS/lsfg-vk/wiki/Configuring-lsfg-vk)
|
14
default.nix
14
default.nix
|
@ -13,17 +13,21 @@
|
||||||
libXcursor,
|
libXcursor,
|
||||||
libXi,
|
libXi,
|
||||||
libglvnd,
|
libglvnd,
|
||||||
|
libxkbcommon,
|
||||||
|
wayland-scanner,
|
||||||
|
pkg-config,
|
||||||
|
wayland,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
llvmPackages.stdenv.mkDerivation {
|
llvmPackages.stdenv.mkDerivation {
|
||||||
pname = "lsfg-vk";
|
pname = "lsfg-vk";
|
||||||
version = "unstable-2025-07-18-53b4438";
|
version = "unstable-2025-07-19-dd5190a";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "PancakeTAS";
|
owner = "PancakeTAS";
|
||||||
repo = "lsfg-vk";
|
repo = "lsfg-vk";
|
||||||
rev = "53b4438a2a567c26d739c856329c1a4d13aa1968";
|
rev = "dd5190aa680a7543143e724a100bd5d6e9898dd7";
|
||||||
hash = "sha256-Ze4PBu3W7wKbYAMwQIdV2LBI8xWpYWvNJ3qIId2ByPU=";
|
hash = "sha256-2WrUtjUG8l3tSElDYfhvi4lrFUG1Oh5M7DAEX2mFh5s=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,6 +42,8 @@ llvmPackages.stdenv.mkDerivation {
|
||||||
llvmPackages.libllvm # needed for release builds
|
llvmPackages.libllvm # needed for release builds
|
||||||
cmake
|
cmake
|
||||||
ninja
|
ninja
|
||||||
|
wayland-scanner
|
||||||
|
pkg-config
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -50,6 +56,8 @@ llvmPackages.stdenv.mkDerivation {
|
||||||
libXcursor
|
libXcursor
|
||||||
libXi
|
libXi
|
||||||
libglvnd
|
libglvnd
|
||||||
|
libxkbcommon
|
||||||
|
wayland
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
6
flake.lock
generated
6
flake.lock
generated
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1751792365,
|
"lastModified": 1752687322,
|
||||||
"narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=",
|
"narHash": "sha256-RKwfXA4OZROjBTQAl9WOZQFm7L8Bo93FQwSJpAiSRvo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb",
|
"rev": "6e987485eb2c77e5dcc5af4e3c70843711ef9251",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
13
module.nix
13
module.nix
|
@ -31,6 +31,17 @@ in
|
||||||
Required if Lossless Scaling isn't installed in a standard location
|
Required if Lossless Scaling isn't installed in a standard location
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configFile = lib.mkOption
|
||||||
|
{
|
||||||
|
type = with lib.types; nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "/home/user/.config/lsfg-vk/conf.toml";
|
||||||
|
description = ''
|
||||||
|
Sets the LSFG_CONFIG environment variable.
|
||||||
|
Required if the lsfg-vk configuration file isn't stored at the standard location
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -42,5 +53,7 @@ in
|
||||||
"${cfg.package}/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json";
|
"${cfg.package}/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json";
|
||||||
|
|
||||||
environment.sessionVariables.LSFG_DLL_PATH = lib.mkIf (cfg.losslessDLLFile != null) cfg.losslessDLLFile;
|
environment.sessionVariables.LSFG_DLL_PATH = lib.mkIf (cfg.losslessDLLFile != null) cfg.losslessDLLFile;
|
||||||
|
|
||||||
|
environment.sessionVariables.LSFG_CONFIG = lib.mkIf (cfg.configFile != null) cfg.configFile;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue