GPU: load the DirectX 12 Agility SDK, and map the console's packed 16… #968
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!968
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/968/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?
@bailu12300 on GitHub · 2026-11-24 14:35 UTC · original
bailu12300:win10-agility-sdk-and-packed-formats→main· +39 −0 · 3 files · 1 commits · closed without merging…-bit colour targets
Export D3D12SDKVersion/D3D12SDKPath and link them into the binary's export table (build.rs), so the D3D12 runtime loads D3D12Core.dll from ./D3D12/ instead of the in-box copy. Windows 10's 19041 runtime refuses the title's 0xC01 root signatures (CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED | ALLOW_INPUT_ASSEMBLER), which cost every pipeline: drawn=0, no pipeline ever created, and a 0xC0000005 fault about 5 s in. With Agility 1.614 the same host builds the full pipeline set and holds 30 fps through the account picker, the startup art and the legal notice.
pc_format: map 86 (B5G5R5A1_UNORM) and 115 (B4G4R4A4_UNORM) to R8G8B8A8_UNORM. Both are render targets on the console but take no unordered access (86) and no render target at all (115) on the host, so the title's UI composition targets failed to create ("no host texture error 0x80070057", format: 86 and 115) and the whole UI layer drew nothing. Their 8-bit RGBA stand-in is a superset of both in range, so a target that only carries colour through the pipeline loses nothing but the packing.
Verified on Windows 10 Pro 19045, RTX 5060 8 GB, title 1.0.2.1: no host texture count 0, menus at 30 fps, and the prologue title card renders.
- Export D3D12SDKVersion/D3D12SDKPath and link them into the binary's export table (build.rs), so the D3D12 runtime loads D3D12Core.dll from ./D3D12/ instead of the in-box copy. Windows 10's 19041 runtime refuses the title's 0xC01 root signatures (CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED | ALLOW_INPUT_ASSEMBLER), which cost every pipeline: drawn=0, no pipeline ever created, and a 0xC0000005 fault about 5 s in. With Agility 1.614 the same host builds the full pipeline set and holds 30 fps through the account picker, the startup art and the legal notice. - pc_format: map 86 (B5G5R5A1_UNORM) and 115 (B4G4R4A4_UNORM) to R8G8B8A8_UNORM. Both are render targets on the console but take no unordered access (86) and no render target at all (115) on the host, so the title's UI composition targets failed to create ("no host texture error 0x80070057", format: 86 and 115) and the whole UI layer drew nothing. Their 8-bit RGBA stand-in is a superset of both in range, so a target that only carries colour through the pipeline loses nothing but the packing. Verified on Windows 10 Pro 19045, RTX 5060 8 GB, title 1.0.2.1: no host texture count 0, menus at 30 fps, and the prologue title card renders.@Zipettte on GitHub · 2026-11-24 15:13 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
3411406:cargo test -p victory -p victory-gpupasses, 51 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@giusepperainone on GitHub · 2026-11-24 15:34 UTC · original
Test report on a second NVIDIA card and Windows 11 (no Agility folder present).
Setup: Windows 11 Pro 26200, RTX 4060 Ti (driver 32.0.16.1088), Rust 1.98.1, diagnostics build of
ffe310evsffe310e+ this PR (3411406, fast-forward). The same automated run on both: start, sit on the account screen for 70 s with fixed captured frames, close the window.Host support, queried with
CheckFeatureSupport/CreateCommittedResourceon this GPU:B5G5R5A1_UNORME_INVALIDARG)B4G4R4A4_UNORMWARP takes both formats with every use, so these failures are hardware-specific.
Packed 16-bit textures the title creates up to the account screen (logged locally in
host_texture): three, all render targets, none title-written:Results:
ffe310eno host textureffe310eD3D12\folder beside the exeThe identical frames are expected on this screen; the targets matter later (#797).
One concern:
pc_formatmaps 86 and 115 toR8G8B8A8_UNORMfor every texture, not only for the uses the host refuses. A sampled (title-written) 86/115 texture would then get a 4-byte-per-texel host copy, whileStaging::detilewrites the console's 2-byte texels into the host footprint pitch (texture.rs,staging/detile), so its contents would come out wrong. None appeared on these screens, so this run can't show it either way, but the substitution may be safer only where the host refuses the format for the requested flags (e.g. checked once withD3D12_FEATURE_FORMAT_SUPPORT), leaving sampled textures and hosts that support the formats (WARP, and possibly AMD) on the native format.@giusepperainone on GitHub · 2026-11-24 15:51 UTC · original
Follow-up to my test report above: with this PR on the same machine (RTX 4060 Ti, Windows 11), the prologue cutscene is still black (audio and credits only), matching the #89 results on RTX 3060 / 4070 SUPER in #797. So these two targets are not what keeps it black; my earlier note that they "matter later (#797)" was wrong on that point. The
no host texturefailures are still gone (0 vs 2).@Marvisak on GitHub · 2026-11-25 00:28 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #463. Two unrelated changes in one PR: an unconditional Agility SDK export through a new build.rs and a
static mut(same goal as #463, which only opts in when the DLL is there), and a blanket mapping of console formats 86 and 115 to RGBA8 in victory-gpu, which changes texel size for every use and is done conditionally by #89/#581.If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed