Shaders, triple-buffering & performance :-)

Hi everyone !

I’m sorry for mentioning this issue in several thread. I realized I kinda always made the same off-topic instead of writing a proper topic. I apologize.

To sum it up : I’m really happy with the result I now get on my Lakka box (nuc i5, iris 440, xbr level 2 fast scale 3x + lottes shaders combination). It never looked so amazing. I don’t even need integer scale and it looks incredible on a big screen.

I have a dilemma though. I am allergic to input lag :wink: And, it must be partly psychological, I have the feeling that when using a swapchain of 3 (triple buffer), there is a slight delay (of course there is always a slight delay but I really want to reduce it as much as possible). However when using a swapchain of 2, many games that were running absolutely perfectly completely crawl (as if half of the frames were missed). It’s due to the shaders combination used. I work around it either by selecting a less-good xbr (level 1 no blend), or a smaller scale value. But it’s such a dilemma as it looks stellar with the settings above.

Is there anything I could do about it ? As it’s 100% smooth in all FBA titles with triple buffer, which means I have enough power to render 60 frames per second and apply those shaders as well, why can’t I achieve 100% speed with double buffer ? With some games it’s perfect, with other it completely crawls. Is there some mysterious tweak I could make ? I checked my CPU governor flag : it’s in performance mode. I tried all combinations of video or audio related settings too. It’s soooo close to being absolutely perfect :wink:

Thanks for reading this annoying spoilt-kid blabbering :wink:

There’s not much to be done about it, unfortunately. You can either get a stronger GPU or use less intensive shaders.

Have you tried lottes-multipass? It’s much faster than the single-pass version.

Okay, I’ll try. What are multipass shaders ? Are there more “parallelized” to some extent ?

Edit : actually, lottes-multipass doesn’t exist in glsl format (only 1 pass is included) I tried to convert it manually with retroarch-cg2glsl but I encounter errors.

“1 shaders converted successfully. 10 shaders failed.”

For instance, when converting crt-lottes-multipass.glsl I get : "CGC: <stdin>(158) : error C1008: undefined variable “PASSPREV1” Other conversions attempts also give some other undefined variables errors.

EDIT : by the way, on another thread, you suggested to try some other crt shaders. I noticed that when combining xbr and crt-geom and strange phenomenon occurs : display is unstable, like an Amiga interlaced display on an old TV.

I’m very surprised ; I added a RAM module into my NUC (2 instead of 1, the very same ones), and now I have no more speed problem anymore, even with double buffering and the combined shaders specified above. I know the “dual channel” mode supposedly increases memory bandwidth but I never measured and didn’t know it would have an impact in this specific case (GPU a little too slow). I could even reduce my audio latency at the same time ! [Edit : no that sure about audio latency, though ;)]

I’m still very interested in a conversion of the xbr2-multipass and crt-lottes-multipass shaders to glsl, as multipass versions did not get converted properly and a speed boost would probably be useful in limit-cases :slight_smile:

Thanks a lot !!

edit : hehe, strangely, I do have occasional frames drops in Genesis and NES games but none in FBA :slight_smile: