mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
If depth or stencil are cleared in a renderpass, set the pipeline flag.
This commit is contained in:
parent
8e30a7ccfc
commit
6d2f29e7eb
1 changed files with 6 additions and 0 deletions
|
@ -719,9 +719,11 @@ void VulkanRenderManager::BindFramebufferAsRenderTarget(VKRFramebuffer *fb, VKRR
|
|||
}
|
||||
if (depth == VKRRenderPassLoadAction::CLEAR) {
|
||||
clearMask |= VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
curPipelineFlags_ |= PipelineFlags::USES_DEPTH_STENCIL;
|
||||
}
|
||||
if (stencil == VKRRenderPassLoadAction::CLEAR) {
|
||||
clearMask |= VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
curPipelineFlags_ |= PipelineFlags::USES_DEPTH_STENCIL;
|
||||
}
|
||||
|
||||
// If we need a clear and the previous step has commands already, it's best to just add a clear and keep going.
|
||||
|
@ -1002,6 +1004,10 @@ void VulkanRenderManager::Clear(uint32_t clearColor, float clearZ, int clearSten
|
|||
curRenderStep_->render.depthLoad = (clearMask & VK_IMAGE_ASPECT_DEPTH_BIT) ? VKRRenderPassLoadAction::CLEAR : VKRRenderPassLoadAction::KEEP;
|
||||
curRenderStep_->render.stencilLoad = (clearMask & VK_IMAGE_ASPECT_STENCIL_BIT) ? VKRRenderPassLoadAction::CLEAR : VKRRenderPassLoadAction::KEEP;
|
||||
|
||||
if (clearMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
|
||||
curPipelineFlags_ |= PipelineFlags::USES_DEPTH_STENCIL;
|
||||
}
|
||||
|
||||
// In case there were commands already.
|
||||
curRenderStep_->render.numDraws = 0;
|
||||
RemoveDrawCommands(&curRenderStep_->commands);
|
||||
|
|
Loading…
Add table
Reference in a new issue