mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Vulkan: Show instance extensions, both enabled and available, in sysinfo
This commit is contained in:
parent
7139dd326c
commit
8e1dc35dd1
@ -291,6 +291,13 @@ public:
|
||||
return device_extensions_enabled_;
|
||||
}
|
||||
|
||||
const std::vector<VkExtensionProperties> &GetInstanceExtensionsAvailable() const {
|
||||
return instance_extension_properties_;
|
||||
}
|
||||
const std::vector<const char *> &GetInstanceExtensionsEnabled() const {
|
||||
return instance_extensions_enabled_;
|
||||
}
|
||||
|
||||
const VkPhysicalDeviceMemoryProperties &GetMemoryProperties() const {
|
||||
return memory_properties_;
|
||||
}
|
||||
@ -314,7 +321,6 @@ public:
|
||||
for (const auto &iter : instance_layer_properties_) {
|
||||
for (const auto &ext : iter.extensions) {
|
||||
if (!strcmp(extensionName, ext.extensionName)) {
|
||||
INFO_LOG(G3D, "%s found in layer extensions: %s", extensionName, iter.properties.layerName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ public:
|
||||
VkDescriptorSet GetOrCreateDescriptorSet(VkBuffer buffer);
|
||||
|
||||
std::vector<std::string> GetFeatureList() const override;
|
||||
std::vector<std::string> GetExtensionList(bool enabledOnly) const override;
|
||||
std::vector<std::string> GetExtensionList(bool device, bool enabledOnly) const override;
|
||||
|
||||
uint64_t GetNativeObject(NativeObject obj, void *srcObject) override;
|
||||
|
||||
@ -1630,14 +1630,14 @@ std::vector<std::string> VKContext::GetFeatureList() const {
|
||||
return features;
|
||||
}
|
||||
|
||||
std::vector<std::string> VKContext::GetExtensionList(bool enabledOnly) const {
|
||||
std::vector<std::string> VKContext::GetExtensionList(bool device, bool enabledOnly) const {
|
||||
std::vector<std::string> extensions;
|
||||
if (enabledOnly) {
|
||||
for (auto &iter : vulkan_->GetDeviceExtensionsEnabled()) {
|
||||
for (auto &iter : (device ? vulkan_->GetDeviceExtensionsEnabled() : vulkan_->GetInstanceExtensionsEnabled())) {
|
||||
extensions.push_back(iter);
|
||||
}
|
||||
} else {
|
||||
for (auto &iter : vulkan_->GetDeviceExtensionsAvailable()) {
|
||||
for (auto &iter : (device ? vulkan_->GetDeviceExtensionsAvailable() : vulkan_->GetInstanceExtensionsAvailable())) {
|
||||
extensions.push_back(iter.extensionName);
|
||||
}
|
||||
}
|
||||
|
@ -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(bool enabledOnly) const { return std::vector<std::string>(); }
|
||||
virtual std::vector<std::string> GetExtensionList(bool device, 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;
|
||||
|
@ -790,14 +790,29 @@ void SystemInfoScreen::CreateTabs() {
|
||||
#endif
|
||||
|
||||
CollapsibleSection *enabledExtensions = gpuExtensions->Add(new CollapsibleSection(std::string(si->T("Vulkan Extensions")) + " (" + di->T("Enabled") + ")"));
|
||||
std::vector<std::string> extensions = draw->GetExtensionList(true);
|
||||
std::vector<std::string> extensions = draw->GetExtensionList(true, true);
|
||||
std::sort(extensions.begin(), extensions.end());
|
||||
for (auto &extension : extensions) {
|
||||
enabledExtensions->Add(new TextView(extension, new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
}
|
||||
// Also get instance extensions
|
||||
enabledExtensions->Add(new ItemHeader("Instance"));
|
||||
extensions = draw->GetExtensionList(false, true);
|
||||
std::sort(extensions.begin(), extensions.end());
|
||||
for (auto &extension : extensions) {
|
||||
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);
|
||||
extensions = draw->GetExtensionList(true, false);
|
||||
std::sort(extensions.begin(), extensions.end());
|
||||
for (auto &extension : extensions) {
|
||||
vulkanExtensions->Add(new TextView(extension, new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
|
||||
}
|
||||
|
||||
vulkanExtensions->Add(new ItemHeader("Instance"));
|
||||
// Also get instance extensions
|
||||
extensions = draw->GetExtensionList(false, 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