2018-01-17 12:59:32 +00:00
|
|
|
// Copyright (c) 2016- PPSSPP Project.
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official git repository and contact information can be found at
|
|
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
|
2020-10-04 21:24:14 +00:00
|
|
|
#include "Common/Render/DrawBuffer.h"
|
|
|
|
#include "Common/GPU/thin3d.h"
|
2020-10-04 18:48:47 +00:00
|
|
|
#include "Common/UI/Context.h"
|
|
|
|
#include "Common/UI/View.h"
|
2020-10-11 17:04:35 +00:00
|
|
|
#include "Common/System/Display.h"
|
2020-10-11 11:07:08 +00:00
|
|
|
#include "Common/System/System.h"
|
2018-01-29 22:49:55 +00:00
|
|
|
|
2018-01-17 12:59:32 +00:00
|
|
|
#include "DebugVisVulkan.h"
|
2020-10-04 21:24:14 +00:00
|
|
|
#include "Common/GPU/Vulkan/VulkanMemory.h"
|
|
|
|
#include "Common/GPU/Vulkan/VulkanImage.h"
|
2018-01-17 12:59:32 +00:00
|
|
|
#include "GPU/Vulkan/GPU_Vulkan.h"
|
|
|
|
#include "GPU/Vulkan/VulkanUtil.h"
|
2020-09-13 21:34:00 +00:00
|
|
|
#include "GPU/Vulkan/TextureCacheVulkan.h"
|
2018-01-17 12:59:32 +00:00
|
|
|
|
2019-08-20 22:03:00 +00:00
|
|
|
#undef DrawText
|
|
|
|
|
2018-01-17 12:59:32 +00:00
|
|
|
void DrawAllocatorVis(UIContext *ui, GPUInterface *gpu) {
|
2021-11-23 07:53:19 +00:00
|
|
|
// TODO: Make a new allocator visualizer for VMA.
|
2018-01-17 12:59:32 +00:00
|
|
|
}
|
2019-08-20 22:03:00 +00:00
|
|
|
|
2020-10-11 11:07:08 +00:00
|
|
|
void DrawGPUProfilerVis(UIContext *ui, GPUInterface *gpu) {
|
2019-08-20 22:03:00 +00:00
|
|
|
if (!gpu) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
using namespace Draw;
|
2020-10-11 17:04:35 +00:00
|
|
|
const int padding = 10 + System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_LEFT);
|
|
|
|
const int starty = 50 + System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_TOP);
|
2019-08-20 22:03:00 +00:00
|
|
|
int x = padding;
|
|
|
|
int y = starty;
|
|
|
|
|
|
|
|
ui->Begin();
|
|
|
|
|
|
|
|
GPU_Vulkan *gpuVulkan = static_cast<GPU_Vulkan *>(gpu);
|
|
|
|
|
|
|
|
std::string text = gpuVulkan->GetGpuProfileString();
|
|
|
|
|
2019-08-21 16:28:20 +00:00
|
|
|
ui->SetFontScale(0.4f, 0.4f);
|
2020-10-11 17:04:35 +00:00
|
|
|
ui->DrawTextShadow(text.c_str(), x, y, 0xFFFFFFFF, FLAG_DYNAMIC_ASCII);
|
2019-08-21 21:10:41 +00:00
|
|
|
ui->SetFontScale(1.0f, 1.0f);
|
2019-08-20 22:03:00 +00:00
|
|
|
ui->Flush();
|
|
|
|
}
|