Skip to content

Conversation

@Firestar99
Copy link

What type of change is this?

  • Bug Fix
  • New Feature

Description:

In rust-gpu's CI workflow, right after we use your action to install swiftshader, we have this extra step:

      - if: ${{ runner.os == 'Windows' }}
        name: Windows - Use SwiftShader as Vulkan driver
        # FIXME(eddyb) ideally `jakoch/install-vulkan-sdk-action` should do this.
        run: |
          echo "C:/Swiftshader/" >> "$GITHUB_PATH"
          echo "VK_DRIVER_FILES=C:/Swiftshader/vk_swiftshader_icd.json" >> "$GITHUB_ENV"

This PR upstreams setting these env vars, so you don't have to manually configure the driver yourself.

To test this properly, I've removed the manual registration from your CI, so it's relying on the action doing the configuration itself. This required adding an extra "rasterizer" column to the job matrix for lavapipe and swiftshader, instead of having both be in the same job.

@Firestar99
Copy link
Author

Firestar99 commented Jan 5, 2026

@jakoch could I ask for workflow approval, to see if this even works? Don't really have any other way to test this

Based on failing CI in Rust-GPU/rust-gpu#489 I assume lavapipe may fail and need further debugging

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 20.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.79%. Comparing base (7ecc630) to head (92bb2a2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/main.ts 20.00% 12 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #545      +/-   ##
==========================================
- Coverage   93.22%   91.79%   -1.43%     
==========================================
  Files          15       15              
  Lines         767      780      +13     
  Branches      174      178       +4     
==========================================
+ Hits          715      716       +1     
- Misses         52       64      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jakoch
Copy link
Owner

jakoch commented Jan 5, 2026

Happy New Year!
Thank you for the feature request. Automating the ICD setup is a great idea.

@jakoch jakoch marked this pull request as ready for review January 5, 2026 22:16
@jakoch jakoch merged commit 093d07b into jakoch:main Jan 5, 2026
@Firestar99
Copy link
Author

ehm... I was just asking for approval to run pipelines, not for you to merge this just yet. The pipelines were failing due to the drivers not being properly registered, and now it's in main... I'll have a try at fixing it over the next few days

@jakoch
Copy link
Owner

jakoch commented Jan 6, 2026

No worries at all! 😊

I noticed the pipelines were failing due to the VK_DRIVER_FILES registration being removed, so after merging, I went ahead and tweaked your original code a bit to restore that part.

The CI is now passing: https://github.com/jakoch/install-vulkan-sdk-action/actions/runs/20733670447
And it’s been released as v1.3.0.

Thanks again for your work on this!

(The only part not tested in the CI workflow is the newly added caching behavior for both rasterizers.
Guess it will bubble up, if it fails.)

@Firestar99
Copy link
Author

Firestar99 commented Jan 6, 2026

Thanks for the quick release! ❤️

Oh I see, you're now registering the driver from the VK_DRIVER_FILES:

- name: Register Driver in Registry (using VK_DRIVER_FILES env var)
if: contains(matrix.config.OS, 'windows')
shell: pwsh
run: |
reg add "HKLM\SOFTWARE\Khronos\Vulkan\Drivers" /v "$env:VK_DRIVER_FILES" /t REG_DWORD /d 0 /f

Curiousity: In rust-gpu's pipeline we just set the VK_DRIVER_FILES env and never register it in the registry, and it works anyway for swiftshader. haven't gotten it to work for lavapipe. But your pipeline clearly failed without the extra registration step. Could it be that this only works in bash or something?

@jakoch
Copy link
Owner

jakoch commented Jan 6, 2026

Yes, this is still a required "external step" when using the action.
Just setting VK_DRIVER_FILES up didnt work for me, so i switched to the normal registry approach.

In the manual VK_DRIVER_FILES is in the section "Overriding the Default Driver Discovery".
So it should work as "override".... nice to hear that it does for Swiftshader.
Referencing: https://vulkan.lunarg.com/doc/view/latest/mac/LoaderDriverInterface.html#driver-discovery

But your pipeline clearly failed without the extra registration step. Could it be that this only works in bash or something?

Maybe i should disable the registry step and try to get it working with VK_DRIVER_FILES only...
i'll open an extra issue to track this: #547

Firestar99 added a commit to Rust-GPU/rust-gpu that referenced this pull request Jan 7, 2026
the action exports `VK_DRIVER_FILES` on its own now: jakoch/install-vulkan-sdk-action#545
Firestar99 added a commit to Rust-GPU/rust-gpu that referenced this pull request Jan 7, 2026
the action exports `VK_DRIVER_FILES` on its own now: jakoch/install-vulkan-sdk-action#545
github-merge-queue bot pushed a commit to Rust-GPU/rust-gpu that referenced this pull request Jan 7, 2026
the action exports `VK_DRIVER_FILES` on its own now: jakoch/install-vulkan-sdk-action#545
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.

3 participants