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] Compute correct-ish binding order for Vulkan. #53463

Merged
merged 4 commits into from
Jun 19, 2024

Conversation

jonahwilliams
Copy link
Member

Workaround for flutter/flutter#150324

Fixing binding offset of UBO if its not the first binding.
Tries to infer binding offset for sampler2D, but this may be incorrect if there is more than one sampler.

@jonahwilliams jonahwilliams changed the title [Impeller] Compute correct binding order for Vulkan. [Impeller] Compute correct-ish binding order for Vulkan. Jun 18, 2024
@@ -376,6 +376,8 @@ std::shared_ptr<RuntimeStageData::Shader> Reflector::GenerateRuntimeStageData()

const auto& ubo = ubos[0];

size_t binding =
Copy link
Member

Choose a reason for hiding this comment

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

Ah, this is much nicer. The reflector reflects whats in the SPIRV instead of enforcing its own rules.

Copy link
Member Author

Choose a reason for hiding this comment

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

its still broken though :)

auto stage = stages[PlaygroundBackendToRuntimeStageBackend(GetBackend())];

ASSERT_TRUE(stage->IsValid());
switch (GetBackend()) {
Copy link
Member

Choose a reason for hiding this comment

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

if (GetBackends() != PlaygroundBackend::kVulkan) {
  GTEST_SKIP() << "Only matters on Vulkan.";
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

// found in the LICENSE file.

// sampler is specifically ordered before color.
uniform sampler2D u_texture;
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps another test that flips this around?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@jonahwilliams
Copy link
Member Author

agh. This is running on Vulkan but I need runtime stage vulkan.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 19, 2024
@auto-submit auto-submit bot merged commit 2bb13cc into flutter:main Jun 19, 2024
29 checks passed
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 20, 2024
…150537)

flutter/engine@f9c497f...dd37cef

2024-06-20 [email protected] Roll Skia from 79a7acc34939 to 199e1a49b091 (1 revision) (flutter/engine#53481)
2024-06-19 [email protected] [Impeller] Compute correct-ish binding order for Vulkan. (flutter/engine#53463)

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 [email protected],[email protected],[email protected] 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
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants