Add a way to view the "GPU_USE_" flags at runtime. Useful for sanity checking on-device.

This commit is contained in:
Henrik Rydgård committed 2022-11-23 16:17:41 +01:00
1 parent 7eee7f2573
commit f6fcc9e9a7
7 files changed
+88 -1

No files matched your search

+14
View File
@@ -553,6 +553,7 @@ void SystemInfoScreen::CreateViews() {
deviceSpecs->Add(new InfoItem(si->T("High precision float range"), temp));
}
}
deviceSpecs->Add(new InfoItem(si->T("Depth buffer format"), DataFormatToString(draw->GetDeviceCaps().preferredDepthBufferFormat)));
deviceSpecs->Add(new ItemHeader(si->T("OS Information")));
deviceSpecs->Add(new InfoItem(si->T("Memory Page Size"), StringFromFormat(si->T("%d bytes"), GetMemoryProtectPageSize())));
deviceSpecs->Add(new InfoItem(si->T("RW/RX exclusive"), PlatformIsWXExclusive() ? di->T("Active") : di->T("Inactive")));
@@ -617,6 +618,19 @@ void SystemInfoScreen::CreateViews() {
deviceSpecs->Add(new InfoItem("Moga", moga));
#endif
if (gstate_c.useFlags != 0) {
// We're in-game, and can determine these.
// TODO: Call a static version of GPUCommon::CheckGPUFeatures() and derive them here directly.
deviceSpecs->Add(new ItemHeader(si->T("GPU Flags")));
for (int i = 0; i < 32; i++) {
if (gstate_c.Use((1 << i))) {
deviceSpecs->Add(new TextView(GpuUseFlagToString(i), new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->SetFocusable(true);
}
}
}
ViewGroup *storageScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
storageScroll->SetTag("DevSystemInfoBuildConfig");
LinearLayout *storage = new LinearLayout(ORIENT_VERTICAL);