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:
baldurk
2016-08-19 12:44:20 +02:00
parent 52a754d4c1
commit d2faf76356
19 changed files with 155 additions and 28 deletions
+18
View File
@@ -1450,6 +1450,24 @@ void Serialiser::FlushToDisk()
SAFE_DELETE_ARRAY(symbolDB);
}
// write the machine identifier as an ASCII section
{
const char sectionName[] = "renderdoc/internal/machineid";
uint64_t machineID = OSUtility::GetMachineIdent();
BinarySectionHeader section = {0};
section.isASCII = 0; // redundant but explicit
section.sectionNameLength = sizeof(sectionName); // includes null terminator
section.sectionType = eSectionType_MachineID;
section.sectionFlags = eSectionFlag_None;
section.sectionLength = sizeof(machineID);
FileIO::fwrite(&section, 1, offsetof(BinarySectionHeader, name), binFile);
FileIO::fwrite(sectionName, 1, sizeof(sectionName), binFile);
FileIO::fwrite(&machineID, 1, sizeof(machineID), binFile);
}
FileIO::fclose(binFile);
}
}