English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 16 March 2016, 15:51   #1
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 37
Posts: 3,248
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.
demolition is offline  
AdSense AdSense  
Old 16 March 2016, 16:59   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,559
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
Toni Wilen is online now  
Old 27 March 2016, 14:11   #3
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 37
Posts: 3,248
Quote:
Originally Posted by Toni Wilen View Post
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 tried it out, and while the monitor stays in G-Sync mode while WinUAE is in full screen, it remains at the refresh rate of the output screen mode, e.g. 100 or 120 Hz. I would expect it to go to 50 Hz with Vsync off. There is no change whether I choose Vsync on or off. So effectively G-Sync is not working. Any ideas as to what else I could try?

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.
demolition is offline  
Old 27 March 2016, 22:27   #4
andy
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.
andy is offline  
Old 27 March 2016, 23:10   #5
Locutus
Registered User

 
Join Date: Jul 2014
Location: Finland
Posts: 714
How much lower then say 40Hz worstcase would you need to go?
Locutus is offline  
Old 28 March 2016, 01:47   #6
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 37
Posts: 3,248
Quote:
Originally Posted by andy View Post
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.
The range is 30-max, so in normal mode that is 30-144 Hz. With overclocking enabled (which uses more power) it is 30-165.

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.
demolition is offline  
Old 28 March 2016, 12:03   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,559
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.
Toni Wilen is online now  
Old 28 March 2016, 12:19   #8
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 37
Posts: 3,248
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.
demolition is offline  
Old 28 March 2016, 12:43   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,559
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.
Attached Files
File Type: zip visionmegademo4.zip (273.8 KB, 78 views)
Toni Wilen is online now  
Old 28 March 2016, 12:46   #10
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 37
Posts: 3,248
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.
demolition is offline  
Old 28 March 2016, 23:59   #11
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 37
Posts: 3,248
Quote:
Originally Posted by Toni Wilen View Post
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.
Using your save state on a plain A500 config, it seems that G-Sync now works.
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.
demolition is offline  
Old 29 March 2016, 12:45   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,559
Quote:
Originally Posted by demolition View Post
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?
Only because it would look horrible without vsync (or gsync).

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:
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.
Which filter? Some of them require very high pixel shader execution speed. (tens, maybe even hundreds of shader operations per pixel, 50 times a second! EDIT: 100 times a second with your config.)
Toni Wilen is online now  
Old 29 March 2016, 16:27   #13
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 37
Posts: 3,248
Quote:
Originally Posted by Toni Wilen View Post
Only because it would look horrible without vsync (or gsync).

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

Which filter? Some of them require very high pixel shader execution speed. (tens, maybe even hundreds of shader operations per pixel, 50 times a second! EDIT: 100 times a second with your config.)
I am not at my PC right now, but from memory, one filter was called CRT, the other was CRT Bright. Perhaps it could also be related to me running in the full 2560x1440 resolution and does 4x mean quadruple supersampling i.e. 4x internal resolution? Because that would be a massive amount of pixels..

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.
demolition is offline  
Old 29 March 2016, 20:19   #14
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,559
Quote:
Originally Posted by demolition View Post
I am not at my PC right now, but from memory, one filter was called CRT, the other was CRT Bright. Perhaps it could also be related to me running in the full 2560x1440 resolution and does 4x mean quadruple supersampling i.e. 4x internal resolution? Because that would be a massive amount of pixels..
Yes, 4x value (1x-4x selector on left side of "reset to default" button) means internally rendered resolution would be 10240x5760. It is getting a bit extreme

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.
Perhaps something to test will be available later this week..
Toni Wilen is online now  
Old 01 April 2016, 15:58   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,559
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.)
Toni Wilen is online now  
Old 03 April 2016, 22:43   #16
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 37
Posts: 3,248
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.
demolition is offline  
Old 04 April 2016, 08:45   #17
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,559
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.
Toni Wilen is online now  
Old 10 April 2016, 09:07   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,559
3300b10 has different adaptive sync black frame insertion timing mode. Any differences?
Toni Wilen is online now  
Old 11 April 2016, 22:34   #19
demolition
Unregistered User
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 37
Posts: 3,248
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.
demolition is offline  
Old 18 April 2016, 22:31   #20
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,481
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.
mark_k is offline  
AdSense AdSense  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:50.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.37589 seconds with 12 queries