vulkan(vk-hle-bridge): the staging-wrap unit test skips without a Vulkan driver #3081

Closed
leonida/mandy
madhavhaldia wants to merge 0 commits from fix/vk-uploads-test-skips-without-driver into feat/vulkan-rs

Pull request closed

This pull request cannot be reopened because the branch was deleted.

madhavhaldia commented 2026-12-02 10:22:36 +00:00

Claimed in the coordination issue as: VKRS-UPLOADS-TEST-NO-DRIVER (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7342337270)

What and why

This targets feat/vulkan-rs, because the code it fixes is not in main yet.

sparse_bridge::uploads::tests::staging_wrap_latches_overflow_for_subsequent_chunks_until_reclaimed is a unit test under src/ that creates a real Vulkan instance and device with .expect(...). The workflow's CPU step runs the workspace tests with VK_ICD_FILENAMES=/nonexistent, and there the test panics:

instance: Vk { call: "vkCreateInstance", result: ERROR_INCOMPATIBLE_DRIVER }

So that step is red at the branch head (5eaa0ca05). It is the only device-backed test under src/ in this crate; the GPU tests under tests/ already print SKIP and return when there is no driver.

The test now does the same: when the instance or the device cannot be created it prints SKIP: … and returns. With a driver it runs as before, and every assertion after device creation is untouched.

Tested

  • VK_ICD_FILENAMES=/nonexistent cargo test --locked -p vk-hle-bridge --lib: 9 passed and 1 failed (the panic above) before, 10 passed after.
  • The same command with the real driver: the test runs (no SKIP) and passes.
  • cargo clippy --locked -p vk-hle-bridge --all-targets -- -D warnings, and again with --target x86_64-pc-windows-gnu: clean.

GPUs tested: NVIDIA GeForce RTX 3090, driver 620.73.04, CachyOS Linux (kernel 7.3.6)

AI-assisted: yes. Claude Fable 5.2 wrote it and a separate read-only reviewer agent checked it.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase). Not applicable as written: it is based on feat/vulkan-rs at 5eaa0ca05 and merges cleanly there.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. Not applicable: no translator change.

🤖 Generated with Claude Code

Claimed in the coordination issue as: `VKRS-UPLOADS-TEST-NO-DRIVER` (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7342337270) ### What and why This targets `feat/vulkan-rs`, because the code it fixes is not in `main` yet. `sparse_bridge::uploads::tests::staging_wrap_latches_overflow_for_subsequent_chunks_until_reclaimed` is a unit test under `src/` that creates a real Vulkan instance and device with `.expect(...)`. The workflow's CPU step runs the workspace tests with `VK_ICD_FILENAMES=/nonexistent`, and there the test panics: ``` instance: Vk { call: "vkCreateInstance", result: ERROR_INCOMPATIBLE_DRIVER } ``` So that step is red at the branch head (`5eaa0ca05`). It is the only device-backed test under `src/` in this crate; the GPU tests under `tests/` already print `SKIP` and return when there is no driver. The test now does the same: when the instance or the device cannot be created it prints `SKIP: …` and returns. With a driver it runs as before, and every assertion after device creation is untouched. ### Tested - `VK_ICD_FILENAMES=/nonexistent cargo test --locked -p vk-hle-bridge --lib`: 9 passed and 1 failed (the panic above) before, 10 passed after. - The same command with the real driver: the test runs (no SKIP) and passes. - `cargo clippy --locked -p vk-hle-bridge --all-targets -- -D warnings`, and again with `--target x86_64-pc-windows-gnu`: clean. GPUs tested: NVIDIA GeForce RTX 3090, driver 620.73.04, CachyOS Linux (kernel 7.3.6) AI-assisted: yes. Claude Fable 5.2 wrote it and a separate read-only reviewer agent checked it. ### Checklist - [ ] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). Not applicable as written: it is based on `feat/vulkan-rs` at `5eaa0ca05` and merges cleanly there. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. Not applicable: no translator change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Kal0s-design commented 2026-12-02 10:40:39 +00:00

A native Windows run, since the description's run was on Linux. Windows 11, MSVC, Rust 1.100.0, head 01df9ea3d on feat/vulkan-rs 5eaa0ca05.

  • With the Vulkan driver, cargo test --locked -p vk-hle-bridge --lib -- --nocapture: 10 passed, and no SKIP printed, so the staging-wrap test ran on the device.
  • With no driver (VK_ICD_FILENAMES=/nonexistent, plus VK_DRIVER_FILES=/nonexistent for newer loaders): 10 passed. The test prints SKIP: VulkanInstance unavailable: Vulkan call vkCreateInstance failed: ERROR_INCOMPATIBLE_DRIVER and returns.
  • Red. With uploads.rs from feat/vulkan-rs, the same no-driver run gives 9 passed and 1 failed. It panics at uploads.rs:684 with instance: Vk { call: "vkCreateInstance", result: ERROR_INCOMPATIBLE_DRIVER }, the same message as in the description.
  • cargo clippy --locked -p vk-hle-bridge --all-targets: no warning in uploads.rs.

So the Windows loader honours the override the same way, and the fix behaves the same on both sides.

GPUs tested: one NVIDIA desktop card (Vulkan), and no driver.

AI-assisted: yes (Claude Code).

A native Windows run, since the description's run was on Linux. Windows 11, MSVC, Rust 1.100.0, head `01df9ea3d` on `feat/vulkan-rs` `5eaa0ca05`. - With the Vulkan driver, `cargo test --locked -p vk-hle-bridge --lib -- --nocapture`: 10 passed, and no `SKIP` printed, so the staging-wrap test ran on the device. - With no driver (`VK_ICD_FILENAMES=/nonexistent`, plus `VK_DRIVER_FILES=/nonexistent` for newer loaders): 10 passed. The test prints `SKIP: VulkanInstance unavailable: Vulkan call vkCreateInstance failed: ERROR_INCOMPATIBLE_DRIVER` and returns. - **Red.** With `uploads.rs` from `feat/vulkan-rs`, the same no-driver run gives 9 passed and 1 failed. It panics at `uploads.rs:684` with `instance: Vk { call: "vkCreateInstance", result: ERROR_INCOMPATIBLE_DRIVER }`, the same message as in the description. - `cargo clippy --locked -p vk-hle-bridge --all-targets`: no warning in `uploads.rs`. So the Windows loader honours the override the same way, and the fix behaves the same on both sides. GPUs tested: one NVIDIA desktop card (Vulkan), and no driver. AI-assisted: yes (Claude Code).
Sign in to join this conversation.
No description provided.