New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Impeller] Remove transient usage from sampled and stored images #39957
Conversation
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. |
9b4dd0d
to
7ec34f2
Compare
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
9ee2541
to
28b06a8
Compare
There was a problem hiding this 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.
28b06a8
to
7037857
Compare
7037857
to
9fe48aa
Compare
fixes: flutter/flutter#121633
Also works around flutter/flutter#121634