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

[Impeller] Only set the stencil ref for StC draws. #52006

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

bdero
Copy link
Member

@bdero bdero commented Apr 9, 2024

Another clean-up patch following #51992.

Also, don't rely on Entity tracked stencil height for clip coverage tracking.

@bdero bdero self-assigned this Apr 9, 2024
@bdero bdero changed the title [Impeller] Stop setting the stencil ref to the old depth value. [Impeller] Only set the stencil ref for StC draws. Apr 9, 2024
@@ -13,7 +13,7 @@ namespace impeller {

struct ClipCoverageLayer {
std::optional<Rect> coverage;
size_t clip_depth;
size_t clip_height;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Zero out scalers so they aren't uninitialized memory accidentaly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@@ -819,7 +819,7 @@ EntityPass& Canvas::GetCurrentPass() {
}

size_t Canvas::GetClipDepth() const {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand the motivation behind changing the clip_depth to clip_height. Perhaps rename the canvas call too?

Copy link
Member

Choose a reason for hiding this comment

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

because we count up and not down maybe? but yeah I would complete the rename

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

The motivation is that we have two distinct clip tracking concepts to contend with, and I think using different labels for them moving forward will curb confusion (especially while doing the work to collapse EntityPass/Aiks):

  • Clip height: The placement of a clip within the clip stack. This is a detail of coverage rectangle tracking and has nothing to do with actual draw calls themselves.
  • Clip depth: The depth integer assigned to all draws/clips that informs the Z position range to use for each draw call.

Copy link
Member

Choose a reason for hiding this comment

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

SGTM. Having a "zPosition" float might also be clearer.

@chinmaygarde
Copy link
Member

This might need to be rebased. @jonahwilliams suppressed the shader-output-not-consumed validation errors recently and these still show up as failures.

bdero added 3 commits April 11, 2024 13:15
Also, don't rely on Entity tracked stencil height for clip coverage tracking.
@bdero bdero force-pushed the bdero/remove-stencil-clips2 branch from 2088e3f to f9a3083 Compare April 11, 2024 20:16
@bdero bdero merged commit 1fb2a7a into flutter:main Apr 11, 2024
26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 12, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 12, 2024
…146698)

flutter/engine@6b37b17...0e56e3d

2024-04-12 [email protected] Fix the Dart language version for Fuchsia's build of the args package (flutter/engine#52083)
2024-04-11 [email protected] Update iOS KeyCodeMap dictionary literal and migrate to ARC (flutter/engine#51981)
2024-04-11 [email protected] [Impeller] Only set the stencil ref for StC draws. (flutter/engine#52006)
2024-04-11 [email protected] Remove intermediate APKs during build process. (flutter/engine#52071)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gilnobrega pushed a commit to gilnobrega/flutter that referenced this pull request Apr 22, 2024
…lutter#146698)

flutter/engine@6b37b17...0e56e3d

2024-04-12 [email protected] Fix the Dart language version for Fuchsia's build of the args package (flutter/engine#52083)
2024-04-11 [email protected] Update iOS KeyCodeMap dictionary literal and migrate to ARC (flutter/engine#51981)
2024-04-11 [email protected] [Impeller] Only set the stencil ref for StC draws. (flutter/engine#52006)
2024-04-11 [email protected] Remove intermediate APKs during build process. (flutter/engine#52071)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants