mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 16:06:31 +00:00
Pass stencil as int32_t so depth or stencil of -1 indicates no data
This commit is contained in:
@@ -3600,10 +3600,10 @@ vector<PixelModification> 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
|
||||
|
||||
@@ -206,7 +206,7 @@ struct ModificationValue
|
||||
{
|
||||
PixelValue col;
|
||||
float depth;
|
||||
uint8_t stencil;
|
||||
int32_t stencil;
|
||||
};
|
||||
|
||||
struct PixelModification
|
||||
|
||||
@@ -463,7 +463,7 @@ namespace renderdoc
|
||||
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
|
||||
public PixelValue col;
|
||||
public float depth;
|
||||
public byte stencil;
|
||||
public Int32 stencil;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
@@ -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, "" });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user