I got a brand new rig the other night, and I was testing various MAME configurations. I enabled bgfx with the crt-geom-deluxe shader, and I typically display cropped artwork. I started playing some Pac-Man, and I noticed that the sound would hitch every once in a while, so I hit F11 to see the framerate. Sure enough, it hovered consistently at 99%. The same was true for Donkey Kong. Q*Bert was worse, dipping between 97% and 98%. Oddly enough, games like Vs. Super Mario Bros., and many NeoGeo titles had no problem staying at 100%. I started to think it was a horizontal vs. vertical thing, but I tried Gradius II, and it too hovered around 99%.
I tried a bunch of combinations to combat this, including turning all artwork off, but nothing really fixed the problem. Switching to d3d or opengl causes the problem to go away completely. In these modes, I can overclock Pac-Man to over 6000%. I know bgfx requires more horsepower, but don't really understand why it struggles like this. CPU is a Core i7-9700K and I know the graphics card doesn't really matter, but I'm using an nVidia RTX 2070, outputting to a 1080p HDTV via an HDMI cable, so the resolution is just the native 1920 x 1080.
Can anyone shed any light on this? I've got VSync turned on, I needed it because the screen tearing was so bad on a few titles. But I doubt that's the issue here. Thanks.