-
Notifications
You must be signed in to change notification settings - Fork 953
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
Frame Pacing Issues on Vulkan GTX 1650 #1882
Comments
Isn't this pretty much the submit time ≠ present time issue, which can be especially bad with triple buffering? KhronosGroup/Vulkan-Docs#1364 aims to solve this. Assuming you are running v-synced, a solution that works right now may be to moving average the ∂ts to suppress the jitter (although it may create some irregular timing if a frame actually takes long) |
There's something funkier than this going on I think. Something is causing the CPU to hang in various places longer than it should. I have attached a tracy trace of my program running on nvidia. Normally get_next_texture (i.e. acquire) will block until a new swapchain frame is ready (in this case, about 16ms [this is not my refresh rate, my gpu just happens to run at ~60fps for this scene]). Every so often, On AMD, this manifests the other way around. It manifests as an acquire being nearly instant, then the next one being taking double time (53ms -> 100ms). I've been trying to figure out what on earth is going on, but no luck so far. |
Is this relevant to this issue? |
These examples all use ControlFlow poll. I am currently basically not seeing the issue when I double submit, but I think it still pops up occasionally. |
I tested the porting of the code on wgpu 0.11: no possibility to reproduce it, but I have rather large values in the output, is this normal? #Output:
5.67 2.76 0.55 1010.81 1003.52 1005.96 1008.7 1008.18 1010.38 1011.15 999.11 1009.51 1008.01 1014.51 1011.29 1006.05 1013.02 1010.83 1011.01 1003.47 1011.26 1005.36 1011.37 1008.29 1007.46 1008.52 1007.04 1006.01 1005.31 1010.76 1014.48 1008.78 1008.42 1010.12 1011.21 1002.89 1003.39 1008.51 1008.34 1009.32 1010.12 1006.83 1009.24 1006.68 1013.72 1004.81 1009.32 1011.09 1012.06 1014.0 1007.54 1010.01 1010.32 1014.02 1014.1 1007.9 1008.12 1002.3 1005.79 1006.74 1005.97 1000.18 1000.55 1013.15 1009.0 1007.39 1001.02 1015.1 1007.28 1009.34 1011.68 1002.05 1009.2 1012.28 1009.16 1010.9 1009.89 1012.29 1011.87 1008.08 1013.45 |
Forgive me, in porting the test from version 10 to version 11 I forgot to add the present () call after the commit *headpalm*, now the values are stable between 14 and 16 milliseconds (and no longer a second or more). Even testing on version 10 I have the same stable behavior on my machine. |
See #2869 for what's needed to solve this. |
The time between renders seems to be irregular, but averages fine.
Running this produces:
avg = 16.34ms (~61fps)
There is no concrete pattern. Though
/((1102)*(1103|2)002)+/
matches most of it (when mapped with something like|t| (t / 16.67).round()
).I thought I'd run it on my laptop too, but I don't get the same issue...
switching to
PowerPreference::HighPerformance
or switching toPresentMode::Mailbox
makes no obvious difference.The text was updated successfully, but these errors were encountered: