ALL: Add an option to control dirty rectangless TinyGL optimisation

Exposed to command line via --[no-]dirtyrects.
As dirty rectangles make the workload vary a lot between frames, it makes
performance regressions harder to spot. Disabling it produces lower, but
much more regular FPS counts.
This commit is contained in:
Vincent Pelletier
2017-05-03 16:52:36 +00:00
parent 707a48c8c5
commit e7073dc037
3 changed files with 10 additions and 0 deletions
+6
View File
@@ -126,6 +126,8 @@ static const char HELP_STRING[] =
" --aspect-ratio Enable aspect ratio correction\n"
" --bpp=NUM Select number of bits per pixel, 0 (auto-detect), 16, 32\n"
" (default: 0) (only supported by software renderer)\n"
" --[no-]dirtyrects Enable dirty rectangles optimisation in software renderer\n"
" (default: enabled)\n"
#ifdef ENABLE_EVENTRECORDER
" --record-mode=MODE Specify record mode for event recorder (record, playback,\n"
" passthrough [default])\n"
@@ -171,6 +173,7 @@ void registerDefaults() {
ConfMan.registerDefault("filtering", false);
ConfMan.registerDefault("show_fps", false);
ConfMan.registerDefault("aspect_ratio", false);
ConfMan.registerDefault("dirtyrects", true);
ConfMan.registerDefault("bpp", 0);
// Sound & Music
@@ -514,6 +517,9 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
DO_LONG_OPTION_INT("bpp")
END_OPTION
DO_LONG_OPTION_BOOL("dirtyrects")
END_OPTION
DO_LONG_OPTION("gamma")
END_OPTION
// ResidualVM specific start