From c097a8b0247edb274f477f4d9c6baba1b47ba357 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Thu, 5 Feb 2026 06:58:41 +1300 Subject: [PATCH] Add D3D12 driver support for ReloadShaderDebugInformation() --- renderdoc/driver/d3d12/d3d12_resources.cpp | 18 ++++++++++++++++++ renderdoc/driver/d3d12/d3d12_resources.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/renderdoc/driver/d3d12/d3d12_resources.cpp b/renderdoc/driver/d3d12/d3d12_resources.cpp index b005b0468..a6f30f6ee 100644 --- a/renderdoc/driver/d3d12/d3d12_resources.cpp +++ b/renderdoc/driver/d3d12/d3d12_resources.cpp @@ -637,6 +637,24 @@ void WrappedID3D12PipelineState::ShaderEntry::BuildReflection() m_Details->resourceId = GetResourceID(); } +void WrappedID3D12PipelineState::ShaderEntry::ReloadShaderDebugInformation() +{ + for(auto it = m_Shaders.begin(); it != m_Shaders.end(); ++it) + { + ShaderEntry *shad = it->second; + if(ResourceIDGen::IsReplayOnlyID(shad->GetResourceID())) + continue; + shad->Reload(); + } +} + +void WrappedID3D12PipelineState::ShaderEntry::Reload() +{ + m_Built = false; + *m_Details = ShaderReflection(); + SAFE_DELETE(m_DXBCFile); +} + rdcpair FindMatchingRootParameter(const D3D12RootSignature &sig, D3D12_SHADER_VISIBILITY visibility, D3D12_DESCRIPTOR_RANGE_TYPE rangeType, diff --git a/renderdoc/driver/d3d12/d3d12_resources.h b/renderdoc/driver/d3d12/d3d12_resources.h index e041de853..c615cde86 100644 --- a/renderdoc/driver/d3d12/d3d12_resources.h +++ b/renderdoc/driver/d3d12/d3d12_resources.h @@ -945,6 +945,8 @@ public: return false; } + static void ReloadShaderDebugInformation(); + static void GetReflections(rdcarray &refls) { refls.clear(); @@ -1010,6 +1012,7 @@ public: private: void BuildReflection(); + void Reload(); DXBCKey m_Key;