mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Fix the stats
This commit is contained in:
parent
089b63c22f
commit
87a16b0386
@ -397,6 +397,16 @@ void VulkanPushPool::NextBlock(VkDeviceSize allocationSize) {
|
||||
DEBUG_LOG(G3D, "%s: Created new block of size %s in %0.2f ms", name_, NiceSizeFormat(newBlockSize).c_str(), 1000.0 * (time_now_d() - start));
|
||||
}
|
||||
|
||||
size_t VulkanPushPool::GetUsedThisFrame() const {
|
||||
size_t used = 0;
|
||||
for (auto &block : blocks_) {
|
||||
if (block.frameIndex == vulkan_->GetCurFrame()) {
|
||||
used += block.used;
|
||||
}
|
||||
}
|
||||
return used;
|
||||
}
|
||||
|
||||
void VulkanPushPool::GetDebugString(char *buffer, size_t bufSize) const {
|
||||
size_t used = 0;
|
||||
size_t capacity = 0;
|
||||
|
@ -148,6 +148,8 @@ public:
|
||||
return bindOffset;
|
||||
}
|
||||
|
||||
size_t GetUsedThisFrame() const;
|
||||
|
||||
private:
|
||||
void NextBlock(VkDeviceSize allocationSize);
|
||||
|
||||
|
@ -354,9 +354,8 @@ void DrawEngineVulkan::BeginFrame() {
|
||||
|
||||
void DrawEngineVulkan::EndFrame() {
|
||||
FrameData *frame = &GetCurFrame();
|
||||
stats_.pushUBOSpaceUsed = 0; // (int)pushUBO->GetOffset();
|
||||
stats_.pushVertexSpaceUsed = 0; // (int)frame->pushVertex->GetOffset();
|
||||
stats_.pushIndexSpaceUsed = 0; // (int)frame->pushIndex->GetOffset();
|
||||
stats_.pushVertexSpaceUsed = (int)pushVertex_->GetUsedThisFrame();
|
||||
stats_.pushIndexSpaceUsed = (int)pushIndex_->GetUsedThisFrame();
|
||||
vertexCache_->End();
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,6 @@ class VulkanPushPool;
|
||||
struct VulkanPipeline;
|
||||
|
||||
struct DrawEngineVulkanStats {
|
||||
int pushUBOSpaceUsed;
|
||||
int pushVertexSpaceUsed;
|
||||
int pushIndexSpaceUsed;
|
||||
};
|
||||
|
@ -455,12 +455,11 @@ void GPU_Vulkan::GetStats(char *buffer, size_t bufsize) {
|
||||
textureCacheVulkan_->GetStats(texStats, sizeof(texStats));
|
||||
snprintf(buffer, bufsize,
|
||||
"Vertex, Fragment, Pipelines loaded: %i, %i, %i\n"
|
||||
"Pushbuffer space used: UBO %d, Vtx %d, Idx %d\n"
|
||||
"Pushbuffer space used: Vtx %d, Idx %d\n"
|
||||
"%s\n",
|
||||
shaderManagerVulkan_->GetNumVertexShaders(),
|
||||
shaderManagerVulkan_->GetNumFragmentShaders(),
|
||||
pipelineManager_->GetNumPipelines(),
|
||||
drawStats.pushUBOSpaceUsed,
|
||||
drawStats.pushVertexSpaceUsed,
|
||||
drawStats.pushIndexSpaceUsed,
|
||||
texStats
|
||||
|
Loading…
Reference in New Issue
Block a user