Add 60Hz sync option for testing(don't think it's required for AMD)

Fix profiler merge messup.
This commit is contained in:
LunaMoo committed 2018-01-15 13:00:51 +01:00
1 parent 5aa61aa700
commit 867293dd17
5 files changed
+12 -3

No files matched your search

+1
View File
@@ -521,6 +521,7 @@ static ConfigSetting graphicsSettings[] = {
ConfigSetting("RestartRequired", &g_Config.bRestartRequired, false, false),
#endif
ReportedConfigSetting("ForceMaxEmulatedFPS", &g_Config.iForceMaxEmulatedFPS, 60, true, true),
ConfigSetting("RefreshAt60Hz", &g_Config.bRefreshAt60Hz, false, true, true),
// Most low-performance (and many high performance) mobile GPUs do not support aniso anyway so defaulting to 4 is fine.
ConfigSetting("AnisotropyLevel", &g_Config.iAnisotropyLevel, 4, true, true),
+1
View File
@@ -202,6 +202,7 @@ public:
int iTexScalingType; // 0 = xBRZ, 1 = Hybrid
bool bTexDeposterize;
int iFpsLimit;
bool bRefreshAt60Hz;
bool bUnToggleFpsLimit;
int iForceMaxEmulatedFPS;
int iMaxRecent;
+4
View File
@@ -528,6 +528,8 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) {
time_update();
float scaledTimestep = timestep;
if (g_Config.bRefreshAt60Hz)
scaledTimestep = scaledTimestep * 1.001f;
if (fpsLimiter == FPS_LIMIT_CUSTOM && g_Config.iFpsLimit != 0) {
scaledTimestep *= 60.0f / g_Config.iFpsLimit;
}
@@ -601,6 +603,8 @@ static void DoFrameIdleTiming() {
}
float scaledVblank = timePerVblank;
if (g_Config.bRefreshAt60Hz)
scaledVblank = scaledVblank * 1.001f;
if (PSP_CoreParameter().fpsLimit == FPS_LIMIT_CUSTOM) {
// 0 is handled in FrameTimingThrottled().
scaledVblank *= 60.0f / g_Config.iFpsLimit;
+1
View File
@@ -1308,6 +1308,7 @@ void OtherSettingsScreen::CreateViews() {
emulatedSpeed->SetZeroLabel(gr->T("Disabled"));
list->Add(new CheckBox(&g_Config.bShowFrameProfiler, gr->T("Display frame profiler(heavy!)")));
list->Add(new CheckBox(&g_Config.bSimpleFrameStats, gr->T("Display simple frame stats(heavy!)")));
list->Add(new CheckBox(&g_Config.bRefreshAt60Hz, gr->T("Refresh at 60Hz(might help some gpu's to avoid stutter)")));
}
void OtherSettingsScreen::onFinish(DialogResult result) {
+5 -3
View File
@@ -160,7 +160,7 @@ void DrawProfile(UIContext &ui) {
if (catStatus[i] == PROFILE_CAT_IGNORE) {
continue;
}
Profiler_GetHistory(i, &history[0], historyLength);
Profiler_GetSlowestHistory(i, &slowestThread[0], &history[0], historyLength);
float x = 10;
uint32_t col = nice_colors[i % ARRAY_SIZE(nice_colors)];
@@ -191,7 +191,6 @@ void DrawProfile(UIContext &ui) {
}
}
}
Profiler_GetSlowestHistory(i, &slowestThread[0], &history[0], historyLength);
for (int n = 0; n < historyLength; n++) {
if (total[n] > maxTotal)
@@ -215,8 +214,11 @@ void DrawProfile(UIContext &ui) {
float legendMinVal = lastMaxVal * (1.0f / 120.0f);
std::vector<float> history(historyLength);
std::vector<int> slowestThread(historyLength);
std::vector<ProfileCatStatus> catStatus(numCategories);
Profiler_GetSlowestThreads(&slowestThread[0], historyLength);
float rowH = 30.0f;
float legendHeight = 0.0f;
float legendWidth = 80.0f;
@@ -234,7 +236,7 @@ void DrawProfile(UIContext &ui) {
int numberOfFrames = 30;
for (int i = 0; i < numCategories; i++) {
const char *name = Profiler_GetCategoryName(i);
Profiler_GetHistory(i, &history[0], numberOfFrames);
Profiler_GetSlowestHistory(i, &slowestThread[0], &history[0], historyLength);
float val = 0;
for (int n = 0; n < numberOfFrames; n++) {
val += history[n];