I can tell you a bit about this, but more in the context of Microsoft Windows systems (mainly Windows 10). I’ll point out that I haven’t done any in-depth research on this, but rather rely on my own experiences and publicly available benchmarks that I’ve had the opportunity to review.
1. Disable double/triple buffering.
Although this should shorten the time it takes for a new frame to appear on the screen, rather than reducing input lag. If you have turned off double buffering and noticed a reduction in input lag, that’s great. In any case, by turning it off, screen tearing will be present.
2. Disablie V-Sync or other synchronization technologies (FreeSync, etc.).
This will allow the main game loop to perform more logic updates, and therefore react to input events faster. The downside is screen tearing and increased CPU usage (unless the main loop supports an updaterate cap).
3. Run the game in exclusive full screen mode.
In this mode, the game process takes direct control of the GPU and display, bypassing the Windows desktop composition (i.e. Desktop Window Manager – DWM). The lack of intermediaries means that keyboard/mouse input gets to the game faster, and frames are rendered and displayed without additional buffering.
An additional advantage is that the system recognizes that the game is running in exclusive mode and disables some system features (e.g. blocks the display of notification bubbles). The downside is that it is difficult to switch between applications, but SDL gives you the option to disable automatic minimization of a window when it loses focus (there is a hint for this).
4. Use exclusive fullscreen mode with lower than native resolution.
If you render the content of a new game frame directly onto the window texture, then obviously the smaller this texture is, the less there is to render. The gain may be negligible, but it’s still something. The faster a frame is rendered, the faster it will be possible to move on to the next logic update (depending on the implementation of the main loop).
5. Perform as many logic updates and renders as possible.
The main loop should do as many logic updates and renderings as the CPU can handle. With V-Sync disabled, the game process will be able to react to input very quickly and visualize it on the screen.
However, this approach has a lot of drawbacks. First, the game process will consume all available CPU time, which can cause excessive heat generation by the CPU, increased cooling, and power consumption. Preempting the CPU in this way can lead to lower system responsiveness and stability, although mainly on low-end or more heavily loaded machines. Another downside is that rendering thousands of frames per second is a waste of resources and power, since only 60
to 144
can appear on the screen. Screen tearing will of course also be present.
6. Use the highest possible priority for the game process.
Theoretically, the best performance will be achieved when the game process has real-time priority, but the possibility to use it depends on the operating system, user permissions, and other factors. In any case, the higher the priority of the game process, the more willingly the system scheduler will process its instructions.