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;