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

Commit af4bb63

Browse files
committed
disabled mipmap generation for vulkan
1 parent 97f292d commit af4bb63

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

impeller/aiks/aiks_unittests.cc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3819,8 +3819,13 @@ TEST_P(AiksTest, GaussianBlurMipMapNestedLayer) {
38193819
std::max(it->texture->GetTextureDescriptor().mip_count, max_mip_count);
38203820
}
38213821
EXPECT_EQ(max_mip_count, blur_required_mip_count);
3822-
EXPECT_EQ(log_capture.str().find(GaussianBlurFilterContents::kNoMipsError),
3823-
std::string::npos);
3822+
if (GetParam() == PlaygroundBackend::kMetal) {
3823+
EXPECT_EQ(log_capture.str().find(GaussianBlurFilterContents::kNoMipsError),
3824+
std::string::npos);
3825+
} else {
3826+
EXPECT_NE(log_capture.str().find(GaussianBlurFilterContents::kNoMipsError),
3827+
std::string::npos);
3828+
}
38243829
}
38253830

38263831
TEST_P(AiksTest, GaussianBlurMipMapImageFilter) {
@@ -3847,8 +3852,13 @@ TEST_P(AiksTest, GaussianBlurMipMapImageFilter) {
38473852
std::max(it->texture->GetTextureDescriptor().mip_count, max_mip_count);
38483853
}
38493854
EXPECT_EQ(max_mip_count, blur_required_mip_count);
3850-
EXPECT_EQ(log_capture.str().find(GaussianBlurFilterContents::kNoMipsError),
3851-
std::string::npos);
3855+
if (GetParam() == PlaygroundBackend::kMetal) {
3856+
EXPECT_EQ(log_capture.str().find(GaussianBlurFilterContents::kNoMipsError),
3857+
std::string::npos);
3858+
} else {
3859+
EXPECT_NE(log_capture.str().find(GaussianBlurFilterContents::kNoMipsError),
3860+
std::string::npos);
3861+
}
38523862
}
38533863

38543864
} // namespace testing

impeller/entity/entity_pass.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,12 @@ static EntityPassTarget CreateRenderTarget(ContentContext& renderer,
256256
/// What's important is the `StorageMode` of the textures, which cannot be
257257
/// changed for the lifetime of the textures.
258258

259+
if (context->GetBackendType() != Context::BackendType::kMetal) {
260+
// TODO(tbd): Implement mip map generation on vulkan.
261+
// TODO(tbd): Implement mip map generation on opengles.
262+
mip_count = 1;
263+
}
264+
259265
RenderTarget target;
260266
if (context->GetCapabilities()->SupportsOffscreenMSAA()) {
261267
target = RenderTarget::CreateOffscreenMSAA(

0 commit comments

Comments
 (0)