mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-28 12:51:03 +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:
@@ -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(§ion, 1, offsetof(BinarySectionHeader, name), binFile);
|
||||
FileIO::fwrite(sectionName, 1, sizeof(sectionName), binFile);
|
||||
FileIO::fwrite(&machineID, 1, sizeof(machineID), binFile);
|
||||
}
|
||||
|
||||
FileIO::fclose(binFile);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user