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

[Impeller Scene] Add ColorSourceContents for drawing a node#38485

Merged
bdero merged 4 commits into
flutter-team-archive:mainfrom
bdero:bdero/scene-contents
Dec 29, 2022
Merged

[Impeller Scene] Add ColorSourceContents for drawing a node#38485
bdero merged 4 commits into
flutter-team-archive:mainfrom
bdero:bdero/scene-contents

Conversation

@bdero

@bdero bdero commented Dec 23, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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

bdero commented Dec 24, 2022

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

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

bdero commented Dec 24, 2022

Copy link
Copy Markdown
Contributor Author

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 bdero force-pushed the bdero/scene-contents branch from 7595d3c to 0a31d25 Compare December 26, 2022 02:00
@bdero

bdero commented Dec 28, 2022

Copy link
Copy Markdown
Contributor Author

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-team-archive:main Dec 29, 2022
sourcegraph-bot pushed a commit to sgtest/megarepo that referenced this pull request Dec 29, 2022
…ng a node (flutter-team-archive/engine#38485) (#117769)

Commit: aa70994f60d2c0e33b0a82364ba87d0ac95f9fad
auto-submit Bot pushed a commit to flutter/packages 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-team-archive/engine#38535) (flutter/flutter#117745)

* 9afaf6b f3cc581d9 Roll Dart SDK from 6e07d9b025bd to f7b36d5e50a5 (1 revision) (flutter-team-archive/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-team-archive/engine#38545) (flutter/flutter#117763)

* cee9ec5 606e77f35 Roll Skia from 0027eb334691 to 668260c85e9d (1 revision) (flutter-team-archive/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-team-archive/engine#38548) (flutter/flutter#117768)

* aa70994 8655ec022 [Impeller Scene] Add ColorSourceContents for drawing a node (flutter-team-archive/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-team-archive/engine#38558) (flutter/flutter#117779)
auto-submit Bot pushed a commit to flutter-team-archive/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-team-archive/engine#38535) (flutter/flutter#117745)

* 9afaf6b f3cc581d9 Roll Dart SDK from 6e07d9b025bd to f7b36d5e50a5 (1 revision) (flutter-team-archive/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-team-archive/engine#38545) (flutter/flutter#117763)

* cee9ec5 606e77f35 Roll Skia from 0027eb334691 to 668260c85e9d (1 revision) (flutter-team-archive/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-team-archive/engine#38548) (flutter/flutter#117768)

* aa70994 8655ec022 [Impeller Scene] Add ColorSourceContents for drawing a node (flutter-team-archive/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-team-archive/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
…hive#6892)

* 9bb4ffe Roll Flutter Engine from 9e63c1ae1480 to 190f743a8506 (2 revisions) (flutter/flutter#117744)

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

* 9afaf6b f3cc581d9 Roll Dart SDK from 6e07d9b025bd to f7b36d5e50a5 (1 revision) (flutter-team-archive/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-team-archive/engine#38545) (flutter/flutter#117763)

* cee9ec5 606e77f35 Roll Skia from 0027eb334691 to 668260c85e9d (1 revision) (flutter-team-archive/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-team-archive/engine#38548) (flutter/flutter#117768)

* aa70994 8655ec022 [Impeller Scene] Add ColorSourceContents for drawing a node (flutter-team-archive/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-team-archive/engine#38558) (flutter/flutter#117779)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

2 participants