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

Conversation

@chinmaygarde
Copy link
Member

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

This looks good so far. The test failures seem apropos though, it's kind of surprising this change has any effect on them.

@chinmaygarde
Copy link
Member Author

"Attempted to initialize a Vulkan playground on macOS where Vulkan cannot be found. It can be installed via MoltenVK and make sure to install it globally so dlopen can find it.". This is on Linux. Something is deeply confused.

@chinmaygarde
Copy link
Member Author

Wait, what is linux mac_unopt? Is it linux or mac?

@gaaclarke
Copy link
Member

"Attempted to initialize a Vulkan playground on macOS where Vulkan cannot be found. It can be installed via MoltenVK and make sure to install it globally so dlopen can find it.". This is on Linux. Something is deeply confused.

I suspect that this is just a failure to load vulkan and the error message is macos centric. Is impeller_unittests supposed to be running on linux with swiftshader? If so this can probably be fixed with the VK_ICD_FILENAMES environment variable set to swiftshader like we do on macos.

@chinmaygarde
Copy link
Member Author

This isn't linux. I filed flutter/flutter#142010 to fix the confusingly named bot. I don't think this bot has Molten and the playgrounds aren't configured for SwiftShader. I'll just skip the tests in this configuration.

@gaaclarke
Copy link
Member

Wait, what is linux mac_unopt? Is it linux or mac?

Oh that's mac, if you click into the results like https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20Engine%20Drone/648482/overview you can see it.

I don't know the right nomenclature but that is a linux bot dishing out tasks to mac bots.

@chinmaygarde
Copy link
Member Author

Ok, attempting to run a playground on a host that doesn't support Vulkan even via Molten shouldn't be an error anymore. We can patch it later to work with SwiftShader but that is a heavier lift. I'll investigate the other validation error.

@gaaclarke
Copy link
Member

Ok, attempting to run a playground on a host that doesn't support Vulkan even via Molten shouldn't be an error anymore. We can patch it later to work with SwiftShader but that is a heavier lift.

Running with swiftshader should be an easy change. We are already doing it for the impeller_golden_tests executable. Check out run_tests.py and see where it is setting up VK_ICD_FILENAMES

@chinmaygarde
Copy link
Member Author

Wilco on investigating running it with SwiftShader. The current validation error is pasted below. I think this one is real. Investigating a fix.

[ RUN      ] Play/RuntimeStageTest.CanCreatePipelineFromRuntimeStage/Vulkan
[INFO:capabilities_vk.cc(51)] Vulkan validations are enabled.
[FATAL:flutter/impeller/base/validation.cc(47)] Break on 'ImpellerValidationBreak' to inspect point of failure: 
--- Vulkan Debug Report  ----------------------------------------
|                Severity: Error
|                    Type: { Validation }
|                 ID Name: VUID-VkGraphicsPipelineCreateInfo-layout-07988
|               ID Number: 559874765
|       Queue Breadcrumbs: [NONE]
|  CMD Buffer Breadcrumbs: [NONE]
|         Related Objects: ShaderModule [2205620325320662] [Shader ink_sparkle_fragment_main], PipelineLayout [2208918860203993] [UNNAMED]
|                 Trigger: Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-layout-07988 ] Object 0: handle = 0x7d600000007d6, name = Shader ink_sparkle_fragment_main, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x7d900000007d9, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x215f02cd | vkCreateGraphicsPipelines(): pCreateInfos[0] Set 0 Binding 64 in shader (VK_SHADER_STAGE_FRAGMENT_BIT) uses descriptor slot (expected `VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK`) but not declared in pipeline layout The Vulkan spec states: If a resource variables is declared in a shader, a descriptor slot in layout must match the shader stage (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-07988)
-----------------------------------------------------------------

@chinmaygarde
Copy link
Member Author

Oof. Thats just a single validation error. Theres loads more when I make the harness not tear down on validation error. https://gist.github.com/chinmaygarde/c2c4025fcf452a9ef67618c740b71425

@jonahwilliams
Copy link
Contributor

I think @gaaclarke and I have fixed most of these validation errors. What are the remaining blockers?

@chinmaygarde
Copy link
Member Author

Good to know. I'll rebase and check again to see if I get a clean run.

@chinmaygarde chinmaygarde force-pushed the fix_mac_vul_playgrounds branch from 2ad8d50 to ed6d6ab Compare January 25, 2024 21:55
@chinmaygarde chinmaygarde deleted the fix_mac_vul_playgrounds branch February 12, 2024 18:58
chinmaygarde added a commit to chinmaygarde/flutter_engine that referenced this pull request Feb 12, 2024
…to enabling that backend.

Now, you get playgrounds no all backends if you enable that backend.

Second attempt at flutter#49949
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[Impeller] Vulkan playgrounds are broken on macOS.

3 participants