mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-15 03:57:08 +00:00
Treat -1 as the invalid microsecond duration value, not 0
* Some functions can be so quick that they register as a duration of 0. This is expected and we should not end up omitting it when importing or exporting because we think it was missing. As a 64-bit value, losing a bit for signedness is not a problem.
This commit is contained in:
@@ -354,7 +354,7 @@ static ReplayStatus Structured2XML(const char *filename, const RDCFile &file, ui
|
||||
xChunk.append_attribute("threadID") = chunk->metadata.threadID;
|
||||
if(chunk->metadata.timestampMicro)
|
||||
xChunk.append_attribute("timestamp") = chunk->metadata.timestampMicro;
|
||||
if(chunk->metadata.durationMicro)
|
||||
if(chunk->metadata.durationMicro >= 0)
|
||||
xChunk.append_attribute("duration") = chunk->metadata.durationMicro;
|
||||
if(!chunk->metadata.callstack.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user