Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

jonahwilliams
Copy link
Contributor

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
Contributor 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
Contributor 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
Contributor 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
Contributor 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
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 skia-flutter-autoroll@skia.org Roll Skia from 79a7acc34939 to 199e1a49b091 (1 revision) (flutter/engine#53481)
2024-06-19 jonahwilliams@google.com [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 jsimmons@google.com,rmistry@google.com,zra@google.com 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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