(RPi4) Questions about latency and shaders/overlays

Hi, I have a couple of questions about latency and shaders on Raspberry Pi 4 with Vulkan video driver:

  1. does shaders and overlays increase latency?
  2. apart from the graphic differences, which one is more efficient (less demanding) between “crt-pi” and a simple single-step “integer-scaling-scanlines”?
  3. in terms of latency, which should be better between [VSYNC ON, MAX SWAPCHAIN IMAGES 3, FRAME DELAY 1] and [VSYNC OFF, MAX SWAPCHAIN 2]? (of course with Vulkan and Threaded Video OFF)

Thank you so much!

1 Like
  1. not usually, but it can happen sometimes (possibly GPU/driver-dependent?) YMMV

  2. probably the simple scanlines. It’s easy to test: just take a fast core (like gambatte), load a shader and hit spacebar to fast-forward. Whichever one gets higher FPS is more efficient/faster.

  3. vsync off will always have lowest latency, AFAIK, and with it OFF, max swapchain is irrelevant.

1 Like

Thank you so much! Another question: are Lakka cores build each with platforms optimizations? I’m running the default FB Neo core of Lakka 3.4, it is worth to recompile lr-fbneo with the “rpi4” target platform? Thanks!

I believe the lakka builds for each platform are built with the closest target, yeah, so it shouldn’t help in this case (i.e., rpi4) and the differences would be minor in any case.

OK thank you :wink: BTW if I turn VSYNC off I will not able to use the Frame Delay option, right? So I suppose VSYNC OFF, THREADED VIDEO OFF and early/late polling are the best settings on RPi4 for latency (excluding Runahead)?

Vsync OFF is the least latent. All of that other stuff (hard gpu sync, frame delay, max swapchain images, etc.) exists only to minimize the latency that vsync adds when it’s ON. That is, they don’t have any effect with vsync OFF for better or for worse (well, I guess frame delay might increase your latency by X ms with vsync OFF…?)

1 Like

Clear! Thank you so much!


Last night I noticed that with VSYNC OFF and MAX SWAPCHAIN ​​2 some titles were running much slower than usual on FB Neo. After several attempts, I discovered that the “problem” was MAX SWAPCHAIN ​​IMAGES: once set to 3 (while keeping VSYNC OFF!) everything was fine again. But what exactly does this option and why is it also relevant with VSYNC OFF? I have not yet been able to find precise information about it.


EDIT: This page seems to clarify the max swapchain images option