-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Comments
[d3d9] Added functionality to empty WaitForVBlank function.#2925
[d3d9] Added functionality to empty WaitForVBlank function.#2925kdobrowo wants to merge 1 commit intodoitsujin:masterfrom
Conversation
|
This code change fixes WaitForVbl WHQL test (d3d9). |
|
I imagine it is due to the test being broken that it fixes the test? It is not possible for us to implement this properly without present timing maybe (or doing something hacky with present wait). |
|
The test:
This is why SyncFrameLatency was added there. Isn't it good enough solution? |
|
No for two reasons:
|
|
If the docs are anything to go by, this function doesn't really interact with presents anyway, so even present_wait wouldn't really help. We can't really implement this correctly. The main problem with this particular implementation is that we'll return immediately if
I think there's a way to come somewhat close to expected behaviour if we store a CPU-side timer somewhere and do something like this (pseudocode): auto now = dxvk::high_resolution_clock::now();
auto refreshPeriod = getDisplayRefreshPeriod(); auto vblankCount = (now - m_startTime) / refreshPeriod; auto target = m_startTime + (vblankCount + 1) * refreshPeriod; sleep_until(target); This is going to need some preliminary work though, and may behave weirdly in VRR scenarios. |