diff options
| author | Tony-LunarG <tony@lunarg.com> | 2018-05-30 14:53:14 -0600 |
|---|---|---|
| committer | Karl Schultz <karl@lunarg.com> | 2018-06-05 12:03:24 -0600 |
| commit | 4ba65cdf65f7f6692f8d1828a6585117803dcea5 (patch) | |
| tree | 72a8543543fef316b067faa3ef895c53851b3787 /cube/cube.cpp | |
| parent | a0c78f54ed15a8502dd4543fcb527a1c060bcdd4 (diff) | |
| download | usermoji-4ba65cdf65f7f6692f8d1828a6585117803dcea5.tar.xz | |
cube: Fix separate present queue validation errors
From the spec:
Whilst it is not invalid to provide destination or source access
masks for memory barriers used for release or acquire operations,
respectively, they have no practical effect. Access after a release
operation has undefined results, and so visibility for those accesses
has no practical effect. Similarly, write access before an acquire
operation will produce undefined results for future access,
so availability of those writes has no practical use. In an earlier
version of the specification, these were required to match on both
sides - but this was subsequently relaxed.
These masks should be set to 0.
Change-Id: I495dc86ad62c0651fbc6acbfb0dfbb8245a324be
Diffstat (limited to 'cube/cube.cpp')
| -rw-r--r-- | cube/cube.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cube/cube.cpp b/cube/cube.cpp index 6aa66722..65cce400 100644 --- a/cube/cube.cpp +++ b/cube/cube.cpp @@ -571,7 +571,7 @@ void Demo::build_image_ownership_cmd(uint32_t const &i) { auto const image_ownership_barrier = vk::ImageMemoryBarrier() .setSrcAccessMask(vk::AccessFlags()) - .setDstAccessMask(vk::AccessFlagBits::eColorAttachmentWrite) + .setDstAccessMask(vk::AccessFlags()) .setOldLayout(vk::ImageLayout::ePresentSrcKHR) .setNewLayout(vk::ImageLayout::ePresentSrcKHR) .setSrcQueueFamilyIndex(graphics_queue_family_index) @@ -580,8 +580,8 @@ void Demo::build_image_ownership_cmd(uint32_t const &i) { .setSubresourceRange(vk::ImageSubresourceRange(vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1)); swapchain_image_resources[i].graphics_to_present_cmd.pipelineBarrier( - vk::PipelineStageFlagBits::eColorAttachmentOutput, vk::PipelineStageFlagBits::eColorAttachmentOutput, - vk::DependencyFlagBits(), 0, nullptr, 0, nullptr, 1, &image_ownership_barrier); + vk::PipelineStageFlagBits::eBottomOfPipe, vk::PipelineStageFlagBits::eBottomOfPipe, vk::DependencyFlagBits(), 0, nullptr, 0, + nullptr, 1, &image_ownership_barrier); result = swapchain_image_resources[i].graphics_to_present_cmd.end(); VERIFY(result == vk::Result::eSuccess); @@ -845,7 +845,7 @@ void Demo::draw_build_cmd(vk::CommandBuffer commandBuffer) { auto const image_ownership_barrier = vk::ImageMemoryBarrier() .setSrcAccessMask(vk::AccessFlags()) - .setDstAccessMask(vk::AccessFlagBits::eColorAttachmentWrite) + .setDstAccessMask(vk::AccessFlags()) .setOldLayout(vk::ImageLayout::ePresentSrcKHR) .setNewLayout(vk::ImageLayout::ePresentSrcKHR) .setSrcQueueFamilyIndex(graphics_queue_family_index) @@ -853,7 +853,7 @@ void Demo::draw_build_cmd(vk::CommandBuffer commandBuffer) { .setImage(swapchain_image_resources[current_buffer].image) .setSubresourceRange(vk::ImageSubresourceRange(vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1)); - commandBuffer.pipelineBarrier(vk::PipelineStageFlagBits::eColorAttachmentOutput, vk::PipelineStageFlagBits::eBottomOfPipe, + commandBuffer.pipelineBarrier(vk::PipelineStageFlagBits::eBottomOfPipe, vk::PipelineStageFlagBits::eBottomOfPipe, vk::DependencyFlagBits(), 0, nullptr, 0, nullptr, 1, &image_ownership_barrier); } |
