mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Display custom names for input layouts
This commit is contained in:
@@ -47,6 +47,8 @@ struct D3D11PipelineState
|
||||
rdctype::array<LayoutInput> layouts;
|
||||
ResourceId layout;
|
||||
ShaderReflection *Bytecode;
|
||||
bool32 customName;
|
||||
rdctype::str LayoutName;
|
||||
|
||||
struct VertexBuffer
|
||||
{
|
||||
|
||||
@@ -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++)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user