Jonah Williams 2024-05-08 15:31:28 -07:00 committed by GitHub
parent b46227a653
commit 6bdc2f067f
2 changed files with 6 additions and 0 deletions

View File

@ -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) {
desc.usage = TextureUsage::kRenderTarget;
}
return desc;
}

View File

@ -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;
}