Skip to content

Respect Direct3D 12 limits and add Preload and Play - #47

Closed
Castyan wants to merge 10 commits into
DexNom:mainfrom
Castyan:d3d12-checked-shader-preload
Closed

Castyan wants to merge 10 commits into
DexNom:mainfrom
Castyan:d3d12-checked-shader-preload

Conversation

@Castyan

@Castyan Castyan commented Nov 25, 2026

Copy link
Copy Markdown

Summary

Builds on #16 at 6da1f12. Please review the follow-up commit 395478f once #16 lands.

  • Respect the reported D3D12 shader-visible view heap limit before trying a larger allocation. Older runtimes still probe the larger size on Resource Binding Tier 3. The portable fallback is one million view descriptors.
  • Check Shader Model 6.6 on the same D3D12 device the runtime uses before scanning archives for compute pipeline preload.
  • Add victory-warm.exe --play and a Preload and Play Start menu shortcut. The game starts after a successful scan. Both phases share adapter settings, cache, launcher lock, and log. The console shows scan progress.

Verification

  • Windows x64 release diagnostics build, launcher unit tests, and the simulated descriptor limits test passed.
  • Launcher workflow checks verified that a successful preload runs before the game, while an empty scan or a child-process failure leaves the game unstarted. The real launcher also rejected an empty setup on RTX 5060.
  • On RTX 5060, Direct3D 12 reported Resource Binding Tier 3 with a maximum of 1,000,000 shader-visible view descriptors, and the runtime used that limit. A bounded warmup of 52 local compute shader containers translated 49 and created 47 compute pipelines. The full archive timing pass was stopped after more than 22,000 cache entries, so there is no full-archive timing or gameplay result for this branch.

The preload caches supported translations and compute pipelines. Graphics PSOs still need live draw state, and shader requirements such as wave64 on a wave32 card remain subject to the adapter's limits.

@Castyan

Castyan commented Nov 25, 2026

Copy link
Copy Markdown
Author

Full Preload and Play test on RTX 5060

I built this PR at 8c53afb with the pixel diagnostic from #50 at 456e242 applied. The release build used the same D3D12 adapter for both phases, an isolated empty cache, and a copy of the save data. The visible console followed the shared log.

Run Translated shaders Translation refusals Compute pipelines created Compute pipeline refusals Time
Previous #47 run 25,745 13 2,699 32 587 s
#47 plus #50 25,745 13 2,699 32 735 s

The combined scan exited with code 0 and automatically started the game. It passed 22,000 shaders at 160 s and 24,000 at 721 s. The log continued recording compute work between those milestones. The ten pixel translation refusals now report POPS. The remaining three translation refusals are compute shaders.

The game exited after 7 min 34 s at frame 1508 during intro Prestream. Seven workers reached 0x80000003 at +0x5149aec. The title reported INSTANCE_LIST at 45,000/45,000 and BUILDING at 22,160/22,500. The game phase contained no D3D12 device removal and no mention of the ten POPS hashes. The report identifies the same breakpoint signature as the upstream tracking issue. Upstream issue #698

@Castyan

Castyan commented Nov 25, 2026

Copy link
Copy Markdown
Author

Follow-up with live preload counters on RTX 5060

I used the local gameplay integration 00b26e5 with the #47 launcher, #50 at 33c05ba, and the new progress output. The run started with a cold isolated cache on the 32-lane RTX 5060.

Elapsed Shaders checked Translated Compute pipelines
150 s 22,005 21,995 627
300 s 22,431 22,421 1,053
630 s 23,937 23,927 2,539
653 s 25,758 25,745 2,699

The intermediate counters showed work during the long interval after 22,000. The final summary reported 13 translation refusals, including all ten POPS pixel shaders, and 32 compute pipeline refusals. Preload exited with code 0 and started the game automatically.

15887af adds this progress output to the PR, including the checked and translated shader counts and compute pipeline count. The Windows x64 release build and launcher test passed. The launcher test verifies that a progress line cannot satisfy the requirement for a successful final summary. Progress commit

The game confirmed the 500 ms base pipeline wait. The window was closed after about 6 min 15 s. The game exited with code 0 after its suspend timed out. No 0x80000003 or D3D12 device removal appeared in this run. The earlier crash happened at 7 min 34 s, beyond this run's observation window. Earlier run · POPS follow-up

@Castyan
Castyan marked this pull request as ready for review November 25, 2026 22:34
@Castyan

Castyan commented Nov 26, 2026

Copy link
Copy Markdown
Author

I pushed the RTX 5060 preload report in 9048631. The warm rerun with #35, #47 and #50 translated 25,758 shaders with zero translation refusals in 83 s. It reported 2,704 compute pipelines and 30 pipeline refusals.

The separate multi-wave draft builds on Marvisak#2214 and creates 24 of those 30 pipelines in isolation. The six remaining cases and their hashes are in the report. The comparison covers DXIL validation and D3D12 pipeline creation. #40 is related work on the automatic wave-wide fallback.

@Castyan

Castyan commented Nov 26, 2026

Copy link
Copy Markdown
Author

Superseded by #61, which combines #47 and #50 on current main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant