VkGHL
Force anisotropy, mip LOD Bias, VSYNC and limit frame rate for Vulkan-driven games.
Install / Use
/learn @pchome/VkGHLREADME
VkGHL
Vulkan (Game Halt, Green Hog, ... whatever)? Layer.<br/> Force anisotropy, mip LOD Bias, VSYNC and limit frame rate for Vulkan-driven games.
Settings (environment variables)
- FPS - limit frame time (
>0) - AF - Anisotropy (
0- Off,1..16- On) - MIPLODBIAS - Mip Map LOD Bias (
-16..16(akasharpen..blurry,-1is ok in general))<br/> Consider to disable AA/AF when setting this. - RETRO - "retro" filter (
0- Off,1- On) - VSYNC<br/>
0- Off<br/>1- Mailbox (uncapped framerate)<br/>2- On<br/>3- Adaptive
Build
Prepare
git clone https://github.com/LunarG/VulkanToolscd VulkanTools- [optional]
for d in assistant_layer demo_layer starter_layer; do rm -r layer_factory/$d; done git submodule add -- https://github.com/pchome/VkGHL layer_factory/VkGHL
Build
mkdir -p build_layercd build_layer- NOTE: full path to Vulkan header files (may fix
"vk_loader_platform.h"compile-time errors)
cmake \
-DCMAKE_CXX_FLAGS="-I/usr/include/vulkan" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/tmp/VkGHL \
-DBUILD_TESTS=OFF \
-DBUILD_LAYERSVT=OFF \
-DBUILD_VKTRACE=OFF \
-DBUILD_VIA=OFF \
-DBUILD_LAYERMGR=OFF \
-DBUILD_VKTRACE_REPLAY=OFF \
-DVULKAN_HEADERS_INSTALL_DIR=usr/ \
-DVULKAN_LOADER_INSTALL_DIR=usr/ \
-DVULKAN_VALIDATIONLAYERS_INSTALL_DIR=usr/ \
..
make- Repeat steps 1..4 for 32bit build<br>
(e.g. use
build_layer32name and-DCMAKE_CXX_FLAGS="-m32 -I/usr/include/vulkan")
Try
cd layers
MIPLODBIAS=-1 \
AF=16 \
RETRO=1 \
VSYNC=0 \
FPS=150.55 \
DXVK_HUD=1 \
VK_LAYER_PATH=. \
VK_INSTANCE_LAYERS="VK_LAYER_LUNARG_VkGHL" \
wine d3d11-triangle.exe
Suitable installation path examples
In such cases you can ommit VK_LAYER_PATH= environment variable.
Install *.so files into directory visible via LD_LIBRARY_PATH=.
System
/usr/lib/libVkLayer_VkGHL.so
/usr/lib64/libVkLayer_VkGHL.so
/usr/share/vulkan/explicit_layer.d/VkLayer_VkGHL.json
User (add LD_LIBRARY_PATH="${HOME}/.local/lib64:${HOME}/.local/lib" to your env)
~/.local/lib/libVkLayer_VkGHL.so
~/.local/lib64/libVkLayer_VkGHL.so
~/.local/share/vulkan/explicit_layer.d/VkLayer_VkGHL.json
Useful tools
The Vulkan Configurator is a graphical application that allows a user to specify which layers will be loaded by Vulkan applications at runtime. It provides an alternative to setting layers through environment variables or an application's layer selection. In addition, it allows using layers from non-standard locations, selecting the ordering for implicit layers, and specifying settings for layers that Vulkan Configurator supports.
Note
Currently mimics libstrangle behaviour and env vars (UPPERCASE ones). This may change in future.
