Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] initialize ahb swapchain with max entries. #52670

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ static TextureDescriptor ToTextureDescriptor(
desc.mip_count = (ahb_desc.usage & AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE)
? ahb_size.MipCount()
: 1u;
if (ahb_desc.usage & AHARDWAREBUFFER_USAGE_COMPOSER_OVERLAY) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER. I think this whole method could do a redo to to account for accurate usage. I'll patch it up later.

desc.usage = TextureUsage::kRenderTarget;
}
return desc;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ AHBTexturePoolVK::AHBTexturePoolVK(std::weak_ptr<Context> context,
VALIDATION_LOG << "Swapchain image is not allocatable.";
return;
}
for (auto i = 0u; i < max_entries_; i++) {
pool_.emplace_back(CreateTexture());
}
is_valid_ = true;
}

Expand Down