Replies: 3 comments
-
@bkaradzic I believe I've found part of the problem at least. renderer_vk can face VK_SUBOPTIMAL_KHR results when calling vkAcquireNextImageKHR, which sets m_needToRefreshSwapchain to true. However, there doesn't seem to be any code to handle this being true, the swap chain isn't recreated, and no further rendering can occur whilst it is true. VK_SUBOPTIMAL_KHR isn't totally uncommon, and can be got when the orientation of the device is different from the display or contains some translations I believe. It's not fatal, and things will render correctly. There is also a decent chance that if you recreate the swap chain because of VK_SUBOPTIMAL_KHR, it will just create another VK_SUBOPTIMAL_KHR unless you resolved what made it less than optimal. So I think it's best to handle VK_SUBOPTIMAL_KHR as another VK_SUCCESS case and not recreate the swap chain. |
Beta Was this translation helpful? Give feedback.
-
Yeah, that was it. Once I treated VK_SUBOPTIMAL_KHR as another success condition in the two spots where it is handled, everything renders and updates correctly now. The other option is to use m_needToRefreshSwapchain to recreate the swap chain, but I see comments about fixing another issue by ignoring it.... so it might be best to just handle suboptimal as a success. |
Beta Was this translation helpful? Give feedback.
-
Yes, discussion like this is more appropriate than issue you created. |
Beta Was this translation helpful? Give feedback.
-
Is anyone successfully running an Android/Vulkan combo with the latest codebase? I don't seem to see more than a single frame of content, even though the render and update loop continues to run. I've reproduced this with examples and my own app. No validation errors, and no crashes (cpu or gpu), it just seems like the presentation logic isn't correct.
@bkaradzic this does seem to be an issue, but I don't want to post it again if you're going to ban me after deleting the last one.
Beta Was this translation helpful? Give feedback.
All reactions