Intel host support (CLWB/CLZERO/MONITORX/SSE4a emulation) + GPU hang on NVIDIA at the language screen #85

Open
opened 2026-11-26 03:49:41 +00:00 by github-bot · 1 comment
Owner

@⁠tadymila on GitHub · 2026-11-24 00:21 UTC · original

Setup

  • CPU: Intel Core i7-9700F (Coffee Lake, no CLWB/CLZERO/MONITORX/SSE4a)
  • GPU: NVIDIA GeForce RTX 5070 Ti, Windows 11
  • VIctory: main as of 2026-11-23, release build

1. Intel CPUs: missing Zen 2 instructions (patch attached)

The title faults with 0xC000001D on instructions Intel lacks. I added a vectored handler in victory-loader (cpucompat.rs, installed from report_crashes(), ahead of the crash reporter):

Instruction Sites hit (RVA) Handling
CLWB m8 0x4ecc84a, 0x4e4b680, 0x532f1b0/1f0/230 rewritten once to CLFLUSHOPT (or DS:CLFLUSH)
CLZERO 0x4e8aa70 (zeroing loop) emulated; the clzero/add/cmp/jb loop runs in one go
MONITORX / MWAITX 0x4fb0bd7 / 0x4fb0c00 rewritten once to 3-byte NOP / PAUSE; NOP
INSERTQ (SSE4a, imm form) 0x2e7ff1, 0x455bac7 site patched to jmp into a near stub (shifts on rax/rcx, flags saved); EXTRQ too

Unhandled illegal instructions are logged with their bytes. The INSERTQ/EXTRQ stubs were checked natively against a reference for every len/idx. With this, the title boots to the language screen at 30 fps on the i7-9700F.

2. NVIDIA: GPU hang (TDR) at the language screen

With VICTORY_D3D12_DEBUG=1 + VICTORY_D3D12_DRED=1 (diag build):

  • DXGI_ERROR_DEVICE_HUNG, list stopped at command 60 of 90 (op 4), commands 59..87 between barriers, no markers
  • preceded by slow host submission ms=508..534
  • pipelines in the hung submission (both runs): compute 052a2316a03b9ba1, vertex 0602c2384acbb3b2/pixel a78d088fa55aa495, vertex 58d926085fca4999/pixel edc1cad8ffb79bc9, vertex dfafaf385b2f94e8/pixel 06295fb1d1aefb78
  • still hangs with TdrDelay=10, so it looks like a non-terminating loop rather than a slow shader. My guess is wave64-dependent code running with 32-lane waves on NVIDIA.

Other warnings on NVIDIA:

  • host view heap capped at 1000000 ... count=1245184
  • no host texture: 2560x1440 format 86 (B5G5R5A1) flags 5 (RT|UAV), and format 115 (B4G4R4A4) flags 1 (RT); these are unsupported RT/UAV formats on NVIDIA.
  • WARP (VICTORY_D3D12_WARP=1) also fails: 0x887A0005 after ~35 s, before the language screen.

Happy to run any test build.

**@⁠tadymila** on GitHub · 2026-11-24 00:21 UTC · [original](https://github.com/Marvisak/VIctory/issues/85) ### Setup - CPU: Intel Core i7-9700F (Coffee Lake, no CLWB/CLZERO/MONITORX/SSE4a) - GPU: NVIDIA GeForce RTX 5070 Ti, Windows 11 - VIctory: main as of 2026-11-23, release build ### 1. Intel CPUs: missing Zen 2 instructions (patch attached) The title faults with `0xC000001D` on instructions Intel lacks. I added a vectored handler in `victory-loader` (`cpucompat.rs`, installed from `report_crashes()`, ahead of the crash reporter): | Instruction | Sites hit (RVA) | Handling | |---|---|---| | `CLWB m8` | 0x4ecc84a, 0x4e4b680, 0x532f1b0/1f0/230 | rewritten once to `CLFLUSHOPT` (or DS:`CLFLUSH`) | | `CLZERO` | 0x4e8aa70 (zeroing loop) | emulated; the `clzero/add/cmp/jb` loop runs in one go | | `MONITORX` / `MWAITX` | 0x4fb0bd7 / 0x4fb0c00 | rewritten once to 3-byte NOP / `PAUSE; NOP` | | `INSERTQ` (SSE4a, imm form) | 0x2e7ff1, 0x455bac7 | site patched to `jmp` into a near stub (shifts on rax/rcx, flags saved); `EXTRQ` too | Unhandled illegal instructions are logged with their bytes. The INSERTQ/EXTRQ stubs were checked natively against a reference for every len/idx. With this, the title boots to the language screen at 30 fps on the i7-9700F. ### 2. NVIDIA: GPU hang (TDR) at the language screen With `VICTORY_D3D12_DEBUG=1` + `VICTORY_D3D12_DRED=1` (diag build): - `DXGI_ERROR_DEVICE_HUNG`, list stopped at command 60 of 90 (op 4), commands 59..87 between barriers, no markers - preceded by `slow host submission ms=508..534` - pipelines in the hung submission (both runs): `compute 052a2316a03b9ba1`, `vertex 0602c2384acbb3b2/pixel a78d088fa55aa495`, `vertex 58d926085fca4999/pixel edc1cad8ffb79bc9`, `vertex dfafaf385b2f94e8/pixel 06295fb1d1aefb78` - still hangs with `TdrDelay=10`, so it looks like a non-terminating loop rather than a slow shader. My guess is wave64-dependent code running with 32-lane waves on NVIDIA. Other warnings on NVIDIA: - `host view heap capped at 1000000 ... count=1245184` - `no host texture`: 2560x1440 `format 86` (B5G5R5A1) flags 5 (RT|UAV), and `format 115` (B4G4R4A4) flags 1 (RT); these are unsupported RT/UAV formats on NVIDIA. - WARP (`VICTORY_D3D12_WARP=1`) also fails: `0x887A0005` after ~35 s, before the language screen. Happy to run any test build.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:49:41 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:46 UTC · original

Automated triage for the maintainers.

Thank you for the detailed report. Part 1 is now handled on main: the loader's vectored handler emulate_amd_only in crates/victory-loader/src/crash.rs emulates clzero (including the zeroing loop, see clzero), monitorx/mwaitx, rdpru, SSE4a insertq/extrq (sse4a) and clwb (including write-back loops, clwb_loop). The AMD-only set came with #10 (d348b9a) and clwb with #45 (7d33c46, merged 2026-11-24 00:30 UTC, after this report). Could you try current main without your local handler and say whether any 0xc000001d remains (crash reports now show the refused instruction's bytes)? The illegal-instruction crashes are tracked in #102.

Part 2 (device hung on NVIDIA, wave64 suspected) belongs to the NVIDIA hang discussion in #71: on main, wave64 compute programs that depend on the lane layout declare WaveSize(64) and are refused on 32-lane hosts. A note of the VIctory commit and the driver version would help when you rerun.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:46 UTC · [original](https://github.com/Marvisak/VIctory/issues/85#issuecomment-7149949471) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T00:21:18Z at=2026-11-25T01:48:10Z --> Automated triage for the maintainers. Thank you for the detailed report. Part 1 is now handled on `main`: the loader's vectored handler `emulate_amd_only` in `crates/victory-loader/src/crash.rs` emulates `clzero` (including the zeroing loop, see `clzero`), `monitorx`/`mwaitx`, `rdpru`, SSE4a `insertq`/`extrq` (`sse4a`) and `clwb` (including write-back loops, `clwb_loop`). The AMD-only set came with #10 (`d348b9a`) and `clwb` with #45 (`7d33c46`, merged 2026-11-24 00:30 UTC, after this report). Could you try current `main` without your local handler and say whether any `0xc000001d` remains (crash reports now show the refused instruction's bytes)? The illegal-instruction crashes are tracked in #102. Part 2 (device hung on NVIDIA, wave64 suspected) belongs to the NVIDIA hang discussion in #71: on `main`, wave64 compute programs that depend on the lane layout declare `WaveSize(64)` and are refused on 32-lane hosts. A note of the VIctory commit and the driver version would help when you rerun. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No milestone
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
github/Marvisak--VIctory#85
No description provided.