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

Fix for ComputeBasic sample freezing on window resize #1724

Open
wants to merge 1 commit into
base: vulkan
Choose a base branch
from

Conversation

MarcinKantochAMD
Copy link

ComputeBasic sample in Vulkan Explicit group is freezing on window resize. This commit fixes the issues.

The issue is caused by draw() method being called before update() when a window resize happens. draw() method submits a command buffer to a graphics queue, but the rendering operation is configured to wait on mComputeDoneSemaphore being signaled. The signal operation for this semaphore is not scheduled at all if update() method is not called before draw(). The fix enforces to call update() before draw() during a window resize situation.

It fixes also another issue with waiting on mComputeDoneSemaphore semaphore in the wrong pipeline stage. Currently the code is waiting on mComputeDoneSemaphore in stage specified by bit VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT. This stage is not present at all in the set of graphics operations submitted to the graphics queue. The correct bit should be VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT as we are trying to sample a texture in fragment shader that ought to be filled in with data in a previous compute pass.

@vinjn
Copy link
Contributor

vinjn commented Oct 18, 2017

Looks good.

@andrewfb I can help review Vulkan PRs.
I'd like to have Vulkan renderer in master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants