Repository navigation
Windows 10: opt-in D3D12 Agility SDK for shader model 6.6 - #467
Closed
blazerTweaks wants to merge 1 commit into
Closed
blazerTweaks wants to merge 1 commit into
blazerTweaks wants to merge 1 commit into
Conversation
Windows 10's own D3D12 runtime stops at shader model 6.5, so the root signatures translated shaders need (heaps directly indexed) are refused, nothing draws and the title crashes shortly after its first screens. - feature `agility` on victory: exports D3D12SDKVersion/D3D12SDKPath (build.rs adds the /EXPORT link args) so D3D12 loads D3D12\D3D12Core.dll next to victory.exe. Opt-in because an exe with these exports and no DLL gets D3D12_ERROR_INVALID_REDIST for every device, Windows 11 included. - `cargo xtask agility`: downloads Microsoft.Direct3D.D3D12 1.620.2 from nuget.org with Windows' curl and tar and copies the runtime to target/<profile>/D3D12/. Nothing binary enters the repository. - the host device logs an error naming the fix when the runtime lacks shader model 6.6, and when the Agility DLL is missing. Tested on Windows 10 19045 with an RTX 3060 Ti: menus, intro and loading now run, and the title reaches the world. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Windows 10's own D3D12 runtime stops at shader model 6.5. The root signatures translated shaders need (
CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED) are refused:Nothing draws, and about 20 s in the title crashes with an access violation (
read 0x68).victory translate --pipelinesreportsthe device supports SM 0x65 only. That happens even on hardware that supports SM 6.6 (an RTX 3060 Ti on a current driver here). The README lists Windows 10 as supported.Change
agilityonvictory. It exportsD3D12SDKVersion(620) andD3D12SDKPath(.\D3D12\);build.rsadds the/EXPORTlink args. D3D12 then loadsD3D12\D3D12Core.dllfrom next tovictory.exe.D3D12_ERROR_INVALID_REDIST(0x887E0003) for every device. That applies on Windows 11 too, and there is no fallback to the system runtime.cargo xtask agility. It downloadsMicrosoft.Direct3D.D3D121.620.2 from nuget.org (using Windows' owncurlandtar, so no new dependencies) intotarget/agility/. It then copiesD3D12Core.dllandd3d12SDKLayers.dlltotarget/<profile>/D3D12/for every built profile.cargo xtask policypasses.agilitybuild cannot find the DLL.Usage on Windows 10:
Testing
On Windows 10 19045 with an RTX 3060 Ti (driver 32.0.16.1714):
ERROR ... lacks shader model 6.6 ... build victory with --features agility(model 0x65)agility, no DLLERROR ... D3D12\D3D12Core.dll is not next to it: run cargo xtask agilityagility+cargo xtask agilitycargo clippyadds no new warnings.cargo test --workspace: 8 tests fail with and without this change on Windows 10, so they predate it:victory-hlenet::tests::only_loopback_is_reachable:WinHttpGetProxySettingsExis a Windows 11 export.victory-shaderemit::valu_tests: these need an SM 6.6 device, and the test executables don't carry the Agility exports.On this machine loading takes about 4 minutes instead of about 50 s. Entering the world then hangs the GPU; that is a separate issue (NVIDIA's 1,000,000-view heap cap), reported with the DRED report.
🤖 Generated with Claude Code