mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
[Chore] (MG_Backend/DirectVulkan): remove unused functions
This commit is contained in:
@@ -299,57 +299,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
return insertedIt->second;
|
||||
}
|
||||
|
||||
Bool VkRenderPassManager::TryClearPendingAttachmentsOnActiveRenderPass(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const RenderPassEntry& compatibleRenderPassEntry) {
|
||||
VkClearRect clearRect{};
|
||||
clearRect.rect.offset = {0, 0};
|
||||
clearRect.rect.extent = {
|
||||
static_cast<Uint32>(s_activeRenderPass->extent.x()),
|
||||
static_cast<Uint32>(s_activeRenderPass->extent.y())
|
||||
};
|
||||
clearRect.baseArrayLayer = 0;
|
||||
clearRect.layerCount = 1;
|
||||
|
||||
for (const auto& pending : compatibleRenderPassEntry.pendingClearAttachments) {
|
||||
if (!pending.texture) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ClearAttachmentPayload clearPayload{};
|
||||
if (!s_clearManager->GetPendingClear(pending.texture, clearPayload)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
VkClearAttachment clearAttachment{};
|
||||
clearAttachment.clearValue.depthStencil = {1.0f, 0};
|
||||
if (clearPayload.attachmentType >= FramebufferAttachmentType::Color0 &&
|
||||
clearPayload.attachmentType <= FramebufferAttachmentType::Color31) {
|
||||
clearAttachment.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
clearAttachment.colorAttachment = pending.attachmentIndex;
|
||||
clearAttachment.clearValue.color = {
|
||||
clearPayload.color.x(),
|
||||
clearPayload.color.y(),
|
||||
clearPayload.color.z(),
|
||||
clearPayload.color.w()
|
||||
};
|
||||
} else if (clearPayload.attachmentType == FramebufferAttachmentType::Depth) {
|
||||
clearAttachment.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
clearAttachment.clearValue.depthStencil.depth = clearPayload.depth;
|
||||
} else if (clearPayload.attachmentType == FramebufferAttachmentType::Stencil) {
|
||||
clearAttachment.aspectMask = VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
clearAttachment.clearValue.depthStencil.stencil = clearPayload.stencil;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
vkCmdClearAttachments(commandBuffer, 1, &clearAttachment, 1, &clearRect);
|
||||
s_clearManager->PopPendingClear(pending.texture);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Bool VkRenderPassManager::BeginRenderPass(VkCommandBuffer commandBuffer, RenderPassEntry& renderPassEntry) {
|
||||
// TODO: Transition all the attachments into proper layout before starting the render pass
|
||||
VkRenderPassBeginInfo renderPassBeginInfo;
|
||||
|
||||
@@ -95,9 +95,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
Uint32 swapchainImageIndex,
|
||||
Bool includePendingClear = true) const;
|
||||
RenderPassEntry& GetOrCreateRenderPass(const MG_State::GLState::FramebufferObject& fbo, Uint32 swapchainImageIndex);
|
||||
static Bool TryClearPendingAttachmentsOnActiveRenderPass(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const RenderPassEntry& compatibleRenderPassEntry);
|
||||
static Bool BeginRenderPass(VkCommandBuffer commandBuffer, RenderPassEntry& renderPassEntry);
|
||||
static Bool EndRenderPass(VkCommandBuffer commandBuffer);
|
||||
static RenderPassEntry* GetActiveRenderPass();
|
||||
|
||||
Reference in New Issue
Block a user