Skip to content

Conversation

@Firestar99
Copy link
Member

@Firestar99 Firestar99 commented Dec 16, 2025

Requires #506

Switches from swiftshader to lavapipe for software rasterization, since swiftshader doesn't support int64 for whatever reason. Needed for int64 difftests in #502.

Old description, please ignore

swiftshader download has been giving us a lot of download timeouts, from #407:

🚀 Installing SwiftShader library...
Error: HttpClientError: API rate limit exceeded for 52.159.244.80. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

The install-vulkan-sdk-action doesn't offer the option to forward credentials either. And I don't think you can use retry actions to retry actual actions, they only support commands.

So by far the most low effort "fix" would be to switch to lavapipe and hope their servers don't have weird throttling. And our CI still works. This won't work, both swiftshader and lavapipe artifacts are downloaded from github releases.

@Firestar99 Firestar99 force-pushed the ci_lavapipe branch 3 times, most recently from e98b320 to 80ef47e Compare December 16, 2025 14:14
Copy link
Contributor

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

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

To avoid throttling you should implement caching (or the action you're using).

I'm installing Lavapipe from https://github.com/mmozeiko/build-mesa releases, which are specifically designed for downloads and there is always a fresh Mesa version there.

Here is a PowerShell script I wrote that includes x86-64 and aarch64 support and does hash verification: https://github.com/nazar-pc/abundance/blob/ee1071d4a6002664b292230e216cfc5ec14bd667/.github/workflows/rust.yml#L271-L332

On Linux it is much simpler and no separate action is needed: https://github.com/nazar-pc/abundance/blob/ee1071d4a6002664b292230e216cfc5ec14bd667/.github/workflows/rust.yml#L265-L268

I hope it is helpful.

@Firestar99
Copy link
Member Author

Firestar99 commented Dec 17, 2025

On Linux we also just install mesa drivers, and Mac uses wgpu's metal backend (and we disable the one Vulkan test for now). So this is primarily about Windows.

The action has caching build in, it doesn't seem work on windows. Also it just downloads Swiftshader / Lavapipe without actually adding the registry key / env vars for it to work, we fix it ourselves. We're previously had an action that worked but stopped updating the vulkan sdk at some point. So yea, the state of currently available actions is underwhelming, and I have considered just rolling my own that can be shared by the wider rust-gpu ecosystem and hopefully be more stable.

This has literally been a "low effort" attempt at fixing it, but for some reason Windows really doesn't want to load that lavapipe driver, and the loader debug envs are not forwarded to the difftest for some reason. But if it continues being this unstable, I may really start rolling my own.

@Firestar99 Firestar99 force-pushed the ci_lavapipe branch 3 times, most recently from 0e1394b to 29f7fe3 Compare January 7, 2026 13:29
@Firestar99 Firestar99 changed the title ci: switch from swiftshader to lavapipe ci: switch to lavapipe from swiftshader Jan 7, 2026
@Firestar99 Firestar99 force-pushed the ci_lavapipe branch 3 times, most recently from dbb6047 to 3ae4755 Compare January 7, 2026 15:38
@Firestar99 Firestar99 changed the base branch from main to ci_remove_swiftshader_setup January 7, 2026 16:34
@Firestar99 Firestar99 changed the title ci: switch to lavapipe from swiftshader ci: switch vk software impl to lavapipe Jan 7, 2026
@Firestar99 Firestar99 marked this pull request as ready for review January 7, 2026 16:37
Base automatically changed from ci_remove_swiftshader_setup to main January 7, 2026 16:58
@Firestar99 Firestar99 added this pull request to the merge queue Jan 9, 2026
Merged via the queue into main with commit be870e5 Jan 9, 2026
26 checks passed
@Firestar99 Firestar99 deleted the ci_lavapipe branch January 9, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants