16 March 2016, 15:51 | #1 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
G-sync / Freesync support (adaptive sync)
Since I got a G-Sync capable monitor recently, it would be very nice if WinUAE could support adaptive sync for perfect smooth motion. It seems that it works out of the box with most 3D games, even if they were not coded with adaptive sync in mind, so perhaps this would not be a big change to include? Perhaps this is a Direct3D feature? I could not find any information that this is possible using the current WinUAE.
From an emulation point of view and for video/audio syncronization, it seems to me that it would also be more optimal if the emulator could decide the exact output time of video frames instead of having to employ internal vsync algorithms with double or triple buffers to accommodate a fixed video clock. My monitor can sync between 35-144 Hz (even 160 Hz if I enable overclocking) so it should work with PAL/NTSC 50/60 Hz or 100/120 using software black frame insertion for a more CRT like feel. |
16 March 2016, 16:59 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Technically it should already work as long as vsync is _not_ enabled. (may need double or triple buffer enabled) but some gsync/freesync option probably will be required to get lowest possible latency.
I am not going to replace my 3-monitor 100Hz lightboost setup until 3240x1920 or full 4k gsync/freesync 100Hz+ monitor is available |
27 March 2016, 14:11 | #3 | |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
Quote:
I ended up getting this PG279Q monitor since I couldn't wait for those 4k IPS 100+Hz G-Sync models to come out. It's a quite nice monitor though. |
|
27 March 2016, 22:27 | #4 |
Back.
Join Date: May 2002
Location: UK
Posts: 121
|
How low does the G-Sync refresh go with that monitor? Between reviews and the spec sheet, I haven't been able to find out.
Can the Max Refresh Rate option in the OSD help you? Everything I've seen only highlights the 165Hz maximum, but I'm wondering if it can be reduced. |
27 March 2016, 23:10 | #5 |
Registered User
Join Date: Jul 2014
Location: Finland
Posts: 1,176
|
How much lower then say 40Hz worstcase would you need to go?
|
28 March 2016, 01:47 | #6 | |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
Quote:
In WinUAE, I set the resolution to 2560x1440@120Hz so that should provide a range of 30-120 Hz when in G-Sync mode. The power LED is red when it is running in G-Sync mode and it stays red with WinUAE, however it is constantly receiving 120Hz where I would expect it to drop to 50 Hz in PAL emulation. |
|
28 March 2016, 12:03 | #7 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Did you set Display panel buffering mode to double buffer? (D3DPRESENT_INTERVAL_IMMEDIATE D3D present mode which G-Sync apparently needs)
Direct3D needs to enabled. |
28 March 2016, 12:19 | #8 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
Is D3D not used by default? I started out with a default A500 config and tried with no buffer, double buffer and triple buffer and all vsync modes with no difference.
|
28 March 2016, 12:43 | #9 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Check DD/D3D selection after emulation has been started. (There is D3D to DD fallback if not all required DX9 files are not installed)
Also, select refresh rate below 80Hz to prevent any frame duplication modes being activated. Use attached statefile to test smooth scrolling (A500 with cycle exact needed or top part of scroller start flickering). Huge horizontal scroller will show any possible missed or doubled frames very easily. |
28 March 2016, 12:46 | #10 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
Thanks, I'll try it out when I get back home tonight. I did try switching to DD manually and since it looks a lot worse (bad scaling), I am quite sure it was running in D3D mode. I could also apply D3D CRT post filters which does not work with DD.
|
28 March 2016, 23:59 | #11 | |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
Quote:
I need to fiddle some more with the details, but generally it syncs to 50 Hz, even if I select a 120 Hz screen mode, so there is no frame doubling going on. It stays locked on 50 Hz in any buffering mode, even with no buffering. If I turn on black frame insertion and use a vsync mode to enable it, the monitor now syncs to 100 Hz as it should and the scroller looks even clearer, so black frame insertion + G-Sync equals even more niceness. Now I just need to be able to enable black frame insertion without having to enable vsync, but this is not possible for some reason? I also tried using the CRT shader filter as well to get a better CRT like quality, but it seems like my PC cannot handle it. It can do ok on 1x, but higher than that and after a little while it starts to go down to maybe 98 Hz and the sound starts stuttering. The scroller always stays smooth, probably due to G-Sync. What is the main culprit here? I have an i7-6700K CPU with a GTX760 graphics card, so the hardware should be decent. |
|
29 March 2016, 12:45 | #12 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
I'll try to add gsync/freesync vsync option (in vsync selection GUI) that is optimized for gsync/freesync hardware. (It has really different requirements) But only if you will volunteer to test it very much Quote:
|
||
29 March 2016, 16:27 | #13 | |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
Quote:
I will do what I can to test your gsync option as much as possible. It is something that would be very useful for me and others with adaptive sync monitor. |
|
29 March 2016, 20:19 | #14 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
Quote:
|
||
01 April 2016, 15:58 | #15 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
http://www.winuae.net/files/b/winuae.7z
Adaptive sync vsync option added. It does not do much yet but it allows black frame insertion using very simple method which may or may not have stable timing... (If anyone uses it without adaptive sync hardware and report anything here: It is bad idea.) |
03 April 2016, 22:43 | #16 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
The question from me here is what kind of tests do you want and what kind of feedback do you need? Logs, configs etc.
I tried the new adaptive sync option with black frame insertion and while it works somehow, it is not working well enough. I set the output mode to 120 Hz so it can reduce the output to 100 Hz. The counter on my monitor shows that it is not perfectly stable at 100 Hz but flickers between 100 and 101 Hz (maybe 95% @ 100Hz). This goes in hand with what I see which is extra frames, mostly black frames, so if I look at the picture in the lower left corner in your save state, it flickers occasionally and becomes darker every 0.5-1 sec, indicating that there must be two successive black frames. Rarely (<5%) it also flickers light, perhaps if it skipped a black frame. No/double/triple buffers does not seem to make a difference here. I can get a better overall result using the normal vsync 50/60 Hz option and setting the output mode to 100 Hz. Here it seems quite stable with 50/50 black frame insertion. |
04 April 2016, 08:45 | #17 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
I didn't expect much, simplest possible method rarely works.. Next test coming later...
Short description is fine, logs won't help much with these kind of timing critical features. |
10 April 2016, 09:07 | #18 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
3300b10 has different adaptive sync black frame insertion timing mode. Any differences?
|
11 April 2016, 22:34 | #19 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
It looks pretty much as I remember it did in the previous version (I overwrote it by accident and cannot find it again to retry it).
However, WinUAE seems to invoke some bug in my monitor or graphic driver as lower frame rates of G-Sync causes the monitor to flicker after having started WinUAE. I noticed it when testing WinUAE previously and thought it was black frame insertion flicker I was seeing, but I see the same flicker after I quit WinUAE and launch a game with G-Sync where the frame rate drops to some level. I need to reboot the machine to get G-Sync working properly again. After running WinUAE, the flicker is back though. I have no idea how WinUAE is doing it, but it is messing up G-Sync somehow and putting it in some bad state. Turning the monitor off and back on to reenable G-Sync does not help. I imagine it must be a driver bug. Until this issue has been resolved, I probably cannot do any valid tests of this. |
18 April 2016, 22:31 | #20 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,335
|
Just wondering, would adaptive sync allow non-uniform black frame insertion? By that I mean this...
Normal black frame insertion has Amiga 1/100th sec, black 1/100 sec, Amiga 1/100 sec, black 1/100 sec etc. etc. Would it be possible to have, say, each Amiga frame displayed for 1/75 sec, each black frame for 1/150 sec? That could allow increased image brightness. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
More flexible Vsync support to include Sync rates very close to 50hz | jimmy2x2x | request.UAE Wishlist | 8 | 29 March 2011 20:45 |
Lo-Res sync problm | XimeR | support.Other | 5 | 11 September 2010 23:19 |
A4000 video sync? | T-o | support.Hardware | 3 | 19 November 2008 22:17 |
Time sync | mr_0rga5m | project.EAB | 2 | 24 April 2004 10:23 |
V-sync Problem | bigly | support.WinUAE | 6 | 12 September 2002 17:17 |
|
|