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
VideoBackends:Vulkan: Synchronize presentation #11262
Conversation
Synchronize with the submission thread if the last present is not done yet.
|
This seems ok. I think I recall there being a validation error about swap chain images that were continuously increasing. Is that what this is attempting to resolve or was there another issue raised? (or maybe you just saw this?) |
Yup. Please don't ask me to put the validation error into the commit message :P |
|
Thanks @K0bin . That's great to hear. I'm assuming you mean this:
|
|
Pretty sure that's the one. |
|
Hmm, in my testing, that doesn't seem to fix the issue. Tested with Xenoblade opening screen in a portable build. Used hybrid Ubershaders and safe texture cache. No other setting changes. |
|
Wait a second. I didn't notice that it said 1656 images O_O. There must be something else going wrong besides this race condition. How do you reproduce this? |
|
@K0bin - I just ran Xenoblade with the settings I mentioned and turned on validation layer/the host-gpu log category (verbosity info). EDIT: game doesn't seem to matter |
|
What do you mean by the opening screen? I cannot reproduce this. |
|
@K0bin - open any game and I start to see a spam in validation error about the swap chain (as posted above). Updated my driver/sdk just in case but still seeing the same issue. |
|
@iwubcode Any other validation errors besides that one? I'm not getting any validation errors and I simply don't understand, how it can call 1600x vkAcquireNextImage without presenting once. What GPU & OS are you using? |
|
Those games present an ungodly number of frames on boot, maybe you have Immediately Present XFB copies enabled? |
|
@K0bin - no ingame overlay or anything like that. I do see another validation error at startup:
.
The game is presenting and moving along. Just that the number continues to increases. I went past Xenoblade Wii screen all the way to the intro and now at around 3500 for that error. I am on Windows 10, AMD rx480 GPU with driver 22.5.1.
@JMC47 - thanks for your advice. Other than Hybrid ubershaders turned on and the validation errors, I am using a portable build so immediately present XFB is not on. |
|
@K0bin - I think this is an AMD bug: https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/VideoBackends/Vulkan/VKRenderer.cpp#L286 Maybe we could somehow clear things so the validation layer doesn't spam. (EDIT: we can but then it's suboptimal. Helps for my own testing though) Anyway, I don't think that's a blocker to this review. |
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.
Code LGTM. Can't test with my GPU unfortunately.
|
I cant reproduce it with Immediately present XFB either. |
Synchronize with the submission thread if the last present is not done yet.
Right now we could potentially run
vkAcquireNextImageKHRbefore the previous image is presentedand even run out of buffers. This is an easy fix.
Vulkan spec for
vkAcquireNextImageKHR: