mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Chore] (MG_Backend/DirectVulkan): get rid of unnecessary checks
This commit is contained in:
@@ -315,7 +315,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
clearValue.color = {0.0f, 0.0f, 0.0f, 1.0f};
|
clearValue.color = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||||
clearValue.depthStencil = {1.0f, 0};
|
clearValue.depthStencil = {1.0f, 0};
|
||||||
}
|
}
|
||||||
if (s_clearManager) {
|
|
||||||
for (const auto& pending: renderPassEntry.pendingClearAttachments) {
|
for (const auto& pending: renderPassEntry.pendingClearAttachments) {
|
||||||
if (!pending.texture || pending.attachmentIndex >= clearValues.size()) {
|
if (!pending.texture || pending.attachmentIndex >= clearValues.size()) {
|
||||||
continue;
|
continue;
|
||||||
@@ -338,17 +337,14 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
clearValues[pending.attachmentIndex].depthStencil.stencil = clearPayload.stencil;
|
clearValues[pending.attachmentIndex].depthStencil.stencil = clearPayload.stencil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
renderPassBeginInfo.clearValueCount = static_cast<Uint32>(clearValues.size());
|
renderPassBeginInfo.clearValueCount = static_cast<Uint32>(clearValues.size());
|
||||||
renderPassBeginInfo.pClearValues = clearValues.data();
|
renderPassBeginInfo.pClearValues = clearValues.data();
|
||||||
|
|
||||||
vkCmdBeginRenderPass(commandBuffer, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
|
vkCmdBeginRenderPass(commandBuffer, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
|
||||||
if (s_clearManager) {
|
|
||||||
for (const auto& pending: renderPassEntry.pendingClearAttachments) {
|
for (const auto& pending: renderPassEntry.pendingClearAttachments) {
|
||||||
s_clearManager->PopPendingClear(pending.texture);
|
s_clearManager->PopPendingClear(pending.texture);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
s_activeRenderPass = &renderPassEntry;
|
s_activeRenderPass = &renderPassEntry;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user