Windows 11 / RX 9070 XT: second device removal (~8 min in world) after e5b0dc8 raw-twin fix #5

Open
opened 2026-11-27 17:30:46 +00:00 by JulienReppert · 2 comments
JulienReppert commented 2026-11-27 17:30:46 +00:00 (Migrated from github.com)
Contributor

Imported from Slaktarn700/SlaktarnVI. Originally posted by JulienReppert on 2026-11-27T17:30:46Z.


Follow-up to #1. With e5b0dc8 applied the raw-twin crash is gone — the log confirms raw twins not made from their own dword: Windows' D3D12 removes the device for a raw view off 16 bytes — and the title now reaches the world at 25 fps. A different device removal still happens about 8 minutes in.

System

  • Windows 11 build 26100, RX 9070 XT 16 GB (device 0x7550, RDNA4), Adrenalin 32.0.32029.2010
  • Intel i5-14600KF, 32 GB RAM
  • Rust 1.98.1 MSVC, cargo build --locked --profile diag -p victory --features diagnostics --bins, commit e5b0dc8
  • victory.toml paths outside the repo; own copy of the title v1.0.2.1

Run
scripts\play.ps1 -Exe <title>\game_scarlett_master.exe with -More @{VICTORY_D3D12_DEBUG='1'; VICTORY_D3D12_DRED='1'} (the debug layer is not installed here: no D3D12 debug layer ... 0x887A002D, but DRED breadcrumbs/markers are on).

  • ~3 min startup, then world at 25 fps / 19.1 GB working set
  • last healthy frames: 39.2 fps, 25.5 ms/frame (... 8.5 on the GPU ...), 440 draws/frame; then 17.4 fps, 57.5 ms/frame, 1410 draws/frame, dropped 197 without a host pipeline (54 being made)
  • crash at ~597 s (17:20:07 UTC)

Failure

VIctory: host GPU failure: host GPU device removed after 1 submissions sent ahead
(VICTORY_RELAY=1) of 17 lists; breadcrumbs ...; 1 of 2 commands completed, last at index 0
(op 46); ... 122 of 188 commands completed, the first uncompleted is command 122 (op 5)
of "victory host list 791" ... command 118 (op 5): indirect kind 0 max 1 ...
[vertex afa451a901c0aa53, pixel b00e9c5ddc9b19f6] ... depth 2560x1440 f19

Root-signature tables in the DRED report:

5741294cf872ffb9 Sampler s3+0: ImmediateSampler
5741294cf872ffb9 Srv s0+760: 2560x1440 f61 flags 0x5 of 0x1ab4f8c7be0
5741294cf872ffb9 Srv s0+992: 2560x1440 f41 flags 0x4 of 0x1ab4f8c6ec0
5741294cf872ffb9 Cbv s0+1424: Constant(0xd6943fd10, 544)
5741294cf872ffb9 Srv s1+0: placed uav=false dim 1 288x1 f0 layout 0x1 at 0x2e70db60
5741294cf872ffb9 Uav s1+8: uav texture 160x90 f61 flags 0x4 of 0x1ab4f8b0f00

GetDeviceRemovedReason = 0x887A0001 (DXGI_ERROR_INVALID_CALL). No TDR or display-driver error in the Windows event log.

Notes

  • Before pulling e5b0dc8, every run lost the device in 49–102 s (ours: 173–185 s). I tried VICTORY_PIPELINE_WORKERS=1, VICTORY_LIBRARY_MAP=0, VICTORY_WAIT_RESIDENT=0, all VICTORY_PORT_*=0, 1920x1080 + 30 fps, a bare valhalla run, and compiler-crash guards; none helped. With the fix applied the run survives ~8× longer and reaches the world.
  • This failure is later and has a different DRED signature, so it looks like a second Windows/D3D12 validation issue rather than the raw-twin one.
  • Happy to install Graphics Tools to get the debug layer's exact message, or run a capture with any switch you suggest. Full log: slaktarn-monitor2.err (28k lines); I can paste any section needed.
<!-- greyfinch-sync:Slaktarn700/SlaktarnVI:issue:6651593087 --> Imported from [Slaktarn700/SlaktarnVI](https://github.com/Slaktarn700/SlaktarnVI/issues/5). Originally posted by [JulienReppert](https://github.com/JulienReppert) on 2026-11-27T17:30:46Z. --- Follow-up to #1. With `e5b0dc8` applied the raw-twin crash is gone — the log confirms `raw twins not made from their own dword: Windows' D3D12 removes the device for a raw view off 16 bytes` — and the title now reaches the world at **25 fps**. A **different** device removal still happens about 8 minutes in. **System** - Windows 11 build 26100, RX 9070 XT 16 GB (device `0x7550`, RDNA4), Adrenalin 32.0.32029.2010 - Intel i5-14600KF, 32 GB RAM - Rust 1.98.1 MSVC, `cargo build --locked --profile diag -p victory --features diagnostics --bins`, commit `e5b0dc8` - `victory.toml` paths outside the repo; own copy of the title v1.0.2.1 **Run** `scripts\play.ps1 -Exe <title>\game_scarlett_master.exe` with `-More @{VICTORY_D3D12_DEBUG='1'; VICTORY_D3D12_DRED='1'}` (the debug layer is not installed here: `no D3D12 debug layer ... 0x887A002D`, but DRED breadcrumbs/markers are on). - ~3 min startup, then world at **25 fps / 19.1 GB working set** - last healthy frames: `39.2 fps, 25.5 ms/frame (... 8.5 on the GPU ...), 440 draws/frame`; then `17.4 fps, 57.5 ms/frame, 1410 draws/frame, dropped 197 without a host pipeline (54 being made)` - crash at ~597 s (17:20:07 UTC) **Failure** ``` VIctory: host GPU failure: host GPU device removed after 1 submissions sent ahead (VICTORY_RELAY=1) of 17 lists; breadcrumbs ...; 1 of 2 commands completed, last at index 0 (op 46); ... 122 of 188 commands completed, the first uncompleted is command 122 (op 5) of "victory host list 791" ... command 118 (op 5): indirect kind 0 max 1 ... [vertex afa451a901c0aa53, pixel b00e9c5ddc9b19f6] ... depth 2560x1440 f19 ``` Root-signature tables in the DRED report: ``` 5741294cf872ffb9 Sampler s3+0: ImmediateSampler 5741294cf872ffb9 Srv s0+760: 2560x1440 f61 flags 0x5 of 0x1ab4f8c7be0 5741294cf872ffb9 Srv s0+992: 2560x1440 f41 flags 0x4 of 0x1ab4f8c6ec0 5741294cf872ffb9 Cbv s0+1424: Constant(0xd6943fd10, 544) 5741294cf872ffb9 Srv s1+0: placed uav=false dim 1 288x1 f0 layout 0x1 at 0x2e70db60 5741294cf872ffb9 Uav s1+8: uav texture 160x90 f61 flags 0x4 of 0x1ab4f8b0f00 ``` `GetDeviceRemovedReason` = `0x887A0001` (DXGI_ERROR_INVALID_CALL). No TDR or display-driver error in the Windows event log. **Notes** - Before pulling `e5b0dc8`, every run lost the device in 49–102 s (ours: 173–185 s). I tried `VICTORY_PIPELINE_WORKERS=1`, `VICTORY_LIBRARY_MAP=0`, `VICTORY_WAIT_RESIDENT=0`, all `VICTORY_PORT_*=0`, 1920x1080 + 30 fps, a bare `valhalla run`, and compiler-crash guards; none helped. With the fix applied the run survives ~8× longer and reaches the world. - This failure is later and has a different DRED signature, so it looks like a second Windows/D3D12 validation issue rather than the raw-twin one. - Happy to install Graphics Tools to get the debug layer's exact message, or run a capture with any switch you suggest. Full log: `slaktarn-monitor2.err` (28k lines); I can paste any section needed.
JulienReppert commented 2026-11-27 19:39:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Slaktarn700/SlaktarnVI. Originally posted by JulienReppert on 2026-11-27T19:39:33Z.


Found and fixed the second device removal locally. It is the same bug class as the raw-twin fix in 4f6a3758, in a different path.

Root cause: constant_at() in crates/victory-gpu/src/descriptor/host.rs made a raw SRV twin of a constant-buffer view with FirstElement = (gpu - buffer_base) / 4 and no 16-byte alignment check. Windows D3D12 removes the device for a raw SRV whose FirstElement is not a multiple of 4; vkd3d/Proton tolerates it.

Bisect on e5b0dc8 (diag build, RX 9070 XT, Windows 11 26100):

Configuration Result
All VICTORY_PORT_* off survived 604 s, world at 37 fps / 20.9 GB
VICTORY_PORT_CONSTANTS=1 only device removed at 444 s
PORT_CONSTANTS=1 + patch below survived 603 s, world at 46 fps / 20 GB
Default play.ps1 (all ports on) + patch survived 601 s, world at 38 fps / 19.7 GB, no device failure

So VICTORY_PORT_CONSTANTS was the remaining trigger.

Patch:

-        let twin = self.twin(index).filter(|_| desc.SizeInBytes > 0);
+        let base = unsafe { buffer.GetGPUVirtualAddress() };
+        let aligned = gpu.checked_sub(base).is_some_and(|offset| offset % 16 == 0);
+        let twin = self.twin(index).filter(|_| desc.SizeInBytes > 0 && aligned);
         if let Some(twin) = twin {
-            let first = (gpu - unsafe { buffer.GetGPUVirtualAddress() }) / 4;
+            let first = (gpu - base) / 4;

Un-aligned CBVs get no raw twin (translated shaders read zeros there) instead of removing the device.

After the patch the game stays in the world past 10 minutes at 38 fps with default settings. Happy to send a PR if useful.

<!-- greyfinch-sync:Slaktarn700/SlaktarnVI:comment:7226744246 --> Imported from [Slaktarn700/SlaktarnVI](https://github.com/Slaktarn700/SlaktarnVI/issues/5#issuecomment-7226744246). Originally posted by [JulienReppert](https://github.com/JulienReppert) on 2026-11-27T19:39:33Z. --- Found and fixed the second device removal locally. It is the same bug class as the raw-twin fix in `4f6a3758`, in a different path. **Root cause:** `constant_at()` in `crates/victory-gpu/src/descriptor/host.rs` made a raw SRV twin of a constant-buffer view with `FirstElement = (gpu - buffer_base) / 4` and no 16-byte alignment check. Windows D3D12 removes the device for a raw SRV whose `FirstElement` is not a multiple of 4; vkd3d/Proton tolerates it. **Bisect on `e5b0dc8`** (diag build, RX 9070 XT, Windows 11 26100): | Configuration | Result | |---|---| | All `VICTORY_PORT_*` off | survived 604 s, world at 37 fps / 20.9 GB | | `VICTORY_PORT_CONSTANTS=1` only | device removed at 444 s | | `PORT_CONSTANTS=1` + patch below | survived 603 s, world at 46 fps / 20 GB | | Default `play.ps1` (all ports on) + patch | survived 601 s, world at **38 fps / 19.7 GB**, no device failure | So `VICTORY_PORT_CONSTANTS` was the remaining trigger. **Patch:** ```diff - let twin = self.twin(index).filter(|_| desc.SizeInBytes > 0); + let base = unsafe { buffer.GetGPUVirtualAddress() }; + let aligned = gpu.checked_sub(base).is_some_and(|offset| offset % 16 == 0); + let twin = self.twin(index).filter(|_| desc.SizeInBytes > 0 && aligned); if let Some(twin) = twin { - let first = (gpu - unsafe { buffer.GetGPUVirtualAddress() }) / 4; + let first = (gpu - base) / 4; ``` Un-aligned CBVs get no raw twin (translated shaders read zeros there) instead of removing the device. After the patch the game stays in the world past 10 minutes at 38 fps with default settings. Happy to send a PR if useful.
Slaktarn700 commented 2026-11-29 11:17:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Slaktarn700/SlaktarnVI. Originally posted by Slaktarn700 on 2026-11-29T11:17:46Z.


Thank you for the bisect and the patch. It is in my working copy; I only have Linux, so your test is the proof. Not published yet.

<!-- greyfinch-sync:Slaktarn700/SlaktarnVI:comment:7255013646 --> Imported from [Slaktarn700/SlaktarnVI](https://github.com/Slaktarn700/SlaktarnVI/issues/5#issuecomment-7255013646). Originally posted by [Slaktarn700](https://github.com/Slaktarn700) on 2026-11-29T11:17:46Z. --- Thank you for the bisect and the patch. It is in my working copy; I only have Linux, so your test is the proof. Not published yet.
Sign in to join this conversation.
No labels
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.

Reference
Slaktarn700/SlaktarnVI#5
No description provided.