vk: (mali) add subpass dependency from subpass 2 to external
Add subpass dependency from the last subpass to external/top of pipe. Fix glitches in upper left corner when using OIT on Mali GPUs. Issue #1014 Issue #1234 Issue #1356 Issue #1497 Issue #1852
This commit is contained in:
parent
58ce9a4159
commit
3330225de4
|
@ -97,6 +97,13 @@ vk::UniqueRenderPass RenderPasses::MakeRenderPass(bool initial, bool last, bool
|
|||
vk::AccessFlagBits::eShaderRead | vk::AccessFlagBits::eShaderWrite,
|
||||
vk::AccessFlagBits::eShaderRead | vk::AccessFlagBits::eShaderWrite,
|
||||
vk::DependencyFlagBits::eByRegion);
|
||||
if (GetContext()->GetVendorID() == VulkanContext::VENDOR_ARM) {
|
||||
// Avoid glitches in upper left corner with Mali GPUs.
|
||||
// Using eTopOfPipe as destination since eFragmentShader/eInputAttachmentRead|eShaderRead fails to fix the problem, which is odd.
|
||||
// Also, vulkan defines an implicit dependency from 2 to VK_SUBPASS_EXTERNAL, so this one shouldn't be needed.
|
||||
dependencies.emplace_back(2, VK_SUBPASS_EXTERNAL, vk::PipelineStageFlagBits::eColorAttachmentOutput, vk::PipelineStageFlagBits::eTopOfPipe,
|
||||
vk::AccessFlagBits::eColorAttachmentWrite, vk::AccessFlagBits::eNone);
|
||||
}
|
||||
|
||||
return GetContext()->GetDevice().createRenderPassUnique(vk::RenderPassCreateInfo(vk::RenderPassCreateFlags(),
|
||||
attachmentDescriptions,
|
||||
|
|
Loading…
Reference in New Issue