From 2bf91773f31b7c3679fcc84032ceb00b873f3fe6 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 22 Jun 2022 12:37:10 +0100 Subject: [PATCH] When using debug info, don't use first store as variable live point * We already will have a live point when the variable is declared --- renderdoc/driver/shaders/spirv/spirv_debug.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/shaders/spirv/spirv_debug.cpp b/renderdoc/driver/shaders/spirv/spirv_debug.cpp index cce286d13..aca1799c6 100644 --- a/renderdoc/driver/shaders/spirv/spirv_debug.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_debug.cpp @@ -314,8 +314,9 @@ void ThreadState::WritePointerValue(Id pointer, const ShaderVariable &val) // This one is not included in any of the pointers lists above basechange.after = debugger.GetPointerValue(ids[ptrid]); - // if this is the first local write, mark this variable as becoming alive here - if(firstLocalWrite) + // if this is the first local write when we have no debug info, mark this variable as becoming + // alive here, instead of at its declaration + if(firstLocalWrite && !debugger.HasDebugInfo()) basechange.before.name = ""; m_State->changes.push_back(basechange);