Skip to content
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

Merged
merged 12 commits into from
Aug 1, 2018

Conversation

sean-purcell
Copy link
Contributor

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.

return res;
}

device_functions_->vkWaitForFences(device_, 1, &blit_fence_, VK_TRUE,
Copy link
Contributor

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.

@sean-purcell
Copy link
Contributor Author

Odd that presubmit failed here with "Git workspace not clean", not sure what's causing that. Presubmit succeeds locally.

@AWoloszyn
Copy link
Contributor

It could be a difference in clang-format versions.

@sean-purcell
Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/SHADER/SHARED

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.
@AWoloszyn AWoloszyn merged commit 28806b1 into google:master Aug 1, 2018
@sean-purcell sean-purcell deleted the surface-render branch August 1, 2018 20:04
pmuetschard added a commit to pmuetschard/gapid that referenced this pull request Aug 6, 2018
pmuetschard added a commit that referenced this pull request Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants