Closed Sarisan closed 3 months ago
Those values should be equal to refreshRate variable
How are you even claiming this? What's your methodology here? What evidence do you have that that's correct?
Those values should be equal to refreshRate variable
How are you even claiming this? What's your methodology here? What evidence do you have that that's correct?
In the other games where VSync option is separated from refresh rate I noticed that setting it to match my display's refresh rate value fixes high output latency, while setting it to higher values makes latency get worse and worse step by step. Later then I wanted to check it out what refresh rate is set with VSync in osu!lazer and found those 2 lines in the code. I changed both of the values to match my display refresh rate and built it from source to test changes. The result was as expected, the game was finally playable with VSync turned on.
I probably wouldn't open the issue if triple buffered VSync wasn't forced on my GPU, but it is. And as now I see that this VSync implementation in osu!lazer is obviously incorrect.
Changing that variable is not the correct fix. It sounds like this is related to GPU queueing, and potentially a configuration issue.
That said, nothing can be actioned on without some missing items:
VSync should have higher latency. If it doesn't it's not working correctly. The code you cite is a correct implementation of vsync. It is up to the GPU driver to handle vsync flipping.
I'll tentatively close this issue since we don't use discussions on osu-framework repository, but feel free to continue to follow up here.
Nah let's keep this open. This is not true vsync - it's a pseudo-vsync enabled by triple buffering. Please read my comment.
Changing that variable is not the correct fix. It sounds like this is related to GPU queueing, and potentially a configuration issue.
That said, nothing can be actioned on without some missing items:
- Logs (options -> export logs).
- A video of the game running with the graphs by pressing Ctrl+F11 twice.
GitHub won't let me upload video larger than 10 MiB, so I uploaded them to my GDrive
Cool, you already did the next step I was going to ask - it like OpenGL is working as expected for you, though it's using true vsync and you should expect higher latency as a result.
It looks like it's probably a configuration issue our side but I don't think we're going to fix this until swapping out the graphics abstraction (veldrid) with something better.
I'm currently looking into SDL_gpu which afaik supports mailbox/fast-sync/this thing.
I suggest using OGL in any case. Will close for now.
OpenGL is working as expected for you
With the "fix" it is, without it it's unplayable
Yes, well, that is how VSync is supposed to work - it's supposed to be unplayable. If you don't want latency, then don't use VSync.
There's more that can and will be done on this in the future, but your fix is not the way.
it's supposed to be unplayable
It was totally playable on other Intel GPUs I tested where triple buffered VSync wasn't forced, HD Graphics 3000/400/500/505
@Sarisan can you try setting the refresh rate in the game 1 hz underneath your monitor refresh rate and run the same tests (with the same videos)? Curious to see how this looks for you.
@Sarisan can you try setting the refresh rate in the game 1 hz underneath your monitor refresh rate and run the same tests (with the same videos)? Curious to see how this looks for you.
If you mean
drawLimiter = refreshRate - 1;
updateLimiter = refreshRate - 1;
Then it's the exact result as without - 1
.
This affects Intel Iris Xe Graphics
Those values should be equal to
refreshRate
variable https://github.com/ppy/osu-framework/blob/7bb0e9e9ad285ffb0fa67db458fb43c81a17656f/osu.Framework/Platform/GameHost.cs#L1345-L1346