Windows: raw twins off 16 bytes only under Wine (fixes device removed, #1) #2
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
reviewed
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Slaktarn700--SlaktarnVI!2
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Gabriel-Ramaldes on GitHub · 2026-11-27 15:54 UTC · original
Gabriel-Ramaldes:windows-raw-twins→main· +20 −2 · 1 files · 1 commits · merged 2026-11-27 16:02 UTCFixes #1.
What fails on Windows
Every run on Windows lost the device 49 to 102 s in, with
no host list for a state prelude; device removed ... (0x887A0001). That is the error in #1, and it happened with every preset I tried.The "no host list" part only follows from the removal. A run with
VICTORY_D3D12_DEBUG=1names the call that causes it:That view is an exact raw twin (
twin_exact,by % 4 == 0,FirstElement = first + by / 4). vkd3d-proton accepts a raw view on any dword, which is why the fork runs under Proton. Windows' own D3D12 runtime treats it as an illegal call and removes the device.Change
twin_exact()is now on only under Wine (shadow::on_wine()). On Windows the twin goes the way it went before the exact twins:move_rawif it can, otherwise a null view. One info line in the log says so. Nothing changes under Proton.On Windows, trees may drop out for single frames where the exact twins fixed that under Proton. That trade is better than losing the device. A later change could give Windows exact twins another way, for example by moving more of them through
move_raw.Tested
The scripted runs pressed Enter at 56 s, with the host pad hidden.
scripts\play.ps1as shipped.42b2226-S7042b2226-S70, frame generation off42b222642b2226VICTORY_D3D12_DEBUG=142b2226-Safe42b2226VICTORY_PORT_*=042b2226VICTORY_TWIN_EXACT=00x887A000xin the log-S70(FSR + frame generation)cargo test --locked -p victory-gpu --features diagnostics descriptor: 63 passed.I did not test this under Proton. The code there takes the same path as before (
asked && wine).🤖 Generated with Claude Code
The exact raw twins (VICTORY_TWIN_EXACT, on by default) make a raw SRV or UAV whose FirstElement is not a multiple of 4. vkd3d-proton takes it; Windows' own D3D12 does not: the debug layer reports "When creating a RAW Shader Resource View, the offset of the first element from the start of the buffer must be a multiple of 16 bytes. Thus, FirstElement (27890541) must be a multiple of 4", then removes the device with DXGI_ERROR_INVALID_CALL ("no host list for a state prelude", #1). On Windows the twin now goes the way it went before the exact twins (move_raw, else a null view). Under Wine nothing changes. RX 9070 XT, Ryzen 7 3700X, Windows 11 26300, Adrenalin 32.0.32029, diag: - before: device lost 49-102 s in, every run (default, -Safe, -S70, -S70 without frame generation, the default with the ports off); - VICTORY_TWIN_EXACT=0 on the old build: 300 s, no loss; - this change, no switches: default 300 s and -S70 300 s, no loss, no 0x887A000x in the log. cargo test -p victory-gpu --features diagnostics descriptor: 63 passed. Co-Authored-By: Claude Opus 5.5 <[email protected]>