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

[Impeller] fix line/polygon depth and GLES scissor state. #56494

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Nov 10, 2024

Two problems:

  1. We were incorrectly clearing scissor state in the GLES render pass. I suspect this is the cause of all of the clipping problems in wonderous.

  2. We were incrementing the depth value in drawPoints with line/polygon mode: these actually need to use the same depth values.

Fixed in the same PR because the golden actually demonstrates both problems with GLES, and luckily I found 2. when I noticed 1.

Before

Metal/Vulkan

image

GLES

image

@jonahwilliams jonahwilliams changed the title [Impeller] fix line/polygon depth and GLES render state. [Impeller] fix line/polygon depth and GLES scissor state. Nov 11, 2024
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

lgtm! Can you add a screenshot of what the golden test looks like without the change to the PR?

@jonahwilliams
Copy link
Member Author

Yeah will grab in a sec. Essentially the lines will draw outside of the clipped circle.

@flutter-dashboard
Copy link

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.

Changes reported for pull request #56494 at sha 3eeb2f4

@jonahwilliams
Copy link
Member Author

FYI @jason-simmons

@jonahwilliams
Copy link
Member Author

Added before screenshots.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 11, 2024
@auto-submit auto-submit bot merged commit 950e240 into flutter:main Nov 11, 2024
31 checks passed
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 11, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 12, 2024
…158485)

flutter/engine@7b3eacd...35041f1

2024-11-11 [email protected] Roll Dart SDK from a393f3ed040a to 69170fac244c (1 revision) (flutter/engine#56513)
2024-11-11 [email protected] iOS,macOS: Refactor TestMetalContext for ARC (flutter/engine#56510)
2024-11-11 [email protected] [Impeller] geometry changes to support line/point style. (flutter/engine#56340)
2024-11-11 [email protected] Roll Skia from af6a4f9a85ee to 11046fd10394 (9 revisions) (flutter/engine#56508)
2024-11-11 [email protected] [Impeller] dont unnecessarily copy point data out of display list. (flutter/engine#56492)
2024-11-11 [email protected] [Impeller] fix line/polygon depth and GLES scissor state. (flutter/engine#56494)
2024-11-11 [email protected] Do not stop flutter_tester if microtasks are still pending (flutter/engine#56432)
2024-11-11 [email protected] Roll Skia from 261316c10484 to af6a4f9a85ee (5 revisions) (flutter/engine#56505)
2024-11-11 [email protected] Roll Dart SDK from 4ea43aa234a4 to a393f3ed040a (1 revision) (flutter/engine#56506)

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] 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
@chinmaygarde
Copy link
Member

This was bisected as causing a regression in a customer test. I'm getting a reduced test case now.

The regression manifested as the application of an obsolete scissor rect. The only thing in this patch that looks related is the removal of the scissor test.

Whats different about MTL/VK and GLES that'd cause this? Direct encode?

chinmaygarde added a commit to chinmaygarde/flutter_engine that referenced this pull request Nov 13, 2024
…utter#56494)"

This reverts commit 950e240.

This caused a regression in a customer application (@lyceel).

I am not sure I should revert this whole patch. The goldens don't change if I just revert the patches to `render_pass_gles.cc`. So while that part was untested in the original commit, the other patches should be good. The original commit message did mention two separate issues were being addressed.

I am working on reduced test case with just the scissor regression with the customer.
jonahwilliams added a commit to jonahwilliams/engine that referenced this pull request Dec 17, 2024
)

Two problems:

1. We were incorrectly clearing scissor state in the GLES render pass. I suspect this is the cause of all of the clipping problems in wonderous.

2. We were incrementing the depth value in drawPoints with line/polygon mode: these actually need to use the same depth values.

Fixed in the same PR because the golden actually demonstrates both problems with GLES, and luckily I found 2. when I noticed 1.

![image](https://github.com/user-attachments/assets/a5541a51-bdf6-4a47-9638-610d9562df6f)

![image](https://github.com/user-attachments/assets/9f3ad7e1-8193-405d-98c0-49141c8ab662)
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…gine#56494)

Two problems:

1. We were incorrectly clearing scissor state in the GLES render pass. I suspect this is the cause of all of the clipping problems in wonderous.

2. We were incrementing the depth value in drawPoints with line/polygon mode: these actually need to use the same depth values.

Fixed in the same PR because the golden actually demonstrates both problems with GLES, and luckily I found 2. when I noticed 1.

## Before

### Metal/Vulkan

![image](https://github.com/user-attachments/assets/a5541a51-bdf6-4a47-9638-610d9562df6f)

### GLES

![image](https://github.com/user-attachments/assets/9f3ad7e1-8193-405d-98c0-49141c8ab662)
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