I can go above full speed with DX9\11 HW\SW and OGL SW when vsync is enabled but I can't with OGL HW mode(which is I think the fastest mode on any game I tried)
I'm using PCSX2 1.3.1-20150903224941 and I can't try the latest beta(something is wrong with the buildbot page)
Isn't that how v-sync is supposed to work?
On Tue, Sep 22, 2015 at 9:36 AM, vsub [email protected] wrote:
I can go above full speed with DX9\11 HW\SW and OGL SW when vsync is
enabled but I can't with OGL HW mode(which is I think the fastest I think
on any game I tried)I'm using PCSX2 1.3.1-20150903224941 and I can't try the latest
beta(something is wrong with the buildbot page)—
Reply to this email directly or view it on GitHub
https://github.com/PCSX2/pcsx2/issues/842.
No...at least no on emulators.
On pc games even you you have higher fps,the game will not run faster,it will just run smoother(like those 60fps patches)
So are there other emulators which have OpenGL output and when you enable vsync - they can still run faster than 60fps?
Oh yeah, I got confused. That's definitely not supposed to happen.
On Tue, Sep 22, 2015 at 4:52 PM, vsub [email protected] wrote:
No...at least no on emulators.
On pc games even you you have higher fps,the game will not run faster,it
will just run smoother(like those 60fps patches)—
Reply to this email directly or view it on GitHub
https://github.com/PCSX2/pcsx2/issues/842#issuecomment-142331084.
@avih yes,PPSSPP and Dolphin for example.
Only pcsx2 in OGL HW mode is limiting the speed in OpenGL mode
Well, technically it's impossible to sync all frames to vsync AND render more frames per second than your monitor refresh rate, simply because there are only so many vsyncs per second.
So if they do that, then some tricks must be deployed, such as not rendering all frames or not syncing all frames to vsync or disabling vsync completely.
Otherwise, if you both enable vsync and want to render more frames per second than your monitor refresh rate... how would you do that?
PPSSPP is disabling it when I switch to some mode that allows more speed than full speed
But there is something strange...the screen tearing problem doesn't exist on any mode other than OGL HW even with vsync disabled from the pcsx2 settings...it's like it's always enabled and I also don't see screen tearing on those modes at above full speed.
OK, so can we summarize that other emulators simply disable vsync when playing at high speeds? This is a valid feature request, but the fact is that unlimitaed framerate and proper vsync are mutually exclusive - you just can't have both.
As for the "strange" thing you're noticing, this is because the DX rendering goes through the Windows compositor ("Aero") which is always vsynced and knows to drop frames when they arrive at higher-than-vsync rate.
This would happen with OpenGL as well if you don't use full screen (i.e. no tearing and high framerate), but at full screen the OpenGL driver may (or may not) play tricks on Windows and use exclusive full screen (doesn't go through the compositor, can tear if no vsync) despite the app not requesting it, thus may end up with tearing.
I've posted some more details on this subject on another issue, but I can't find it right now.
This happens IF you have forced Vsync in NVCP if it set to 3d application controlled it dont happen. and this only applys with opengl it dont happen with dx far as i know.
I noticed this while back, there is no point in forcing vsync that way or threw PCSX2 Vsync is already applyed to windowed programs, only time required to do so is if you disable desktop composition, which i dont think really possible in win8 or higher with out going threw hoops
In my NVCP,the vsync is application controlled.
If vsync is not enabled in pcsx2,I get screen tearing in fullscreen but without vsync enabled in pcsx2,I can get above full speed on any renderer mode and I can't if vsync is enabled and I use OGL
If vsync is not enabled and I'm in window mode,I won't get screen tearing in any mode and also get above full speed
If I apply some styles to the window with autohotkey(borderless and resized to the desktop resolution)to make it look like when it is in full speed,then I also don't get screen tearing but I do with the pcsx2 full screen mode(I guess it applies more styles to the window that what I do with autohotkey)
unless there is something that changed in the last 3 weeks in pcsx2 there is NO EXCLUSIVE FULLSCREEN PCSX2 only does Windowed/Windowed Fullscreen in DX/Opengl. So unless you using Win7 and disabled Desktop composition or did similarly in win 8 and higher which alot more complicated. I dont see how you have tearing. PCSX2 built in vsync on my end on since win7 for the reason of its already on. less you have bugged nvidia drivers? 358.50 dont seem to have this tearing
For Exclusive Fullscreen it would need to be one but pcsx2 dont use exclusive fullscreen.
And like said this happens when VSYNC is forced which what you doing by have it forced is pcsx2, it dont happen in DX mode cause in dx mode Vsync is and should already be on from desktop aero, which DONT apply the HZ limit it just apply the no tearing effect. so apply vsync in pcsx2 should have no effect cause it technically its on, though i not sure about that part, the windowed vsync works different in opengl and forcing it on is apply vysnc how it should be which means the HZ limit is in effect
Does the tearing happen if PCSX2 vsync is not used and you dont use autohotkey and or what ever your using to remove the boarders?
IF you in win 7 and higher and using windows aero vsync is already applied to ALL windowed applications. just not the HZ limit. short of you disabling windows aero/desktop composition and disabling that in win8+ is not as simiple as it is in win7. there should be no tearing proving drivers are working right, and i know like 4 drivers back there was bug the cause tearing in windowed application even with aero on at random, which as been since fixed.
I didn't tried the latest beta but this is the result(I', on Win7 with aero enabled)
GTX750TI:
OGL HW\SW - screen tearing in full screen mode only if vsync from pcsx2 is not enabled(I force vsync in the nvcp by using per game settings and pcsx2 is using the global default setting with vsync set to application controlled)
If vsync is enabled,I don't get screen tearing but the speed is limited to 60fps
DX9\11 HW\SW - no screen tearing(or maybe barely visible,I'm not sure)in full screen with and without vsync enabled and the speed is not limited if vsync is enabled
HD4600:
OGL HW\SW - as soon as I load my KH2FM save at the end of the game,2 seconds after Sora appear,pcsx2 always crash no matter what settings I use
DX9\11 HW\SW - works fine and it's the same as with the nvidia card
yah i not seeing this tearing in Win 10 Vysnc is OFF in pcsx2 and application controlled in NVCP,
In either DX or OPENGL. There is no tearing in DX 11 in Win 7 cause Windows aero is applied which apply the no tearing part of vsync but not the hz limit.
OpenGL forcing vsync FORCE the HZ limit cause it works diffrently then DX 11.
@vsub Just to check, is this issue still present? Just in case it's related to the tearing issue that was just fixed.
Yes,if vsync is enabled,the speed is still limited to the screen refresh rate only while using OGL HW.
The thing is,with your latest change,vsync is not needed anymore but only if you are using win7 with aero enabled(I don't know about Vista)or if you are using win8/10(I think the aero type vsync is forced there so you can go above the screen refresh rate)
win7 ~10 all use the same aero it, it eliminates tear but it dont limit to hz of monitor, this is why many people that dont use vsync say they "dont" have tearing and vysnc is off atlest in games/programs that using windowed (fullscreen) borderless. and that is cause vsync is on from aero it just dont limit to hz like traditional vsync. so those people think they dont have vsync on.
Win7 is easy to disable aero in win8 and up they made alot harder to disable. as for the ogl hw with vsync enabled in pcsx2 that is cause your forcing traditional vsync which adheres to the hz of monitor. and i think ogl vsync works slightly diffrent from dx vsync cause last checked forcing vsync in dx11 dont limit it to hz limit on pcsx2, then again been whille since i really used dx11
Related to #1075?
Not related(tested the latest beta and I still can't go above full speed(60fps)if vsync is enabled)
Turbo also don't work because vsync is forcing 60fps max.
Might have figured out the cause - the swap interval function does not seem to like being called on the main (GUI) thread. If it's only called on the rendering (GS) thread, vsync seems to disable properly.
This seems to apply on both Windows and Linux (I'm using the NVIDIA proprietary driver in both cases).
I wonder if this might have something with me, not getting v-sync at all with my AMD card (on #2000)
And/or if this means driver is ALREADY automatically enforcing swapinterval to 0 when not in exclusive fullscreen.
Interesting, where is called swap interval on the main thread ? I don't remember if GLX is global or TLS but it is likely a bad idea to do those operations on the GUI thread.
I guess you mean the call from the hotkey. On Mesa driver it seems to be a nop. A quick look at the code and it seems to be TLS based.
Edit: I guess we should set the vsync parameter before the actual vsync
https://github.com/PCSX2/pcsx2/blob/master/pcsx2/MTGS.cpp#L453
Yes, from the hotkey.
I guess we should set the vsync parameter before the actual vsync
No idea where is best. In my quick tests I basically moved the call into Flip and added some atomic variables (but yeah, I was only testing whether my idea was correct).
I wonder if this might have something with me, not getting v-sync at all with my AMD card
Dunno. The swap interval function is initially only called on the MTGS thread. If you don't press the hotkeys then I think it won't be called on any other thread.
Yes you could do that. Maybe my commits that refactor vsync could help. Good job.
Most helpful comment
Might have figured out the cause - the swap interval function does not seem to like being called on the main (GUI) thread. If it's only called on the rendering (GS) thread, vsync seems to disable properly.
This seems to apply on both Windows and Linux (I'm using the NVIDIA proprietary driver in both cases).