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

[Impeller] Remove transient usage from sampled and stored images #39957

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

iskakaushik
Copy link
Contributor

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@@ -132,12 +132,27 @@ static constexpr vk::ImageUsageFlags ToVKImageUsageFlags(PixelFormat format,

if (usage & static_cast<TextureUsageMask>(TextureUsage::kShaderRead)) {
vk_usage |= vk::ImageUsageFlagBits::eSampled;
// unmark the usage as transient if it is used as a sampled image
Copy link
Member

Choose a reason for hiding this comment

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

We can leave out the issue link as that will get outdate. Instead a comment here saying: "Device transient images can only be used as attachments. The caller specified incorrect usage flags and is attempting to read a device transient image in a shader. Unset the transient attachment flag.".

Maybe even add a validation log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm leaving the reference to the bug and added a comment there to go back and fix the default to be kUnknown

Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

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

I don't think you pushed the updates for the resolved comments. But lgtm after.

@iskakaushik iskakaushik added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 1, 2023
@iskakaushik iskakaushik merged commit ca173b4 into flutter:main Mar 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 1, 2023
chinmaygarde pushed a commit to chinmaygarde/flutter_engine that referenced this pull request Mar 3, 2023
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
None yet
Development

Successfully merging this pull request may close these issues.

[Impeller] kDeviceTransient storage mode must not be associated with ImageUsageFlagBits::eSampled or eStorage
2 participants