Display custom names for input layouts

This commit is contained in:
baldurk
2016-04-12 22:46:25 +02:00
parent 37e6e7a94e
commit d62ce264b6
4 changed files with 20 additions and 3 deletions
+2
View File
@@ -47,6 +47,8 @@ struct D3D11PipelineState
rdctype::array<LayoutInput> layouts;
ResourceId layout;
ShaderReflection *Bytecode;
bool32 customName;
rdctype::str LayoutName;
struct VertexBuffer
{
+11
View File
@@ -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;