mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Vulkan: Show enabled extensions separately in sysinfo
This commit is contained in:
parent
e16cac6548
commit
9b038d6574
@ -594,7 +594,8 @@ void VulkanRenderManager::BeginFrame(bool enableProfiling, bool enableLogProfile
|
||||
frameTimeData_[presentId].actualPresent = from_time_raw(timings[i].actualPresentTime);
|
||||
frameTimeData_[presentId].desiredPresentTime = from_time_raw(timings[i].desiredPresentTime);
|
||||
frameTimeData_[presentId].earliestPresentTime = from_time_raw(timings[i].earliestPresentTime);
|
||||
frameTimeData_[presentId].presentMargin = from_time_raw(timings[i].earliestPresentTime);
|
||||
frameTimeData_[presentId].presentMargin = from_time_raw(timings[i].presentMargin);
|
||||
INFO_LOG(G3D, "presentID: %llu : %f", (unsigned long long)presentId, frameTimeData_[presentId].actualPresent);
|
||||
}
|
||||
delete[] timings;
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ public:
|
||||
VkDescriptorSet GetOrCreateDescriptorSet(VkBuffer buffer);
|
||||
|
||||
std::vector<std::string> GetFeatureList() const override;
|
||||
std::vector<std::string> GetExtensionList() const override;
|
||||
std::vector<std::string> GetExtensionList(bool enabledOnly) const override;
|
||||
|
||||
uint64_t GetNativeObject(NativeObject obj, void *srcObject) override;
|
||||
|
||||
@ -1626,10 +1626,16 @@ std::vector<std::string> VKContext::GetFeatureList() const {
|
||||
return features;
|
||||
}
|
||||
|
||||
std::vector<std::string> VKContext::GetExtensionList() const {
|
||||
std::vector<std::string> VKContext::GetExtensionList(bool enabledOnly) const {
|
||||
std::vector<std::string> extensions;
|
||||
for (auto &iter : vulkan_->GetDeviceExtensionsAvailable()) {
|
||||
extensions.push_back(iter.extensionName);
|
||||
if (enabledOnly) {
|
||||
for (auto &iter : vulkan_->GetDeviceExtensionsEnabled()) {
|
||||
extensions.push_back(iter);
|
||||
}
|
||||
} else {
|
||||
for (auto &iter : vulkan_->GetDeviceExtensionsAvailable()) {
|
||||
extensions.push_back(iter.extensionName);
|
||||
}
|
||||
}
|
||||
return extensions;
|
||||
}
|
||||
|
@ -691,7 +691,7 @@ public:
|
||||
virtual const DeviceCaps &GetDeviceCaps() const = 0;
|
||||
virtual uint32_t GetDataFormatSupport(DataFormat fmt) const = 0;
|
||||
virtual std::vector<std::string> GetFeatureList() const { return std::vector<std::string>(); }
|
||||
virtual std::vector<std::string> GetExtensionList() const { return std::vector<std::string>(); }
|
||||
virtual std::vector<std::string> GetExtensionList(bool enabledOnly) const { return std::vector<std::string>(); }
|
||||
virtual std::vector<std::string> GetDeviceList() const { return std::vector<std::string>(); }
|
||||
|
||||
virtual PresentationMode GetPresentationMode() const = 0;
|
||||
|
@ -764,36 +764,43 @@ void SystemInfoScreen::CreateTabs() {
|
||||
|
||||
VulkanContext *vk = (VulkanContext *)draw->GetNativeObject(Draw::NativeObject::CONTEXT);
|
||||
|
||||
gpuExtensions->Add(new ItemHeader(si->T("Vulkan Features")));
|
||||
CollapsibleSection *vulkanFeatures = gpuExtensions->Add(new CollapsibleSection(si->T("Vulkan Features")));
|
||||
std::vector<std::string> features = draw->GetFeatureList();
|
||||
for (auto &feature : features) {
|
||||
gpuExtensions->Add(new TextView(feature, new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
vulkanFeatures->Add(new TextView(feature, new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
}
|
||||
|
||||
gpuExtensions->Add(new ItemHeader(si->T("Present Modes")));
|
||||
CollapsibleSection *presentModes = gpuExtensions->Add(new CollapsibleSection(si->T("Present Modes")));
|
||||
for (auto mode : vk->GetAvailablePresentModes()) {
|
||||
std::string str = VulkanPresentModeToString(mode);
|
||||
if (mode == vk->GetPresentMode()) {
|
||||
str += std::string(" (") + di->T("Current") + ")";
|
||||
}
|
||||
gpuExtensions->Add(new TextView(VulkanPresentModeToString(mode), new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
presentModes->Add(new TextView(VulkanPresentModeToString(mode), new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
}
|
||||
|
||||
gpuExtensions->Add(new ItemHeader(si->T("Display Color Formats")));
|
||||
CollapsibleSection *colorFormats = gpuExtensions->Add(new CollapsibleSection(si->T("Display Color Formats")));
|
||||
if (vk) {
|
||||
for (auto &format : vk->SurfaceFormats()) {
|
||||
std::string line = StringFromFormat("%s : %s", VulkanFormatToString(format.format), VulkanColorSpaceToString(format.colorSpace));
|
||||
gpuExtensions->Add(new TextView(line,
|
||||
colorFormats->Add(new TextView(line,
|
||||
new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
gpuExtensions->Add(new ItemHeader(si->T("Vulkan Extensions")));
|
||||
std::vector<std::string> extensions = draw->GetExtensionList();
|
||||
CollapsibleSection *enabledExtensions = gpuExtensions->Add(new CollapsibleSection(std::string(si->T("Vulkan Extensions")) + " (" + di->T("Enabled") + ")"));
|
||||
std::vector<std::string> extensions = draw->GetExtensionList(true);
|
||||
std::sort(extensions.begin(), extensions.end());
|
||||
for (auto &extension : extensions) {
|
||||
gpuExtensions->Add(new TextView(extension, new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
enabledExtensions->Add(new TextView(extension, new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
}
|
||||
|
||||
CollapsibleSection *vulkanExtensions = gpuExtensions->Add(new CollapsibleSection(si->T("Vulkan Extensions")));
|
||||
extensions = draw->GetExtensionList(false);
|
||||
std::sort(extensions.begin(), extensions.end());
|
||||
for (auto &extension : extensions) {
|
||||
vulkanExtensions->Add(new TextView(extension, new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user