You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Impeller] GLES only rendering bug when switching to DL provided depth values. #153504
The test is impeller_Play_AiksTest_CanRenderDifferenceClips_OpenGLES . It looks like the entities after the clip restore don't have the right value? Not sure.
We might be investigating the same issue #157885. I'm trying to compare the Metal commands emitted by Angle and our Metal backend directly to see where the mismatch is. The issue does reproduce.
right now if I save clip draw restore draw I can observe that clip 1 and draw 2 end up with the same depth value. i don't know why this works in metal/vulkan and not GL...
I attempted to debug the vertices and the effective shaders are the same. Only OpenGL has an additional transformation to the z to make the coordinate systems line up.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[Impeller] Switch from AIKS canvas to DL based canvas implementation. (…
jonahwilliams commentedon Aug 19, 2024
@chinmaygarde might be something to do with the depth clamp or depth clamp values.
We could be missing some sort of normalization.
jonahwilliams commentedon Nov 1, 2024
I've confirmed that this only happens with path draws, and not with rectangular draws. I suspect a problem in StC interaction with depth clips.
jonahwilliams commentedon Nov 1, 2024
If I force the stencil cover depth to be 1 greater, it renders correctly.
This leads me to believe that something is a
>=that should be a>or vice versa.chinmaygarde commentedon Nov 1, 2024
We might be investigating the same issue #157885. I'm trying to compare the Metal commands emitted by Angle and our Metal backend directly to see where the mismatch is. The issue does reproduce.
jonahwilliams commentedon Nov 1, 2024
I think its something dumb: flutter-team-archive/engine#56310 (comment)
jonahwilliams commentedon Nov 1, 2024
right now if I save clip draw restore draw I can observe that clip 1 and draw 2 end up with the same depth value. i don't know why this works in metal/vulkan and not GL...
chinmaygarde commentedon Nov 1, 2024
Yeah, that's the worrying bit. I double checked all the enum values. Getting a bit stuck with Xcode not telling me the depth stencil states.
jonahwilliams commentedon Nov 1, 2024
Looks like we use a depth compare of Greater by default: https://github.com/flutter/engine/blob/main/impeller/entity/contents/contents.cc#L29
2 remaining items
jonahwilliams commentedon Nov 1, 2024
Yeah it seems like GL is behaving correctly here while the other backends are actually buggy...
jonahwilliams commentedon Nov 1, 2024
Might just be this increment is wrong: https://github.com/flutter/engine/pull/56310/files#diff-c41a103205badb3983d3910f4b740ea44d91007045ce7b552010db3b506ccc0fR23
chinmaygarde commentedon Nov 1, 2024
This "fixes" it.
chinmaygarde commentedon Nov 1, 2024
I should say, it fixes my test case, it breaks the
CanRenderDifferenceClipscase.jonahwilliams commentedon Nov 1, 2024
@chinmaygarde can you confirm if flutter-team-archive/engine#56310 fixes your bug too?
chinmaygarde commentedon Nov 1, 2024
Yes it does.
The test case:
chinmaygarde commentedon Nov 1, 2024
I labeled the depth stencil states and verified the enums. I don't think its anything to do with how we configure GL state. Shader precision perhaps?
jonahwilliams commentedon Nov 1, 2024
ghosts in the machine
chinmaygarde commentedon Nov 1, 2024
I attempted to debug the vertices and the effective shaders are the same. Only OpenGL has an additional transformation to the z to make the coordinate systems line up.
[impeller] use greater equal rather than greater depth compare. (flut…
github-actions commentedon Nov 15, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[impeller] use greater equal rather than greater depth compare. (flut…