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] OpenGLES: Ensure frag/vert textures are bound with unique texture units. #47218

Merged
merged 1 commit into from Nov 1, 2023

Conversation

bdero
Copy link
Member

@bdero bdero commented Oct 23, 2023

The fragment shader texture bindings will smash into the texture units used for the vertex shader bindings if the vertex and fragment shaders both have textures.

Entities doesn't use any pipelines that tickle this case.

@bdero bdero added Work in progress (WIP) Not ready (yet) for review! e: impeller labels Oct 23, 2023
@bdero bdero self-assigned this Oct 23, 2023
@chinmaygarde
Copy link
Member

I am assuming this is not workflows not currently used in Flutter. But just a heads up that sampling textures from vertex stages should be behind a capability check in OpenGL ES.

@bdero bdero marked this pull request as ready for review October 31, 2023 23:33
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

I'm not really familar with the capability check required for textures in vertex shaders. But
If we need to support this in general, we'll need some Vulkan specific fixes too:

  • Our Vulkan barriers assume we don't read from textures in the vertex stage.
  • The Vulkan render pass code assumes no texture units will be bound in the vertex stage.

These don't need to be fixed now, especially as I would prefer that we not just pessimize the barriers more 😆 😢

I think metal might just work today.

@bdero
Copy link
Member Author

bdero commented Nov 1, 2023

Metal for sure works today. And yup, good to know -- we'll definitely need this for 3D animation, so I'll probably need to fix up the barrier once I get around to smoke testing Scene or Flutter GPU stuff against Vulkan.

@bdero bdero merged commit 787f9ef into flutter:main Nov 1, 2023
26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 1, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 1, 2023
…137656)

flutter/engine@db06c2e...a0ac6b4

2023-11-01 bdero@google.com [Impeller] Include cstdint everywhere that uint32_t is used. (flutter/engine#47533)
2023-11-01 bdero@google.com [Impeller] Fix nullopt access and simplify coverage computation in GetSubpassCoverage. (flutter/engine#47347)
2023-11-01 bdero@google.com [Impeller] OpenGLES: Ensure frag/vert textures are bound with unique texture units. (flutter/engine#47218)
2023-11-01 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from LCfhx_lTRJI51G0zc... to _TyF0etsONe5aqCbM... (flutter/engine#47532)
2023-11-01 jonahwilliams@google.com [Impeller] stencil buffer record/replay instead of MSAA storage. (flutter/engine#47397)
2023-11-01 chris@bracken.jp [macOS] Delete FlutterCompositor tests (flutter/engine#47527)
2023-10-31 bdero@google.com [Impeller] Place Rect statics under the Rect template. (flutter/engine#47529)
2023-10-31 skia-flutter-autoroll@skia.org Roll Skia from aaa225e0cc6d to 34ef20100acc (1 revision) (flutter/engine#47530)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from LCfhx_lTRJI5 to _TyF0etsONe5

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 rmistry@google.com,zra@google.com 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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e: impeller Work in progress (WIP) Not ready (yet) for review!
Projects
No open projects
Archived in project
3 participants