From 96c4d54f876974230020e56e5cf976d8a16167de Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 28 Nov 2022 05:39:31 +0100 Subject: [PATCH] vrcompositor_wrapper: Disable all Vulkan layers (#1279) For Vulkan loader < 1.3.234 there is a blacklist of layers to disable. For Vulkan loader >= 1.3.234 there is a whitelist of layers to enable. --- alvr/vrcompositor_wrapper/src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/alvr/vrcompositor_wrapper/src/main.rs b/alvr/vrcompositor_wrapper/src/main.rs index 7b4cf8cb21..b8f5cfc5af 100644 --- a/alvr/vrcompositor_wrapper/src/main.rs +++ b/alvr/vrcompositor_wrapper/src/main.rs @@ -10,9 +10,15 @@ fn main() { Err(err) => panic!("Failed to read vrcompositor symlink: {err}"), }; std::env::set_var("VK_LAYER_PATH", layer_path); + // Vulkan < 1.3.234 std::env::set_var("VK_INSTANCE_LAYERS", "VK_LAYER_ALVR_capture"); - // fossilize breaks the ALVR vulkan layer std::env::set_var("DISABLE_VK_LAYER_VALVE_steam_fossilize_1", "1"); + std::env::set_var("DISABLE_MANGOHUD", "1"); + std::env::set_var("DISABLE_VKBASALT", "1"); + std::env::set_var("DISABLE_OBS_VKCAPTURE", "1"); + // Vulkan >= 1.3.234 + std::env::set_var("VK_LOADER_LAYERS_ENABLE", "VK_LAYER_ALVR_capture,VK_LAYER_MESA_device_select"); + std::env::set_var("VK_LOADER_LAYERS_DISABLE", "*"); let err = exec::execvp(argv0 + ".real", std::env::args()); println!("Failed to run vrcompositor {err}");