Fix self capturing

This commit is contained in:
baldurk
2026-09-18 12:10:41 +01:00
parent ccb51b11dc
commit 590d5dea3e
+13 -11
View File
@@ -111,9 +111,19 @@ class VulkanHook : LibraryHook
// we don't register any library or function hooks because we use the layer system
// we assume the implicit layer is registered - the UI will prompt the user about installing it.
Process::RegisterEnvironmentModification(
EnvironmentModification(EnvMod::Set, EnvSep::NoSep, RENDERDOC_VULKAN_LAYER_VAR, "1"));
// support self-hosted capture by checking our filename and tweaking the env var we set
if(VulkanLayerJSONBasename != "renderdoc")
{
Process::RegisterEnvironmentModification(EnvironmentModification(
EnvMod::Set, EnvSep::NoSep,
"ENABLE_VULKAN_" + strupper(VulkanLayerJSONBasename) + "_CAPTURE", "1"));
}
else
{
// we assume the implicit layer is registered - the UI will prompt the user about installing it.
Process::RegisterEnvironmentModification(
EnvironmentModification(EnvMod::Set, EnvSep::NoSep, RENDERDOC_VULKAN_LAYER_VAR, "1"));
}
// RTSS layer is buggy, disable it to avoid bug reports that are caused by it
Process::RegisterEnvironmentModification(
@@ -167,14 +177,6 @@ class VulkanHook : LibraryHook
Process::RegisterEnvironmentModification(
EnvironmentModification(EnvMod::Set, EnvSep::NoSep, "DISABLE_LAYER", "1"));
// support self-hosted capture by checking our filename and tweaking the env var we set
if(VulkanLayerJSONBasename != "renderdoc")
{
Process::RegisterEnvironmentModification(EnvironmentModification(
EnvMod::Set, EnvSep::NoSep,
"ENABLE_VULKAN_" + strupper(VulkanLayerJSONBasename) + "_CAPTURE", "1"));
}
// check options to set further variables, and apply
OptionsUpdated();
}