My game 'Forts' has a serious problem with AMD video cards when the monitor has FreeSync enabled and VSync is on, even if FreeSync is not enabled in Radeon Settings.
At first frame rates are normal at 90 fps, but if there's a delay and frames are missed, the driver goes into a state where it's waiting excessively. It drops the frame rate down to 13 fps, which is unplayable. Sometimes it recovers, but usually not. Sometimes it alternates resulting in about 23 fps.
I've put some basic profiling in, and in the following case I have gone to the options screen. There is a 587ms gap in display frames, and after that SwapBuffers is taking about 80ms. The UI scene is not complex, just some plain textured quads including text, and in any other circumstance it renders with no performance issues.
Last swap 1.1, SwapBuffers 10.1
Last swap 1.0, SwapBuffers 10.1
Last swap 1.0, SwapBuffers 10.1
Last swap 1.0, SwapBuffers 10.1
MainMenu: Options
Last swap 587.1, SwapBuffers 9.0
Last swap 1.5, SwapBuffers 85.1
Last swap 1.4, SwapBuffers 82.7
Last swap 1.4, SwapBuffers 80.3
Last swap 1.4, SwapBuffers 78.1
I have tried to create a minimal sample exhibiting the problem, but it recovers quickly after the delay to full frame rate. I'm happy to supply Steam keys for AMD engineers to reproduce the problem, or experiment with the code on my end. Any assistance debugging this would be greatly appreciated.
My test setup is:
AMD Ryzen 5 2600 with Wraith Stealth 6-core CPU at stock speed
Radeon RX 580 ARMOR MK2 8G OC at stock speed
8GB 3000MHz DDR4 (dual channel)
MSI B450M Mortar Titanium motherboard (unsure which bios version)
ASUS MG279Q QHD 144Hz FreeSync 27in IPS Gaming Monitor
Windows 10 Pro 64-bit
Render loop is basically:
// Windows message pump
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// setup camera and draw scene (fixed pipeline)
glFlush();
SwapBuffers(hdc);
Hi tim.auld, would you please share your minimal source code and/or binary to help us investigate this issue efficiently?
I've sent you a couple of Steam keys by PM. As mentioned my minimal sample is so far not reproducing the problem.
Hi dorisyan just wondering if you received the Steam keys and were able to reproduce the problem? If necessary I can strip down the game to produce a minimal sample.
Thanks for that, and I will give you feedback soon.
Hi, tim.auld, it would be better if you could provide a minimal sample to reproduce this problem. Thanks very much!
OK, it will take some time.