-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Add a safe way for runtime effects to provide dynamically generated shader metadata #40992
[Impeller] Add a safe way for runtime effects to provide dynamically generated shader metadata #40992
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. |
chinmaygarde
left a comment
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.
Some nits but otherwise lgtm.
| size_t buffer_index = 0; | ||
| size_t buffer_offset = 0; | ||
| for (auto uniform : runtime_stage_->GetUniforms()) { | ||
| // TODO(113715): Populate this metadata once GLES is able to handle |
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.
This comment can now be removed.
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.
Keeping the comment - the ShaderMetadata is still not actually being filled with the data required to use runtime effects on GLES
impeller/renderer/command.h
Outdated
| Resource(std::shared_ptr<const ShaderMetadata>& isa, ResourceType p_resource) | ||
| : resource(p_resource), isa_(nullptr), dynamic_isa_(isa) {} | ||
|
|
||
| const ShaderMetadata* isa() const { |
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.
Perhaps just call this GetMetadata and change the ivar to metadata_. Admittedly, the isa ptr is a holdover from the Objective-C runtime and its not particularly descriptive if you haven't done some runtime mangling.
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 like the technique though.
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.
done
impeller/renderer/command.h
Outdated
|
|
||
| private: | ||
| // Static shader metadata (typically generated by ImpellerC). | ||
| const ShaderMetadata* isa_; |
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.
Default it to nullptr here in case we forget to explicitly do so in the ctor now or if more are added.
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.
done
…generated shader metadata See flutter/flutter#113715
3164323 to
e1b3edf
Compare
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
…namically generated shader metadata (flutter/engine#40992)
…namically generated shader metadata (flutter/engine#40992)
…namically generated shader metadata (flutter/engine#40992)
…generated shader metadata (flutter#40992) See flutter/flutter#113715
See flutter/flutter#113715