Skip to content

Commit

Permalink
[tz.gl.vk][Issue 84] Fix an issue where renderers that draw into a sw…
Browse files Browse the repository at this point in the history
…apchain image would not wait for the acquire to finish unless it was about to present the finished work right away.
  • Loading branch information
harrand committed Dec 29, 2023
1 parent 67eb28c commit 27750da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tz/gl/impl/vulkan/renderer2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,9 +877,11 @@ namespace tz::gl
{
// we need to wait on the image being available.
const vk2::Semaphore& image_wait = dev.acquire_image(nullptr);
// note: we want to wait on the acquire even if we're not about to present.
// this is because we're about to render into a swapchain image, so it better be ready for use (e.g *not* still being presented by a previous frame.)
extra_waits.add(&image_wait);
if(will_present)
{
extra_waits.add(&image_wait);
// we want our work to signal a semaphore which our present waits on.
extra_signals.add(&this->present_sync_semaphore);
}
Expand Down

0 comments on commit 27750da

Please sign in to comment.