Skip to content

getUniformFloat(String name) fails on Vulkan #180595

Closed

Description

@walley892

Steps to reproduce

  1. Write code using getUniformFloat
  2. Build for vulkan
  3. Boom

Expected results

Not boom

Actual results

Uniform with the given name not found.

Code sample

Code sample
shader.getUniformFloat("uTime").set(1.0);
// shaders/my_gradient.frag
#version 460 core
#include <flutter/runtime_effect.glsl>

uniform vec2 uSize; // The size of the area being drawn
uniform float uTime;

out vec4 fragColor;

uniform vec3 uColor;

void main() {
  // FlutterFragCoord() gives the pixel coordinate.
  // Divide by uSize to get normalized coordinates (uv) between 0.0 and 1.0.
  vec2 uv = FlutterFragCoord().xy / uSize;

  // Define two colors for the gradient.
  vec4 color1 = vec4(1.0, 0.0, 0.0, 1.0); // Dark Blue
  vec4 color2 = vec4(uColor, 1.0); // Orange/Red

  fragColor = mix(color1, color2, sin(-uTime));
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

No

Activity

  1. walley892 commented on Jan 6, 2026

    @walley892
    ContributorAuthor

    For Vulkan, it looks like we convert all shader uniforms into a single struct with the name _RESERVED_IDENTIFIER_FIXUP_gl_DefaultUniformBlock.

    We don't have the information on the dart side to make this work correctly. The Uniform information that gets passed to dart is generated here, and defined here and here

  2. gaaclarke commented on Jan 6, 2026

    @gaaclarke
    Member

    Fixing this should also move or eliminate the shortcut in

    (The tests already run against vulkan)

  3. added
    in triagePresently being triaged by the triage team
    engineflutter/engine related. See also e: labels.
    e: impellerImpeller rendering backend issues and features requests
    a: tests"flutter test", flutter_test, or one of our tests
    and removed
    in triagePresently being triaged by the triage team
    on Jan 7, 2026
  4. added
    P1High-priority issues at the top of the work list
    on Jan 27, 2026
  5. walley892 commented on Feb 12, 2026

    @walley892
    ContributorAuthor

    Fixed by #181286

  6. github-actions commented on Mar 1, 2026

    @github-actions

    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.

  7. locked as resolved and limited conversation to collaborators on Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: tests"flutter test", flutter_test, or one of our testse: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.r: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions