mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Don't add replay resource ID offset multiple times
This commit is contained in:
@@ -39,7 +39,10 @@ namespace ResourceIDGen
|
||||
// separate replay IDs from live IDs by adding a value when replaying.
|
||||
// 1000000000000000000 live IDs before we overlap replay IDs gives
|
||||
// almost 32 years generating 100000 IDs per frame at 10000 FPS.
|
||||
globalIDCounter = RDCMAX(uint64_t(globalIDCounter), uint64_t(globalIDCounter+1000000000000000000ULL));
|
||||
|
||||
// only add this value once (since we're not |'ing on a bit)
|
||||
if(globalIDCounter < 1000000000000000000ULL)
|
||||
globalIDCounter = RDCMAX(uint64_t(globalIDCounter), uint64_t(globalIDCounter+1000000000000000000ULL));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user