mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 15:06:32 +00:00
Add externally visible API to query for pixel history
This commit is contained in:
@@ -457,6 +457,27 @@ namespace renderdoc
|
||||
public ValueUnion value;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class PixelModification
|
||||
{
|
||||
public UInt32 eventID;
|
||||
|
||||
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
|
||||
public PixelValue preMod;
|
||||
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
|
||||
public PixelValue shaderOut;
|
||||
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
|
||||
public PixelValue postMod;
|
||||
|
||||
public bool backfaceCulled;
|
||||
public bool depthClipped;
|
||||
public bool viewClipped;
|
||||
public bool scissorClipped;
|
||||
public bool shaderDiscarded;
|
||||
public bool depthTestFailed;
|
||||
public bool stencilTestFailed;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class PostVSMeshData
|
||||
{
|
||||
|
||||
@@ -209,7 +209,9 @@ namespace renderdoc
|
||||
private static extern bool ReplayRenderer_GetResolve(IntPtr real, UInt64[] callstack, UInt32 callstackLen, IntPtr outtrace);
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern IntPtr ReplayRenderer_GetShaderDetails(IntPtr real, ResourceId shader);
|
||||
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool ReplayRenderer_PixelHistory(IntPtr real, ResourceId target, UInt32 x, UInt32 y, IntPtr history);
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool ReplayRenderer_VSGetDebugStates(IntPtr real, UInt32 vertid, UInt32 instid, UInt32 idx, UInt32 instOffset, UInt32 vertOffset, IntPtr outtrace);
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
@@ -488,6 +490,22 @@ namespace renderdoc
|
||||
return ret;
|
||||
}
|
||||
|
||||
public PixelModification[] PixelHistory(ResourceId target, UInt32 x, UInt32 y)
|
||||
{
|
||||
IntPtr mem = CustomMarshal.Alloc(typeof(templated_array));
|
||||
|
||||
bool success = ReplayRenderer_PixelHistory(m_Real, target, x, y, mem);
|
||||
|
||||
PixelModification[] ret = null;
|
||||
|
||||
if (success)
|
||||
ret = (PixelModification[])CustomMarshal.GetTemplatedArray(mem, typeof(PixelModification), true);
|
||||
|
||||
CustomMarshal.Free(mem);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public ShaderDebugTrace VSGetDebugStates(UInt32 vertid, UInt32 instid, UInt32 idx, UInt32 instOffset, UInt32 vertOffset)
|
||||
{
|
||||
IntPtr mem = CustomMarshal.Alloc(typeof(ShaderDebugTrace));
|
||||
|
||||
Reference in New Issue
Block a user