-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Greg/vsync #1950
Greg/vsync #1950
Conversation
Seriously, it's just about nvidia driver giving us problems.
|
illegal else without matching if D:\torrent\pcsx2\plugins\GSdx\GSWndWGL.cpp 332 void GSWndWGL::SetVSync(int vsync) |
a428dd2
to
f465e9e
Compare
Tested on Windows 10 with Nvidia GPU. Full screen and GDSX in OpenGL. Nvidia vsync setting handle by pcsx2. Disabled: No tearing but frame pacing. Btw, both adaptive and Windows compositor increase input lag |
Isn't that the same of what was reportedly perfect?
Mhhh, so my paranoia in #1941 wasn't totally tinfoil 😝 EDIT: btw, how do you measure input lag? Just guesswork? |
Game like GT4 with input lag will be easily noticeable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested the code yet, just some minor reviews based on a brief look at the code.
default: return 0; | ||
} | ||
|
||
return 0; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
m_check_DclickFullscreen = new pxCheckBox( this, _("Double-click toggles fullscreen mode") ); | ||
m_check_AspectRatioSwitch = new pxCheckBox(this, _("Switch to 4:3 aspect ratio when an FMV plays")); | ||
//m_check_ExclusiveFS = new pxCheckBox( this, _("Use exclusive fullscreen mode (if available)") ); | ||
|
||
m_text_Zoom->SetToolTip( pxEt( L"Zoom = 100: Fit the entire image to the window without any cropping.\nAbove/Below 100: Zoom In/Out\n0: Automatic-Zoom-In untill the black-bars are gone (Aspect ratio is kept, some of the image goes out of screen).\n NOTE: Some games draw their own black-bars, which will not be removed with '0'.\n\nKeyboard: CTRL + NUMPAD-PLUS: Zoom-In, CTRL + NUMPAD-MINUS: Zoom-Out, CTRL + NUMPAD-*: Toggle 100/0" | ||
) ); | ||
|
||
m_check_VsyncEnable->SetToolTip( pxEt( L"Vsync eliminates screen tearing but typically has a big performance hit. It usually only applies to fullscreen mode, and may not work with all GS plugins." | ||
m_combo_vsync->SetToolTip( pxEt( L"Vsync eliminates screen tearing but typically has a big performance hit. It usually only applies to fullscreen mode, and may not work with all GS plugins." |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
plugins/GSdx/GS.cpp
Outdated
@@ -967,7 +965,7 @@ EXPORT_C GSsetFrameSkip(int frameskip) | |||
|
|||
EXPORT_C GSsetVsync(int enabled) | |||
{ | |||
s_vsync = !!enabled; | |||
s_vsync = enabled; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
pcsx2/Pcsx2Config.cpp
Outdated
return 0; | ||
|
||
if (g_LimiterMode == Limit_Turbo) | ||
return 0; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/FrameForGS.cpp#L494 This function uses an extra parameter for flags. Technically it ought to be wx flags but I think MS flags will be forwarded. |
@tabnk |
For this build, whether EnableVsyncWindowFlag disabled or enabled cannot go full screen. |
@tabnk I fixed my code. Could you retry it thanks you. |
With EnableVsyncWindowFlag=enabled at PCSX2_ui.ini. Nvidia setting handle by pcsx2. vsync disabled: No tearing but frame pacing Edit by greg with previous result without EnableVsyncWindowFlag
|
Coooooould you test <381 drivers? |
Can't tested in driver 381 below. Already customise per game setting on Nvidia control panel so if install old driver than all my setting will deleted. |
@tabnk |
Actually I'm felt almost no different whether EnableVsyncWindowFlag is enabled or disabled. Depends on individual preference, both Adaptive and Windows Compositor are good. |
https://forums.geforce.com/default/topic/914268/export-import-nvidia-control-panel-settings-and-color-profiles/#4796732 |
Well I'm not sure the flag propagate well to the windows API. Need a windows dev to confirm it. |
Comparing to this pcsx2/3rdparty/wxwidgets3.0/src/msw/toplevel.cpp Line 1114 in d8e0b9f
In full screen mode and disable all vsync, earlier one got tearing but your no tearing. Maybe your doesn't propagate well. |
New version that should propagate the flag. |
On new version, screen tearing work on full screen. |
Does any of the v-sync options fix it then? |
With tearing enable on full screen. vsync disabled: Tearing and frame pacing |
So, I don't know exactly what to do. Here my current proposal
|
Drivers that don't support adaptive should just not have it presented/available, I guess. |
The thing is that you know about the support when you call the GL swap interval function. And the option is on the core side. Instead we could just fallback to vsync.
I propose that we merge the others parts. And then we try to find how to write stuff for DWM. |
Oh right. Then I guess whatever you said make sense.
Again, I don't think the problem is dwm, and that's also simply what's already used by glfw guys too. |
We have now 4 states * no * on * Compositor handle : DWM on windows/GL * Dynamic/adaptative : Could be nice tradeoff between perf and quality So far only the first 2 are implemented in the GS plugin Dynamic will use the value -1 as it is a direct mapping of the GL api. Compositor will use the flag 0x10000 Note: potentially the tooltip can be improved v2: use || instead of multiple if
So far the implementation is really basic but it is enough for testing
Note: I pushed a rebased version. So only the important bits remain. |
Can this be closed since there is a new improved PR ? |
Yes let's close it. |
To be discussed because OpenGL tearing/compositor/vsync is a nightmare.
Related to issue #1437