mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add HTML pipeline export for GL, and minor tweaks on Vulkan/D3D11
This commit is contained in:
@@ -204,6 +204,13 @@ namespace renderdoc
|
||||
YUV,
|
||||
};
|
||||
|
||||
public enum QualityHint
|
||||
{
|
||||
DontCare,
|
||||
Nicest,
|
||||
Fastest,
|
||||
};
|
||||
|
||||
public enum APIPipelineStateType
|
||||
{
|
||||
D3D11,
|
||||
|
||||
@@ -395,10 +395,10 @@ namespace renderdoc
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class Hints
|
||||
{
|
||||
public Int32 Derivatives;
|
||||
public Int32 LineSmooth;
|
||||
public Int32 PolySmooth;
|
||||
public Int32 TexCompression;
|
||||
public QualityHint Derivatives;
|
||||
public QualityHint LineSmooth;
|
||||
public QualityHint PolySmooth;
|
||||
public QualityHint TexCompression;
|
||||
public bool LineSmoothEnabled;
|
||||
public bool PolySmoothEnabled;
|
||||
};
|
||||
|
||||
@@ -3103,7 +3103,11 @@ namespace renderdocui.Windows.PipelineState
|
||||
b.Enabled ? "Yes" : "No", b.LogicEnabled ? "Yes" : "No",
|
||||
b.m_Blend.Source, b.m_Blend.Destination, b.m_Blend.Operation,
|
||||
b.m_AlphaBlend.Source, b.m_AlphaBlend.Destination, b.m_AlphaBlend.Operation,
|
||||
b.LogicOp, b.WriteMask });
|
||||
b.LogicOp,
|
||||
((b.WriteMask & 0x1) == 0 ? "_" : "R") +
|
||||
((b.WriteMask & 0x2) == 0 ? "_" : "G") +
|
||||
((b.WriteMask & 0x4) == 0 ? "_" : "B") +
|
||||
((b.WriteMask & 0x8) == 0 ? "_" : "A") });
|
||||
|
||||
i++;
|
||||
}
|
||||
@@ -3129,6 +3133,26 @@ namespace renderdocui.Windows.PipelineState
|
||||
new object[] { om.m_State.DepthEnable ? "Yes" : "No", om.m_State.DepthWrites ? "Yes" : "No", om.m_State.DepthFunc });
|
||||
}
|
||||
|
||||
{
|
||||
writer.WriteStartElement("h3");
|
||||
writer.WriteString("Stencil State");
|
||||
writer.WriteEndElement();
|
||||
|
||||
ExportHTMLTable(writer,
|
||||
new string[] { "Stencil Test Enable", "Stencil Read Mask", "Stencil Write Mask" },
|
||||
new object[] { om.m_State.StencilEnable ? "Yes" : "No", om.m_State.StencilReadMask.ToString("X2"), om.m_State.StencilWriteMask.ToString("X2") });
|
||||
|
||||
writer.WriteStartElement("p");
|
||||
writer.WriteEndElement();
|
||||
|
||||
ExportHTMLTable(writer,
|
||||
new string[] { "Face", "Function", "Pass Operation", "Fail Operation", "Depth Fail Operation" },
|
||||
new object[][] {
|
||||
new object[] { "Front", om.m_State.m_FrontFace.Func, om.m_State.m_FrontFace.PassOp, om.m_State.m_FrontFace.FailOp, om.m_State.m_FrontFace.DepthFailOp },
|
||||
new object[] { "Back", om.m_State.m_BackFace.Func, om.m_State.m_BackFace.PassOp, om.m_State.m_BackFace.FailOp, om.m_State.m_BackFace.DepthFailOp },
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
writer.WriteStartElement("h3");
|
||||
writer.WriteString("Render targets");
|
||||
@@ -3315,19 +3339,7 @@ div.stage table tr td { border-right: 1px solid #AAAAAA; background-color: #EEEE
|
||||
context += String.Format(" > {0}", d.name);
|
||||
}
|
||||
|
||||
FetchDrawcall prev = null;
|
||||
|
||||
for (uint i = draw.events[0].eventID; i <= draw.events.Last().eventID; i++)
|
||||
{
|
||||
prev = m_Core.GetDrawcall(i);
|
||||
if (prev != null)
|
||||
break;
|
||||
}
|
||||
|
||||
if (prev != null)
|
||||
context += String.Format(" => {0}, {1}", prev.name, draw.name);
|
||||
else
|
||||
context += String.Format(" => {0}", draw.name);
|
||||
context += String.Format(" => {0}", draw.name);
|
||||
|
||||
writer.WriteString(context);
|
||||
}
|
||||
|
||||
@@ -300,6 +300,7 @@
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.showDisabledToolitem = new System.Windows.Forms.ToolStripButton();
|
||||
this.showEmptyToolitem = new System.Windows.Forms.ToolStripButton();
|
||||
this.export = new System.Windows.Forms.ToolStripButton();
|
||||
this.stageTabControl = new renderdocui.Controls.TablessControl();
|
||||
this.tabVTX = new System.Windows.Forms.TabPage();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
@@ -493,6 +494,7 @@
|
||||
this.showDisabled = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.showEmpty = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.exportDialog = new System.Windows.Forms.SaveFileDialog();
|
||||
toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
|
||||
toolstripTable = new System.Windows.Forms.TableLayoutPanel();
|
||||
groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
@@ -731,7 +733,7 @@
|
||||
this.flowLayoutPanel6.Controls.Add(this.toolStrip1);
|
||||
this.flowLayoutPanel6.Location = new System.Drawing.Point(3, 3);
|
||||
this.flowLayoutPanel6.Name = "flowLayoutPanel6";
|
||||
this.flowLayoutPanel6.Size = new System.Drawing.Size(335, 25);
|
||||
this.flowLayoutPanel6.Size = new System.Drawing.Size(394, 25);
|
||||
this.flowLayoutPanel6.TabIndex = 1;
|
||||
//
|
||||
// toolStrip1
|
||||
@@ -741,10 +743,11 @@
|
||||
toolStripLabel1,
|
||||
this.toolStripSeparator2,
|
||||
this.showDisabledToolitem,
|
||||
this.showEmptyToolitem});
|
||||
this.showEmptyToolitem,
|
||||
this.export});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(335, 25);
|
||||
this.toolStrip1.Size = new System.Drawing.Size(394, 25);
|
||||
this.toolStrip1.TabIndex = 0;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
@@ -773,6 +776,15 @@
|
||||
this.showEmptyToolitem.Text = "Show Empty Items";
|
||||
this.showEmptyToolitem.Click += new System.EventHandler(this.hideEmpty_Click);
|
||||
//
|
||||
// export
|
||||
//
|
||||
this.export.Image = global::renderdocui.Properties.Resources.save;
|
||||
this.export.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.export.Name = "export";
|
||||
this.export.Size = new System.Drawing.Size(59, 22);
|
||||
this.export.Text = "Export";
|
||||
this.export.Click += new System.EventHandler(this.export_Click);
|
||||
//
|
||||
// stageTabControl
|
||||
//
|
||||
this.stageTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
@@ -4719,6 +4731,12 @@
|
||||
this.showEmpty.Text = "Show Empty";
|
||||
this.showEmpty.Click += new System.EventHandler(this.hideEmpty_Click);
|
||||
//
|
||||
// exportDialog
|
||||
//
|
||||
this.exportDialog.DefaultExt = "html";
|
||||
this.exportDialog.Filter = "HTML Files (*.html)|*.html";
|
||||
this.exportDialog.Title = "Export pipeline state as HTML";
|
||||
//
|
||||
// GLPipelineStateViewer
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -5115,5 +5133,7 @@
|
||||
private TreelistView.TreeListView tesReadWrite;
|
||||
private System.Windows.Forms.GroupBox gsReadWriteGroup;
|
||||
private TreelistView.TreeListView gsReadWrite;
|
||||
private System.Windows.Forms.ToolStripButton export;
|
||||
private System.Windows.Forms.SaveFileDialog exportDialog;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -391,6 +391,9 @@
|
||||
<metadata name="rightclickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="exportDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>315, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>47</value>
|
||||
</metadata>
|
||||
|
||||
@@ -2856,10 +2856,6 @@ namespace renderdocui.Windows.PipelineState
|
||||
{
|
||||
List<object[]> rows = new List<object[]>();
|
||||
|
||||
ExportHTMLTable(writer,
|
||||
new string[] { "Face", "Ref", "Compare Mask", "Write Mask", "Function", "Pass Op", "Fail Op", "Depth Fail Op" },
|
||||
rows.ToArray());
|
||||
|
||||
rows.Add(new object[] {
|
||||
"Front",
|
||||
ds.front.stencilref.ToString("X2"), ds.front.compareMask.ToString("X2"), ds.front.writeMask.ToString("X2"),
|
||||
@@ -2871,6 +2867,10 @@ namespace renderdocui.Windows.PipelineState
|
||||
ds.back.stencilref.ToString("X2"), ds.back.compareMask.ToString("X2"), ds.back.writeMask.ToString("X2"),
|
||||
ds.back.func, ds.back.passOp, ds.back.failOp, ds.back.depthFailOp
|
||||
});
|
||||
|
||||
ExportHTMLTable(writer,
|
||||
new string[] { "Face", "Ref", "Compare Mask", "Write Mask", "Function", "Pass Op", "Fail Op", "Depth Fail Op" },
|
||||
rows.ToArray());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3069,19 +3069,7 @@ div.stage table tr td { border-right: 1px solid #AAAAAA; background-color: #EEEE
|
||||
context += String.Format(" > {0}", d.name);
|
||||
}
|
||||
|
||||
FetchDrawcall prev = null;
|
||||
|
||||
for (uint i = draw.events[0].eventID; i <= draw.events.Last().eventID; i++)
|
||||
{
|
||||
prev = m_Core.GetDrawcall(i);
|
||||
if (prev != null)
|
||||
break;
|
||||
}
|
||||
|
||||
if (prev != null)
|
||||
context += String.Format(" => {0}, {1}", prev.name, draw.name);
|
||||
else
|
||||
context += String.Format(" => {0}", draw.name);
|
||||
context += String.Format(" => {0}", draw.name);
|
||||
|
||||
writer.WriteString(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user