-
Notifications
You must be signed in to change notification settings - Fork 327
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
Add support for rendering during replay to the surface #2112
Conversation
return res; | ||
} | ||
|
||
device_functions_->vkWaitForFences(device_, 1, &blit_fence_, VK_TRUE, |
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.
I am a bit leery about this vkWaitForFences. Since this is running on the main thread, we can end up blocking the user thread and synchronizing with the GPU.
Odd that presubmit failed here with "Git workspace not clean", not sure what's causing that. Presubmit succeeds locally. |
It could be a difference in clang-format versions. |
Ah "git workspace not clean" is just the way of saying presubmit changed things? That makes sense |
|
||
// The source image is already in VK_IMAGE_LAYOUT_TRANSFER_SRC, we need to | ||
// transition our image between VK_IMAGE_LAYOUT_TRANSFER_DST and | ||
// VK_IMAGE_LAYOUT_SHADER_PRESENT_KHR |
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.
s/SHADER/SHARED
28a67e0
to
66c9fb5
Compare
It results in more consistent #if's when multiple platforms are supported.
We can't set acquire to 0 here, since the image hasn't necessarily done presenting. This is guaranteed to finish because the only way all base swapchain images could still be in use is if the present hasn't finished yet, but there's nothing blocking those presents.
Currently only Android is supported, but it's easily extensible for other surface types (e.g. Xcb/Win32)
Creating/obtaining the create info for the surface to render to is handled on the gapir side. On the virtual swapchain side, it takes the create info and makes a surface and swapchain, and then when an image is presented to the virtual swapchain it blits to the real swapchain and presents that as well.