[PR #976] [MERGED] Fix the Intel HD 520/530 crash at Vulkan device creation (wgpu-hal patch) #2958

Closed
opened 2026-11-02 16:00:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/976
Author: @ludovic111
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @ludovic111

Base: main ← Head: fix/wgpu-hal-empty-descriptor-pool


📝 Commits (2)

  • 79f78f9 Vendor wgpu-hal 30.0.1 unchanged (examples left out)
  • 4992d87 Fix the Intel HD 520/530 crash at device creation (#746)

📊 Changes

80 files changed (+53663 additions, -3 deletions)

View changed files

📝 Cargo.lock (+0 -2)
📝 Cargo.toml (+9 -1)
📝 THIRD_PARTY_NOTICES.md (+7 -0)
➕ third_party/wgpu-hal/Cargo.toml (+529 -0)
➕ third_party/wgpu-hal/LICENSE.APACHE (+176 -0)
➕ third_party/wgpu-hal/LICENSE.MIT (+21 -0)
➕ third_party/wgpu-hal/README.md (+119 -0)
➕ third_party/wgpu-hal/build.rs (+36 -0)
➕ third_party/wgpu-hal/src/auxil/dxgi/conv.rs (+301 -0)
➕ third_party/wgpu-hal/src/auxil/dxgi/exception.rs (+97 -0)
➕ third_party/wgpu-hal/src/auxil/dxgi/factory.rs (+181 -0)
➕ third_party/wgpu-hal/src/auxil/dxgi/hdr.rs (+352 -0)
➕ third_party/wgpu-hal/src/auxil/dxgi/mod.rs (+16 -0)
➕ third_party/wgpu-hal/src/auxil/dxgi/name.rs (+24 -0)
➕ third_party/wgpu-hal/src/auxil/dxgi/result.rs (+28 -0)
➕ third_party/wgpu-hal/src/auxil/dxgi/time.rs (+97 -0)
➕ third_party/wgpu-hal/src/auxil/mod.rs (+241 -0)
➕ third_party/wgpu-hal/src/auxil/renderdoc.rs (+141 -0)
➕ third_party/wgpu-hal/src/dx12/adapter.rs (+1546 -0)
➕ third_party/wgpu-hal/src/dx12/command.rs (+1868 -0)

...and 60 more files

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

Fixes the startup crash on Intel HD 520 / HD 530 (and other 6th-10th gen Intel iGPUs) on Windows with Vulkan: exit code 0xc0000005 right after Horizon renderer: Intel(R) HD Graphics 5x0 (Vulkan, IntegratedGpu), with no crash report.

Why

It's a wgpu 30 bug, gfx-rs/wgpu#9845. While it creates the device, wgpu 30 creates a Vulkan descriptor pool with no pool sizes (poolSizeCount == 0). Vulkan only allows that since 1.3.215, and Intel's legacy Windows driver (igvk64.dll, the last driver line for Skylake through Comet Lake) crashes on it inside vkCreateDescriptorPool, called from request_device. That matches #746:

  • The crash comes right after the adapter line: request_device is the next step.
  • It isn't a panic.
  • Vanilla's Vulkan renderer works on the same machine, since only wgpu 30 does this.
  • Updating the driver doesn't help: zoid.zip's 31.0.101.2115 crashes too, and other wgpu apps report it up to 31.0.101.2145.

The upstream fix, gfx-rs/wgpu#10124 (merged 2026-09-03), adds a single sampler entry when the pool would otherwise be empty. No wgpu release has it yet: 30.0.1 is the latest, and the v30 branch hasn't taken it. Other wgpu apps with this crash on HD 520 / UHD 630 vendored wgpu-hal with the same patch and confirmed that Vulkan then starts (e.g. CyberAshven/pickaxe-miner#30).

How

  • Commit 1: third_party/wgpu-hal is wgpu-hal 30.0.1 from crates.io, unchanged, without its examples, lock file or VCS metadata. Review it with git show --stat.
  • Commit 2: applies #10124 (11 lines in src/vulkan/descriptor.rs). It also adds [patch.crates-io] wgpu-hal = { path = "third_party/wgpu-hal" }, excludes the folder from the workspace (it keeps its own lints, and fmt/clippy don't cover it), and adds a THIRD_PARTY_NOTICES entry. The only Cargo.lock change is wgpu-hal's source line. Drop the folder and the patch once a wgpu release has the fix (comment in Cargo.toml).

git diff origin/main --stat -- . ':!third_party': Cargo.toml +9/-1, Cargo.lock -2, THIRD_PARTY_NOTICES.md +7 (rebased on 21ac62a0).

How tested

  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings: clean.
  • Windows: cargo check --target x86_64-pc-windows-msvc -p horizon-client --no-default-features --bin horizon-client on the Mac mini checks the vendored crate and the client for Windows. It uses stub libc headers for ring and wasmtime's C files, and no MSVC SDK, which is why the default features (hidapi) are left out. Clean.
  • The vendored copy builds and renders identically on Metal: tools/parity.py terrain weather_render world_border_render cloud_render gave 4 passed. --changed selects all 323 harnesses because Cargo.toml changed, but the only code change is in a Vulkan-only function, so the GPU-facing harnesses are the ones worth running.
  • The crash itself can't be reproduced here: no Windows machine with a Gen9 iGPU. The release that includes this needs a test from mrpatitas (HD 530) or zoid.zip (HD 520). The orchestrator asks them on Discord.

Fixes #746

Needs Ludovic

Nothing to decide. Two follow-ups on top, also for #746: per-step startup logging, and a DirectX 12 fallback on Windows.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/976 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/wgpu-hal-empty-descriptor-pool` --- ### 📝 Commits (2) - [`79f78f9`](https://github.com/horizon-rust/horizon/commit/79f78f904b6f70b04cca03efca49d73050449792) Vendor wgpu-hal 30.0.1 unchanged (examples left out) - [`4992d87`](https://github.com/horizon-rust/horizon/commit/4992d877c752e824f5611f1c36cfd4ac1e0530ea) Fix the Intel HD 520/530 crash at device creation (#746) ### 📊 Changes **80 files changed** (+53663 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+0 -2) 📝 `Cargo.toml` (+9 -1) 📝 `THIRD_PARTY_NOTICES.md` (+7 -0) ➕ `third_party/wgpu-hal/Cargo.toml` (+529 -0) ➕ `third_party/wgpu-hal/LICENSE.APACHE` (+176 -0) ➕ `third_party/wgpu-hal/LICENSE.MIT` (+21 -0) ➕ `third_party/wgpu-hal/README.md` (+119 -0) ➕ `third_party/wgpu-hal/build.rs` (+36 -0) ➕ `third_party/wgpu-hal/src/auxil/dxgi/conv.rs` (+301 -0) ➕ `third_party/wgpu-hal/src/auxil/dxgi/exception.rs` (+97 -0) ➕ `third_party/wgpu-hal/src/auxil/dxgi/factory.rs` (+181 -0) ➕ `third_party/wgpu-hal/src/auxil/dxgi/hdr.rs` (+352 -0) ➕ `third_party/wgpu-hal/src/auxil/dxgi/mod.rs` (+16 -0) ➕ `third_party/wgpu-hal/src/auxil/dxgi/name.rs` (+24 -0) ➕ `third_party/wgpu-hal/src/auxil/dxgi/result.rs` (+28 -0) ➕ `third_party/wgpu-hal/src/auxil/dxgi/time.rs` (+97 -0) ➕ `third_party/wgpu-hal/src/auxil/mod.rs` (+241 -0) ➕ `third_party/wgpu-hal/src/auxil/renderdoc.rs` (+141 -0) ➕ `third_party/wgpu-hal/src/dx12/adapter.rs` (+1546 -0) ➕ `third_party/wgpu-hal/src/dx12/command.rs` (+1868 -0) _...and 60 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Fixes the startup crash on Intel HD 520 / HD 530 (and other 6th-10th gen Intel iGPUs) on Windows with Vulkan: exit code `0xc0000005` right after `Horizon renderer: Intel(R) HD Graphics 5x0 (Vulkan, IntegratedGpu)`, with no crash report. ## Why It's a wgpu 30 bug, [gfx-rs/wgpu#9845](https://github.com/gfx-rs/wgpu/issues/9845). While it creates the device, wgpu 30 creates a Vulkan descriptor pool with **no pool sizes** (`poolSizeCount == 0`). Vulkan only allows that since 1.3.215, and Intel's legacy Windows driver (`igvk64.dll`, the last driver line for Skylake through Comet Lake) crashes on it inside `vkCreateDescriptorPool`, called from `request_device`. That matches #746: - The crash comes right after the adapter line: `request_device` is the next step. - It isn't a panic. - Vanilla's Vulkan renderer works on the same machine, since only wgpu 30 does this. - Updating the driver doesn't help: zoid.zip's 31.0.101.2115 crashes too, and other wgpu apps report it up to 31.0.101.2145. The upstream fix, [gfx-rs/wgpu#10124](https://github.com/gfx-rs/wgpu/pull/10124) (merged 2026-09-03), adds a single sampler entry when the pool would otherwise be empty. No wgpu release has it yet: 30.0.1 is the latest, and the `v30` branch hasn't taken it. Other wgpu apps with this crash on HD 520 / UHD 630 vendored wgpu-hal with the same patch and confirmed that Vulkan then starts (e.g. CyberAshven/pickaxe-miner#30). ## How - **Commit 1:** `third_party/wgpu-hal` is wgpu-hal 30.0.1 from crates.io, unchanged, without its examples, lock file or VCS metadata. Review it with `git show --stat`. - **Commit 2:** applies #10124 (11 lines in `src/vulkan/descriptor.rs`). It also adds `[patch.crates-io] wgpu-hal = { path = "third_party/wgpu-hal" }`, excludes the folder from the workspace (it keeps its own lints, and fmt/clippy don't cover it), and adds a THIRD_PARTY_NOTICES entry. The only `Cargo.lock` change is wgpu-hal's source line. Drop the folder and the patch once a wgpu release has the fix (comment in `Cargo.toml`). `git diff origin/main --stat -- . ':!third_party'`: Cargo.toml +9/-1, Cargo.lock -2, THIRD_PARTY_NOTICES.md +7 (rebased on 21ac62a0). ## How tested - `cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets -- -D warnings`: clean. - Windows: `cargo check --target x86_64-pc-windows-msvc -p horizon-client --no-default-features --bin horizon-client` on the Mac mini checks the vendored crate and the client for Windows. It uses stub libc headers for ring and wasmtime's C files, and no MSVC SDK, which is why the default features (hidapi) are left out. Clean. - The vendored copy builds and renders identically on Metal: `tools/parity.py terrain weather_render world_border_render cloud_render` gave 4 passed. `--changed` selects all 323 harnesses because Cargo.toml changed, but the only code change is in a Vulkan-only function, so the GPU-facing harnesses are the ones worth running. - The crash itself can't be reproduced here: no Windows machine with a Gen9 iGPU. The release that includes this needs a test from mrpatitas (HD 530) or zoid.zip (HD 520). The orchestrator asks them on Discord. Fixes #746 ## Needs Ludovic Nothing to decide. Two follow-ups on top, also for #746: per-step startup logging, and a DirectX 12 fallback on Windows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:00:25 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2958
No description provided.