diff --git a/renderdoc/driver/d3d11/d3d11_analyse.cpp b/renderdoc/driver/d3d11/d3d11_analyse.cpp index 382aa56dd..58e7353d4 100644 --- a/renderdoc/driver/d3d11/d3d11_analyse.cpp +++ b/renderdoc/driver/d3d11/d3d11_analyse.cpp @@ -3600,10 +3600,10 @@ vector D3D11DebugManager::PixelHistory(uint32_t frameID, vect float *data = (float *)(rowdata + 2 * sizeof(float) * (storex * 3 + 0)); mod.preMod.depth = data[0]; - mod.preMod.stencil = int(data[1])&0xff; + mod.preMod.stencil = int32_t(data[1]); mod.postMod.depth = data[2]; - mod.postMod.stencil = int(data[3])&0xff; + mod.postMod.stencil = int32_t(data[3]); } // complex case - need to determine how many fragments from this draw wrote to the pixel and generate a diff --git a/renderdoc/replay/data_types.h b/renderdoc/replay/data_types.h index 65509dcdb..f2af0f97b 100644 --- a/renderdoc/replay/data_types.h +++ b/renderdoc/replay/data_types.h @@ -206,7 +206,7 @@ struct ModificationValue { PixelValue col; float depth; - uint8_t stencil; + int32_t stencil; }; struct PixelModification diff --git a/renderdocui/Interop/FetchInfo.cs b/renderdocui/Interop/FetchInfo.cs index 1337a1f08..fc929bed3 100644 --- a/renderdocui/Interop/FetchInfo.cs +++ b/renderdocui/Interop/FetchInfo.cs @@ -463,7 +463,7 @@ namespace renderdoc [CustomMarshalAs(CustomUnmanagedType.CustomClass)] public PixelValue col; public float depth; - public byte stencil; + public Int32 stencil; }; [StructLayout(LayoutKind.Sequential)] diff --git a/renderdocui/Windows/PixelHistoryView.Designer.cs b/renderdocui/Windows/PixelHistoryView.Designer.cs index 3e9b9f452..031e30b74 100644 --- a/renderdocui/Windows/PixelHistoryView.Designer.cs +++ b/renderdocui/Windows/PixelHistoryView.Designer.cs @@ -50,7 +50,7 @@ treeListColumn2.CellFormat.TextAlignment = System.Drawing.ContentAlignment.TopLeft; treeListColumn2.Width = 100; treeListColumn3.AutoSizeMinSize = 10; - treeListColumn3.Width = 50; + treeListColumn3.Width = 60; treeListColumn4.AutoSizeMinSize = 20; treeListColumn4.Width = 40; treeListColumn5.AutoSizeMinSize = 20; @@ -69,7 +69,7 @@ this.events.Location = new System.Drawing.Point(0, 0); this.events.MultiSelect = false; this.events.Name = "events"; - this.events.RowOptions.ItemHeight = 84; + this.events.RowOptions.ItemHeight = 96; this.events.RowOptions.ShowHeader = false; this.events.Size = new System.Drawing.Size(386, 478); this.events.TabIndex = 1; diff --git a/renderdocui/Windows/PixelHistoryView.cs b/renderdocui/Windows/PixelHistoryView.cs index cc3b0bf12..156c54829 100644 --- a/renderdocui/Windows/PixelHistoryView.cs +++ b/renderdocui/Windows/PixelHistoryView.cs @@ -142,11 +142,27 @@ namespace renderdocui.Windows Formatter.Format(mod.postMod.col.value.f[3]); } - preModVal += "\nD: " + Formatter.Format(mod.preMod.depth); - preModVal += String.Format("\nS: {0:X}", mod.preMod.stencil); + if (mod.preMod.depth >= 0.0f) + { + preModVal += "\nD: " + Formatter.Format(mod.preMod.depth); + postModVal += "\nD:" + Formatter.Format(mod.postMod.depth); + } + else + { + preModVal += "\nD: -"; + postModVal += "\nD: -"; + } - postModVal += "\nD:" + Formatter.Format(mod.postMod.depth); - postModVal += String.Format("\nS: {0:X}", mod.postMod.stencil); + if (mod.preMod.stencil >= 0) + { + preModVal += String.Format("\nS: {0:X}", mod.preMod.stencil); + postModVal += String.Format("\nS: {0:X}", mod.postMod.stencil); + } + else + { + preModVal += "\nS: -"; + postModVal += "\nS: -"; + } var node = events.Nodes.Add(new object[] { mod.eventID, name, preModVal, "", postModVal, "" });