VulkanRenderer: Fix VkRenderWindow subpass dependencies
This commit is contained in:
parent
10aa7231b6
commit
bfb93bc925
|
|
@ -435,28 +435,15 @@ namespace Nz
|
||||||
|
|
||||||
std::vector<RenderPass::SubpassDependency> subpassDependencies = {
|
std::vector<RenderPass::SubpassDependency> subpassDependencies = {
|
||||||
{
|
{
|
||||||
{
|
RenderPass::ExternalSubpassIndex,
|
||||||
RenderPass::ExternalSubpassIndex,
|
PipelineStage::ColorOutput,
|
||||||
PipelineStage::ColorOutput,
|
{},
|
||||||
{},
|
|
||||||
|
|
||||||
0,
|
0,
|
||||||
PipelineStage::ColorOutput,
|
PipelineStage::ColorOutput,
|
||||||
MemoryAccess::ColorWrite,
|
MemoryAccess::ColorWrite,
|
||||||
|
|
||||||
true //< tilable
|
true //< tilable
|
||||||
},
|
|
||||||
{
|
|
||||||
0,
|
|
||||||
PipelineStage::ColorOutput,
|
|
||||||
MemoryAccess::ColorWrite,
|
|
||||||
|
|
||||||
RenderPass::ExternalSubpassIndex,
|
|
||||||
PipelineStage::BottomOfPipe,
|
|
||||||
MemoryAccess::MemoryRead,
|
|
||||||
|
|
||||||
true //< tilable
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -477,12 +464,17 @@ namespace Nz
|
||||||
AttachmentStoreOp::Discard,
|
AttachmentStoreOp::Discard,
|
||||||
TextureLayout::Undefined,
|
TextureLayout::Undefined,
|
||||||
TextureLayout::DepthStencilReadWrite
|
TextureLayout::DepthStencilReadWrite
|
||||||
});
|
});
|
||||||
|
|
||||||
subpasses.front().depthStencilAttachment = RenderPass::AttachmentReference{
|
subpasses.front().depthStencilAttachment = RenderPass::AttachmentReference{
|
||||||
1,
|
1,
|
||||||
TextureLayout::DepthStencilReadWrite
|
TextureLayout::DepthStencilReadWrite
|
||||||
};
|
};
|
||||||
|
|
||||||
|
auto& subpassDependency = subpassDependencies.front();
|
||||||
|
subpassDependency.fromStages |= PipelineStage::FragmentTestsEarly;
|
||||||
|
subpassDependency.toStages |= PipelineStage::FragmentTestsEarly;
|
||||||
|
subpassDependency.toAccessFlags |= MemoryAccess::DepthStencilWrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_renderPass.emplace(*m_device, std::move(attachments), std::move(subpasses), std::move(subpassDependencies));
|
m_renderPass.emplace(*m_device, std::move(attachments), std::move(subpasses), std::move(subpassDependencies));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue