mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Save machine ident in captures and compare to machine ident on open
* If the machine idents differ in significant ways that we'd consider it to be a different platform (currently just OS), and if so mark it as supported but suggested to be replayed remotely.
This commit is contained in:
@@ -504,6 +504,13 @@ namespace renderdoc
|
||||
Percentage,
|
||||
};
|
||||
|
||||
public enum ReplaySupport
|
||||
{
|
||||
Unsupported,
|
||||
Supported,
|
||||
SuggestRemote,
|
||||
};
|
||||
|
||||
public enum ReplayCreateStatus
|
||||
{
|
||||
Success = 0,
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace renderdoc
|
||||
class StaticExports
|
||||
{
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool RENDERDOC_SupportLocalReplay(IntPtr logfile, IntPtr outdriver);
|
||||
private static extern ReplaySupport RENDERDOC_SupportLocalReplay(IntPtr logfile, IntPtr outdriver, IntPtr outident);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern ReplayCreateStatus RENDERDOC_CreateReplayRenderer(IntPtr logfile, ref float progress, ref IntPtr rendPtr);
|
||||
@@ -110,19 +110,23 @@ namespace renderdoc
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern void RENDERDOC_FreeEnvironmentModificationList(IntPtr mem);
|
||||
|
||||
public static bool SupportLocalReplay(string logfile, out string driverName)
|
||||
public static ReplaySupport SupportLocalReplay(string logfile, out string driverName, out string recordMachineIdent)
|
||||
{
|
||||
IntPtr mem = CustomMarshal.Alloc(typeof(templated_array));
|
||||
IntPtr name_mem = CustomMarshal.Alloc(typeof(templated_array));
|
||||
IntPtr ident_mem = CustomMarshal.Alloc(typeof(templated_array));
|
||||
|
||||
IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile);
|
||||
|
||||
bool ret = RENDERDOC_SupportLocalReplay(logfile_mem, mem);
|
||||
ReplaySupport ret = RENDERDOC_SupportLocalReplay(logfile_mem, name_mem, ident_mem);
|
||||
|
||||
CustomMarshal.Free(logfile_mem);
|
||||
|
||||
driverName = CustomMarshal.TemplatedArrayToString(mem, true);
|
||||
driverName = CustomMarshal.TemplatedArrayToString(name_mem, true);
|
||||
recordMachineIdent = CustomMarshal.TemplatedArrayToString(ident_mem, true);
|
||||
|
||||
CustomMarshal.Free(name_mem);
|
||||
CustomMarshal.Free(ident_mem);
|
||||
|
||||
CustomMarshal.Free(mem);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user