diff --git a/renderdoc/api/replay/d3d11_pipestate.h b/renderdoc/api/replay/d3d11_pipestate.h index c66c60ed9..3b8c43dc4 100644 --- a/renderdoc/api/replay/d3d11_pipestate.h +++ b/renderdoc/api/replay/d3d11_pipestate.h @@ -47,6 +47,8 @@ struct D3D11PipelineState rdctype::array layouts; ResourceId layout; ShaderReflection *Bytecode; + bool32 customName; + rdctype::str LayoutName; struct VertexBuffer { diff --git a/renderdoc/driver/d3d11/d3d11_replay.cpp b/renderdoc/driver/d3d11/d3d11_replay.cpp index 77e535159..c6e3a65f1 100644 --- a/renderdoc/driver/d3d11/d3d11_replay.cpp +++ b/renderdoc/driver/d3d11/d3d11_replay.cpp @@ -453,6 +453,17 @@ D3D11PipelineState D3D11Replay::MakePipelineState() ret.m_IA.layout = rm->GetOriginalID(layoutId); ret.m_IA.Bytecode = GetShader(layoutId, ""); + string str = GetDebugName(rs->IA.Layout); + ret.m_IA.customName = true; + + if(str == "" && ret.m_IA.layout != ResourceId()) + { + ret.m_IA.customName = false; + str = StringFormat::Fmt("Input Layout %llu", ret.m_IA.layout); + } + + ret.m_IA.LayoutName = str; + create_array_uninit(ret.m_IA.layouts, vec.size()); for(size_t i=0; i < vec.size(); i++) diff --git a/renderdocui/Interop/D3D11PipelineState.cs b/renderdocui/Interop/D3D11PipelineState.cs index 323ba5107..bd90c01da 100644 --- a/renderdocui/Interop/D3D11PipelineState.cs +++ b/renderdocui/Interop/D3D11PipelineState.cs @@ -63,6 +63,9 @@ namespace renderdoc private IntPtr _ptr_Bytecode; [CustomMarshalAs(CustomUnmanagedType.Skip)] public ShaderReflection Bytecode; + public bool customName; + [CustomMarshalAs(CustomUnmanagedType.UTF8TemplatedString)] + public string LayoutName; [StructLayout(LayoutKind.Sequential)] public class VertexBuffer diff --git a/renderdocui/Windows/PipelineState/D3D11PipelineStateViewer.cs b/renderdocui/Windows/PipelineState/D3D11PipelineStateViewer.cs index 0845f28bc..ee00f6553 100644 --- a/renderdocui/Windows/PipelineState/D3D11PipelineStateViewer.cs +++ b/renderdocui/Windows/PipelineState/D3D11PipelineStateViewer.cs @@ -629,10 +629,11 @@ namespace renderdocui.Windows.PipelineState if(state.m_IA.Bytecode == null) iaBytecode.Text = "None"; - else if (state.m_IA.Bytecode.DebugInfo == null || state.m_IA.Bytecode.DebugInfo.entryFunc.Length == 0) - iaBytecode.Text = "Layout " + state.m_IA.layout.ToString(); else - iaBytecode.Text = state.m_IA.Bytecode.DebugInfo.entryFunc; + iaBytecode.Text = state.m_IA.LayoutName; + + if (state.m_IA.Bytecode.DebugInfo != null && state.m_IA.Bytecode.DebugInfo.entryFunc.Length > 0) + iaBytecode.Text += " (" + state.m_IA.Bytecode.DebugInfo.entryFunc + ")"; iaBytecodeMismatch.Text = ""; iaBytecodeMismatch.Visible = false;