flutter / flutter/flutter

[Impeller] ImpellerC needs to be able to reflect non-opaque uniforms.

Open
#177,131 0 comments 0 reactions 0 assignees View on GitHub
c: proposal e: impeller engine P2 team-engine triaged-engine
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.