[Optimize] (MG_Backend/DirectVulkan): store textureResources in permanent scratch space rather than temp memory

This commit is contained in:
2026-03-05 09:44:03 +08:00
parent 139f3f978d
commit 668fa3033e
2 changed files with 4 additions and 7 deletions
@@ -116,7 +116,9 @@ namespace MobileGL::MG_Backend::DirectVulkan {
Vector<VkAttachmentDescription> attachmentDescriptions(validDrawBufCount);
Vector<VkAttachmentReference> colorAttachmentRefs(validDrawBufCount);
Vector<PendingClearAttachmentInfo> pendingClearAttachments;
Vector<VkTextureManager::TextureResource*> textureResources(validDrawBufCount, nullptr);
auto& textureResources = RenderPassEntry::s_textureResourcesScratch;
textureResources.clear();
textureResources.resize(validDrawBufCount, nullptr);
Vector<VkImageView> attachmentViews(validDrawBufCount, VK_NULL_HANDLE);
// This should automatically work on default & offscreen FBO
// assuming default FBO has the right param
@@ -290,7 +292,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
renderPass,
framebuffer,
compatibilityHash,
Move(textureResources),
Move(pendingClearAttachments),
static_cast<Uint32>(attachmentViews.size()),
extent,