| Summary: | [PATCH] Add a specific KMSDRM hint for low latency video | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Manuel Alfayate Corchete <redwindwanderer> |
| Component: | video | Assignee: | Brandon Schaefer <brandontschaefer> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | brandontschaefer |
| Version: | 2.0.6 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Attachments: |
Small patch for low latency mode hint on the KMSDRM video driver
Version 2 patch for low latency mode hint on the KMSDRM video driver |
||
Created attachment 3033 [details]
Version 2 patch for low latency mode hint on the KMSDRM video driver
Updated version of the patch. Please merge this version: it saves a function call on every pageflip.
I consider it the final version of this patch, so it's ready to be merged ASAP.
|
Created attachment 3023 [details] Small patch for low latency mode hint on the KMSDRM video driver Hi, This patch adds low input lag hint to the KMSDRM driver. In some scenarios, low-latency video is desirable, so instead of letting drmModePageFlip to do it's triple-buffering and thus letting the game to loop once more, we immediately wait for vsync after issuing a pageflip. This results on a whole frame less of input lag (~16ms on a ~60Hz display). This behaviour is optional, of course, because the program will become more sensible to system jittering (and have less CPU time to "render ahead"), so the user must pass SDL_KMSDRM_DOUBLE_BUFFER=1 before the program name or set it as an env variable. The idea was taken from how RetroArch does it, and why. Thanks Manuel Alfayate