Skip to content

[Impeller] Vulkan runtime effect uniform packing chooses incorrect binding slot. #150324

@jonahwilliams

Description

@jonahwilliams

The following shader is valid when targeting impeller/vulkan:

#include <flutter/runtime_effect.glsl>

uniform vec2 size;
uniform sampler2D input_texture;

out vec4 frag_color;

void main() {
  frag_color = texture(input_texture, FlutterFragCoord().xy / size);
}

But this one is not:

#include <flutter/runtime_effect.glsl>

uniform sampler2D input_texture;
uniform vec2 size;

out vec4 frag_color;

void main() {
  frag_color = texture(input_texture, FlutterFragCoord().xy / size);
}

In reflector.cc we force the synthetic UBO to have binding 64, but that doesn't work correctly if another uniform would have that binding instead. We need to compute the correct binding values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requeststeam-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