[Impeller] ImpellerC needs to be able to reflect non-opaque uniforms.
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
Today, the `--reflection-json` option reflects opaque uniform structs. This reflection information is used to generate the reflection header and CC files that used for the built-in Impeller shaders. However, for user provided shaders, we have a restriction that only non-opaque uniforms may be present. This restriction is present because ImpellerC also needs to be able to generate an SKSL shader when Impeller itself is disabled.
Because there was no prior need to reflect non-opaque uniform since Flutter itself didn't support reflection on custom shaders, the [reflection JSON simply skips over those types](https://github.com/flutter/flutter/blob/a9866bc1f8615e385b83b8da2c797a9b2875edee/engine/src/flutter/impeller/compiler/reflector.cc#L262).
If we want to provide reflection capabilities to user provided shaders (cc @flar), we need to support reflection of non-opaque uniforms too.
Contributor guide
Assessment
This issue has not been assessed yet.