From d132b575825bbc7dfa988fc7f68d317a230ca0cf Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 26 May 2023 13:08:40 +0100 Subject: [PATCH] Disable fpsmon vulkan layer --- renderdoc/driver/vulkan/vk_layer.cpp | 6 ++++++ renderdoc/driver/vulkan/vk_replay.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/renderdoc/driver/vulkan/vk_layer.cpp b/renderdoc/driver/vulkan/vk_layer.cpp index 61e45d4b6..92b2afa76 100644 --- a/renderdoc/driver/vulkan/vk_layer.cpp +++ b/renderdoc/driver/vulkan/vk_layer.cpp @@ -137,6 +137,12 @@ class VulkanHook : LibraryHook Process::RegisterEnvironmentModification(EnvironmentModification( EnvMod::Set, EnvSep::NoSep, "VK_LAYER_bandicam_helper_DEBUG_1", "1")); + // fpsmon not only has a buggy layer but it also picks an absurdly generic disable environment + // variable :(. Hopefully no other program picks this, or if it does then it's probably not a + // bad thing to disable too + Process::RegisterEnvironmentModification( + EnvironmentModification(EnvMod::Set, EnvSep::NoSep, "DISABLE_LAYER", "1")); + #if ENABLED(RDOC_WIN32) // on windows support self-hosted capture by checking our filename and tweaking the env var we // set diff --git a/renderdoc/driver/vulkan/vk_replay.cpp b/renderdoc/driver/vulkan/vk_replay.cpp index 4df28800a..341aab7d8 100644 --- a/renderdoc/driver/vulkan/vk_replay.cpp +++ b/renderdoc/driver/vulkan/vk_replay.cpp @@ -4635,6 +4635,12 @@ RDResult Vulkan_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, IRep Process::RegisterEnvironmentModification( EnvironmentModification(EnvMod::Set, EnvSep::NoSep, "VK_LAYER_bandicam_helper_DEBUG_1", "1")); + // fpsmon not only has a buggy layer but it also picks an absurdly generic disable environment + // variable :(. Hopefully no other program picks this, or if it does then it's probably not a + // bad thing to disable too + Process::RegisterEnvironmentModification( + EnvironmentModification(EnvMod::Set, EnvSep::NoSep, "DISABLE_LAYER", "1")); + Process::ApplyEnvironmentModification(); void *module = LoadVulkanLibrary();