Hi Oomek,
Thanks a lot for testing.
Freesync Off, 60Hz, -noka -noflt -notb -waitvsync -unevenstretch -throttle -syncrefresh -fd 0 shinobi
groovymame64_0211.017n
84.66 ms
groovymame64_0211.017n_d3d9ex_bgfx-mod
67.79 ms
groovymame64_0211.017n_bgfx-dwmflush.7z
51.35 ms
So it looks like with standard vsync, BGFX is still 1 frame behind D3DEx (both without fd). Eventhough this build shaves off 2 frames for BGFX which is remarkable, so I'll add this patch to GroovyMAME 212.
I can't replicate your results with enhanced vsync. If I enable it in AMD's control panel, them GM (last test build) runs at full speed with -syncrefresh -waitvsync. If I enable fd, then I can lower the speed as I increase the value of fd, but I can't leave it at 100%.
I'm testing this on my Vega 56, and CRT Emudriver based on Adrenaline 18.5. Maybe I'll try using a more current driver.
With regards to Freesync on CRTs, I've been testing the idea I had with another custom build, and although the concept kind of works, I'm afraid it won't be usable because the image is inherently unstable with this method. Now I can get a picture that doesn't jump too much, but you can still see a small "vibration" of the whole picture up and down one or two lines, it's like looking at an old TV that's about to break.
The idea was simple, passing a scanline number as an option to force GM sync on it. Desktop is set to 63 Hz, which barely corresponds to 250 scanlines. If you pass a higher number, say 262, the refresh will drop dynamically to 60 Hz, the higher the scanline number, the lower the refresh. Obviously in the final design GM would make this calculation for you.
This is what actually happens behind the scenes when you throttle using the cpu clock, although this method is much more exact. However, it's not exact enough to avoid all the instability.
Besides, with this method you modify the number of lines instead of the pixelclock, so the refresh rate granularity is terrible (similar problem to achieving dynamic refresh on the Pi).
To sum up, it's a very interesting experiment to understand how Freesync works, but I don't think it won't be usable on CRTs.