Skip to content
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 Scene] Add ColorSourceContents for drawing a node #38485

Merged
merged 4 commits into from
Dec 29, 2022

Conversation

bdero
Copy link
Member

@bdero bdero commented Dec 23, 2022

This adds a ColorSourceContents which renders an Impeller Scene to a texture and blits it to the current layer respecting the geometry, blend mode, and clip stack.

I also added commented code in the display list dispatcher that can be uncommented once the DlSceneColorSource has been implemented.

@bdero bdero self-assigned this Dec 23, 2022
scene.Render(pass.GetRenderTarget(), camera_transform_);

// Render the texture to the pass.
TiledTextureContents final;
Copy link
Member

Choose a reason for hiding this comment

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

I thought final was a keyword. Odd that this works.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hah, apparently it's fine. I ended up renaming this since it was a weird spur of the moment airport name.

@bdero
Copy link
Member Author

bdero commented Dec 24, 2022

Added a Aiks playground and fixed some bugs. We've still got some corruption going on not being caught by Metal validation that I need to work out. My guess is attachment load/store ops.

Screen.Recording.2022-12-24.at.11.00.36.AM.mov

@chinmaygarde
Copy link
Member

The load/store ops being off seems like a good guess. You could patch ToMTLStoreAction and the ToMTLLoadAction in formats_mtl to always load and store the dont-care cases to see if that fixes your issue. Then you know for sure your hunch is correct.

@bdero
Copy link
Member Author

bdero commented Dec 24, 2022

The fact that it was mostly fuchsia was throwing me off. Just forgot to initialize/clear the color attachment on load. :)

Screen.Recording.2022-12-24.at.11.22.16.AM.mov

@bdero bdero force-pushed the bdero/scene-contents branch 3 times, most recently from 0064e85 to 7595d3c Compare December 25, 2022 12:44
@bdero
Copy link
Member Author

bdero commented Dec 28, 2022

This PR is failing to run only on the simulator. I suspect I'm not packaging or loading the scene shaders correctly. I forgot to include the scene shaders when the Impeller contexts are being initialized for the ios/android embedder surfaces.

2022-12-26 09:20:57.656745-0800 Scenarios[48446:293119] [VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(29)] Using the Impeller rendering backend.
2022-12-26 09:20:57.658137-0800 Scenarios[48446:293203] [VERBOSE-3:validation.cc(31)] Could not resolve pipeline entrypoint(s) 'unskinned_vertex_main' and 'unlit_fragment_main' for pipeline named 'Unskinned'.

@bdero bdero merged commit 8655ec0 into flutter:main Dec 29, 2022
sourcegraph-bot pushed a commit to sgtest/megarepo that referenced this pull request Dec 29, 2022
…ng a node (flutter/engine#38485) (#117769)

Commit: aa70994f60d2c0e33b0a82364ba87d0ac95f9fad
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Dec 29, 2022
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Dec 29, 2022
* 9bb4ffe15 Roll Flutter Engine from 9e63c1ae1480 to 190f743a8506 (2 revisions) (flutter/flutter#117744)

* babeb6191 cc8055d5f Roll Skia from 4b578d72dc2e to e4c86c2fed9a (1 revision) (flutter/engine#38535) (flutter/flutter#117745)

* 9afaf6b88 f3cc581d9 Roll Dart SDK from 6e07d9b025bd to f7b36d5e50a5 (1 revision) (flutter/engine#38536) (flutter/flutter#117749)

* 0e83ada59 Update M3 IconButton unselected focused opacity (flutter/flutter#117321)

* 2783d3168 Roll Flutter Engine from f3cc581d97e1 to 3655bf981d4c (2 revisions) (flutter/flutter#117751)

* 4a6ab96c9 Roll Flutter Engine from 3655bf981d4c to 34f75ed27c9b (3 revisions) (flutter/flutter#117760)

* 2ffa65c76 e9e79180e Roll Skia from 2923399853d9 to 0027eb334691 (6 revisions) (flutter/engine#38545) (flutter/flutter#117763)

* cee9ec522 606e77f35 Roll Skia from 0027eb334691 to 668260c85e9d (1 revision) (flutter/engine#38547) (flutter/flutter#117766)

* c089c19f1 Revert "[reland] Add Material 3 support for `ListTile` - Part 1 (#116963)" (flutter/flutter#117756)

* bdefebcf7 9b534a5f8 Roll Skia from 668260c85e9d to 25ffa2b757e9 (1 revision) (flutter/engine#38548) (flutter/flutter#117768)

* aa70994f6 8655ec022 [Impeller Scene] Add ColorSourceContents for drawing a node (flutter/engine#38485) (flutter/flutter#117769)

* cbc184d9a Roll Flutter Engine from 8655ec022fe1 to ecd47e0b256a (2 revisions) (flutter/flutter#117772)

* 0b6971946 Roll Flutter Engine from ecd47e0b256a to 45e689b15d1a (2 revisions) (flutter/flutter#117778)

* d2127ad34 e44a0de4c Roll Fuchsia Mac SDK from JLTTlcNPJeScjSO2B... to FeFYsNPy64-PEXPer... (flutter/engine#38558) (flutter/flutter#117779)
auto-submit bot pushed a commit to flutter/plugins that referenced this pull request Dec 29, 2022
* 9bb4ffe Roll Flutter Engine from 9e63c1ae1480 to 190f743a8506 (2 revisions) (flutter/flutter#117744)

* babeb61 cc8055d5f Roll Skia from 4b578d72dc2e to e4c86c2fed9a (1 revision) (flutter/engine#38535) (flutter/flutter#117745)

* 9afaf6b f3cc581d9 Roll Dart SDK from 6e07d9b025bd to f7b36d5e50a5 (1 revision) (flutter/engine#38536) (flutter/flutter#117749)

* 0e83ada Update M3 IconButton unselected focused opacity (flutter/flutter#117321)

* 2783d31 Roll Flutter Engine from f3cc581d97e1 to 3655bf981d4c (2 revisions) (flutter/flutter#117751)

* 4a6ab96 Roll Flutter Engine from 3655bf981d4c to 34f75ed27c9b (3 revisions) (flutter/flutter#117760)

* 2ffa65c e9e79180e Roll Skia from 2923399853d9 to 0027eb334691 (6 revisions) (flutter/engine#38545) (flutter/flutter#117763)

* cee9ec5 606e77f35 Roll Skia from 0027eb334691 to 668260c85e9d (1 revision) (flutter/engine#38547) (flutter/flutter#117766)

* c089c19 Revert "[reland] Add Material 3 support for `ListTile` - Part 1 (#116963)" (flutter/flutter#117756)

* bdefebc 9b534a5f8 Roll Skia from 668260c85e9d to 25ffa2b757e9 (1 revision) (flutter/engine#38548) (flutter/flutter#117768)

* aa70994 8655ec022 [Impeller Scene] Add ColorSourceContents for drawing a node (flutter/engine#38485) (flutter/flutter#117769)

* cbc184d Roll Flutter Engine from 8655ec022fe1 to ecd47e0b256a (2 revisions) (flutter/flutter#117772)

* 0b69719 Roll Flutter Engine from ecd47e0b256a to 45e689b15d1a (2 revisions) (flutter/flutter#117778)

* d2127ad e44a0de4c Roll Fuchsia Mac SDK from JLTTlcNPJeScjSO2B... to FeFYsNPy64-PEXPer... (flutter/engine#38558) (flutter/flutter#117779)
loic-sharma pushed a commit to loic-sharma/flutter-engine that referenced this pull request Jan 3, 2023
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
* 9bb4ffe Roll Flutter Engine from 9e63c1ae1480 to 190f743a8506 (2 revisions) (flutter/flutter#117744)

* babeb61 cc8055d5f Roll Skia from 4b578d72dc2e to e4c86c2fed9a (1 revision) (flutter/engine#38535) (flutter/flutter#117745)

* 9afaf6b f3cc581d9 Roll Dart SDK from 6e07d9b025bd to f7b36d5e50a5 (1 revision) (flutter/engine#38536) (flutter/flutter#117749)

* 0e83ada Update M3 IconButton unselected focused opacity (flutter/flutter#117321)

* 2783d31 Roll Flutter Engine from f3cc581d97e1 to 3655bf981d4c (2 revisions) (flutter/flutter#117751)

* 4a6ab96 Roll Flutter Engine from 3655bf981d4c to 34f75ed27c9b (3 revisions) (flutter/flutter#117760)

* 2ffa65c e9e79180e Roll Skia from 2923399853d9 to 0027eb334691 (6 revisions) (flutter/engine#38545) (flutter/flutter#117763)

* cee9ec5 606e77f35 Roll Skia from 0027eb334691 to 668260c85e9d (1 revision) (flutter/engine#38547) (flutter/flutter#117766)

* c089c19 Revert "[reland] Add Material 3 support for `ListTile` - Part 1 (#116963)" (flutter/flutter#117756)

* bdefebc 9b534a5f8 Roll Skia from 668260c85e9d to 25ffa2b757e9 (1 revision) (flutter/engine#38548) (flutter/flutter#117768)

* aa70994 8655ec022 [Impeller Scene] Add ColorSourceContents for drawing a node (flutter/engine#38485) (flutter/flutter#117769)

* cbc184d Roll Flutter Engine from 8655ec022fe1 to ecd47e0b256a (2 revisions) (flutter/flutter#117772)

* 0b69719 Roll Flutter Engine from ecd47e0b256a to 45e689b15d1a (2 revisions) (flutter/flutter#117778)

* d2127ad e44a0de4c Roll Fuchsia Mac SDK from JLTTlcNPJeScjSO2B... to FeFYsNPy64-PEXPer... (flutter/engine#38558) (flutter/flutter#117779)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
2 participants