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

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Jan 23, 2024

Buffer to image is missing barriers. We don't really need to use this for playgrounds though, as set contents does the right thing more or less.

Fixes flutter/flutter#142024

VALIDATION_LOG << "Could not upload texture to device memory for fixture.";
return nullptr;
}
if (enable_mipmapping) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This branch down here was missing the mipmapping support.

@jonahwilliams jonahwilliams marked this pull request as ready for review January 23, 2024 16:00
@jonahwilliams jonahwilliams changed the title Test Fix create texture for fixture [Impeller] fix validation error for playground texture upload. Jan 23, 2024
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

Okay, this makes sense. We are just ripping out the SupportsBufferToTextureBlits path to make sure the image format is getting set correctly, right?

This needs a test (something that exercises it stays fixed on ci). I think maybe the easiest thing to do would be for me to land the PR that turns on validation, but have a way to selectively turn it off for certain tests. Then this PR can turn it back on for a handful of tests. How's that sound?

@jonahwilliams
Copy link
Contributor Author

Are there other validation errors? If not I think we land this and then follow up to turn on validations. Ultimately this is just test code.

@gaaclarke
Copy link
Member

Are there other validation errors? If not I think we land this and then follow up to turn on validations. Ultimately this is just test code.

Chinmay was running into validation errors too when getting the playgrounds working (not goldens) and he was running into some others. My PR's CI runs got messed up, let me try to get them running and get back to you. If this is the only validation error, just pull my patch into this PR.

@gaaclarke
Copy link
Member

For reference: This is the draft PR that attempts to turn validation on for the golden image tests #49955

@gaaclarke
Copy link
Member

I ran into another failure later when validations are on:

[ RUN      ] Play/AiksTest.ClipRectElidesNoOpClips/Vulkan
[FATAL:flutter/impeller/renderer/backend/vulkan/resource_manager_vk.cc(26)] Check failed: waiter_.get_id() != std::this_thread::get_id(). The ResourceManager being destructed on its own spawned thread is a sign that ContextVK was not properly destroyed. A usual fix for this is to ensure that ContextVK is shutdown (i.e. context->Shutdown()) before the ResourceManager is destroyed (i.e. at the end of a test).

There is still something goofed up. Running ClipRectElidesNoOpClips alone doesn't reproduce the crash.

Let me see if we can get validation on just for CanRenderImageRect so we can land this.

@jonahwilliams
Copy link
Contributor Author

I think if there are more then we should try and stage the test so that we gradually decrease the amount of validation errors. Trying to get them all in one go isn't realistic, and we'll keep backsliding too.

@gaaclarke gaaclarke force-pushed the fix_CreateTextureForFixture branch from 558b48a to 8c03e89 Compare January 23, 2024 18:31
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

I turned on the validations for one of the tests that would fail before this PR. LGTM, thanks!

@jonahwilliams
Copy link
Contributor Author

woohoo!

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 23, 2024
@auto-submit auto-submit bot merged commit 57d6b51 into flutter:main Jan 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 23, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[Vulkan] AiksTests.CanRenderImageRect has InvalidImageLayout validation error

2 participants