Add more file-size stats to statistics viewer

This commit is contained in:
baldurk
2016-04-13 00:37:28 +02:00
parent 70b99a4412
commit 9ee5218761
6 changed files with 28 additions and 5 deletions
+3
View File
@@ -248,6 +248,9 @@ struct FetchFrameInfo
uint32_t frameNumber;
uint32_t firstEvent;
uint64_t fileOffset;
uint64_t fileSize;
uint64_t persistentSize;
uint64_t initDataSize;
uint64_t captureTime;
ResourceId immContextId;
FetchFrameStatistics stats;
+4
View File
@@ -1117,6 +1117,10 @@ void WrappedID3D11Device::ReadLogInitialisation()
}
#endif
m_FrameRecord.frameInfo.fileSize = m_pSerialiser->GetSize();
m_FrameRecord.frameInfo.persistentSize = m_pSerialiser->GetSize() - frameOffset;
m_FrameRecord.frameInfo.initDataSize = chunkInfos[(D3D11ChunkType)INITIAL_CONTENTS].totalsize;
RDCDEBUG("Allocating %llu persistant bytes of memory for the log.", m_pSerialiser->GetSize() - frameOffset);
m_pSerialiser->SetDebugText(false);
+4
View File
@@ -3072,6 +3072,10 @@ void WrappedOpenGL::ReadLogInitialisation()
);
}
#endif
m_FrameRecord.frameInfo.fileSize = m_pSerialiser->GetSize();
m_FrameRecord.frameInfo.persistentSize = m_pSerialiser->GetSize() - frameOffset;
m_FrameRecord.frameInfo.initDataSize = chunkInfos[(GLChunkType)INITIAL_CONTENTS].totalsize;
RDCDEBUG("Allocating %llu persistant bytes of memory for the log.", m_pSerialiser->GetSize() - frameOffset);
+4
View File
@@ -1229,6 +1229,10 @@ void WrappedVulkan::ReadLogInitialisation()
);
}
#endif
m_FrameRecord.frameInfo.fileSize = m_pSerialiser->GetSize();
m_FrameRecord.frameInfo.persistentSize = m_pSerialiser->GetSize() - firstFrame;
m_FrameRecord.frameInfo.initDataSize = chunkInfos[(VulkanChunkType)INITIAL_CONTENTS].totalsize;
RDCDEBUG("Allocating %llu persistant bytes of memory for the log.", m_pSerialiser->GetSize() - firstFrame);
+3
View File
@@ -395,6 +395,9 @@ namespace renderdoc
public UInt32 frameNumber;
public UInt32 firstEvent;
public UInt64 fileOffset;
public UInt64 fileSize;
public UInt64 persistentSize;
public UInt64 initDataSize;
public UInt64 captureTime;
public ResourceId immContextId;
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
+10 -5
View File
@@ -622,8 +622,6 @@ namespace renderdocui.Windows
}
}
UInt64 persistentData = (UInt64)fileSize - firstDrawcall.events[0].fileOffset;
var lastDraw = m_Core.CurDrawcalls[m_Core.CurDrawcalls.Length - 1];
while (lastDraw.children != null && lastDraw.children.Length > 0)
lastDraw = lastDraw.children[lastDraw.children.Length - 1];
@@ -726,9 +724,16 @@ namespace renderdocui.Windows
largeTexW /= largeTexCount;
largeTexH /= largeTexCount;
string header = String.Format("Stats for {0}.\n\nFile size: {1:N2}MB\nPersistent Data (approx): {2:N2}MB\n",
Path.GetFileName(m_Core.LogFileName),
(float)fileSize / (1024.0f * 1024.0f), (float)persistentData / (1024.0f * 1024.0f));
UInt64 persistentData = frameInfo.persistentSize;
float compressedMB = (float)fileSize / (1024.0f * 1024.0f);
float uncompressedMB = (float)frameInfo.fileSize / (1024.0f * 1024.0f);
float compressRatio = uncompressedMB / compressedMB;
float persistentMB = (float)frameInfo.persistentSize / (1024.0f * 1024.0f);
float initDataMB = (float)frameInfo.initDataSize / (1024.0f * 1024.0f);
string header = String.Format("Stats for {0}.\n\nFile size: {1:N2}MB ({2:N2}MB uncompressed, compression ratio {3:N2}:1)\nPersistent Data (approx): {4:N2}MB, Frame-initial data (approx): {5:N2}MB\n",
Path.GetFileName(m_Core.LogFileName), compressedMB, uncompressedMB, compressRatio, persistentMB, initDataMB);
string draws = String.Format("Draw calls: {0}\nDispatch calls: {1}\n",
drawCount, dispatchCount);
string calls = statsRecorded ? String.Format("API calls: {0}\n\tIndex/vertex bind calls: {1}\n\tConstant bind calls: {2}\n\tSampler bind calls: {3}\n\tResource bind calls: {4}\n\tResource update calls: {5}\n",