Repository navigation
Conversation
Replace implicit D3D12CreateDevice(None, ...) with explicit DXGI adapter selection via IDXGIFactory6::EnumAdapterByGpuPreference(HIGH_PERFORMANCE) (with IDXGIFactory1::EnumAdapters1 fallback), skipping software adapters by default while preserving diagnostics VICTORY_D3D12_WARP software validation. Add optional VICTORY_D3D12_ADAPTER override supporting either a 0-based hardware adapter index or a case-insensitive description substring match. Probe and store host D3D12 capabilities on Host in HostCaps (adapter description, vendor/device IDs, dedicated VRAM, Options 0/1/5/7/9/11, and highest supported shader model), log a single concise startup summary, expose capability getters on Host (including supports_wave64, wave_lane_count_max, supports_atomic_int64_typed, and resource_binding_tier), and add unit tests covering adapter filter parsing/matching, capability helpers, and WARP device capability probing.
|
I ran this PR under Proton on Linux. I used only synthetic Host: Arch Linux (kernel 7.2), single GPU: RTX 2060 SUPER, NVIDIA 615.78.08. Runtime: UMU-Proton 11.0-2e ( Test suite
The PR results were the same in 4 runs (3 with one test thread, 1 with parallel threads). The 3 failures are the ones Adapter selection under vkd3d-protonThe tests don't log the startup summary, so I added a temporary The probed caps make sense for Turing on vkd3d-proton. The shader model probe steps down past 6.9 and lands on 6.8, which is what vkd3d-proton reports. Wave lanes are 32..32, so
So the index and the case-insensitive substring match both work. An override that matches nothing is a hard failure, not a fallback to the default adapter. That looks intentional given the WARP under ProtonDXVK's Not coveredThis machine has only one GPU, so I couldn't check high-performance ordering across iGPU and dGPU, or a hybrid laptop setup. I also didn't do a title run. |
|
Thanks @SkippySteve for testing on Proton/vkd3d-proton! Updated the PR description to clarify that a non-matching `VICTORY_D3D12_ADAPTER` value returns a hard device-creation error (listing available adapters) rather than falling back to the default adapter. |
|
Test report on Tested
Note: Not tested: AMD, Wine, a desktop with one GPU, the title. Details: #1232. AI use: Claude Code (Claude Opus 5.5) merged and built the trees, ran the title on my machine and drafted this note; results are from the runs described. |
|
A second hybrid laptop, adding to the report above. The default choice is the same, and this run also covers the Host: Windows 11 build 26300, i5-11400H laptop with Intel UHD Graphics (Tiger Lake, driver 31.0.101.5333) and an NVIDIA GeForce RTX 3050 Laptop GPU (driver 610.91). Build: eb72359 cherry-picked onto
Adapter selectionI checked this with a temporary local test that calls
In a Startup summaries ( Notes
No game data used. AI-assisted (Claude Code). |
… & shader ops - Prefer high-performance discrete GPU via IDXGIFactory6::EnumAdapterByGpuPreference and VICTORY_ADAPTER (index or name substring) in victory-gpu and victory-shader (Marvisak#208/Marvisak#1132) - Cap shader-visible sampler heaps at D3D12's 2,048 architectural limit instead of failing heap creation (Marvisak#100/Marvisak#86) - Fall back to the in-memory translated shader if shader-cache disk write fails (Marvisak#358) - Add F11 / Alt+Enter borderless fullscreen toggle and clean WM_CLOSE handling to both title windows (lifecycle.rs) and VIctory's fallback window (host.rs); clamp fit_into() dimensions to >= 1 (Marvisak#451) - Enhance PC keyboard+mouse fallback gamepad with Space/LShift/R/LCtrl aliases, LMB/RMB/MMB triggers, and RMB/F9 mouse camera look; support null-device cross-device previous/next reading walk (Marvisak#361) - Fall back to a no-op display deferral when PowerSetRequest returns ERROR_NOT_SUPPORTED - Clamp short virtual-drive '..' paths at the virtual drive root (Marvisak#182) - Wake and cancel sleeping delayed callbacks immediately on XTaskQueueTerminate (Marvisak#132) - Cache XMA IMDCT rotation sin/cos tables across subframes (Marvisak#172) - Lower additional RDNA2 VALU instructions (v_mul_hi_{u,i}32_{u,i}24, v_mad_{u,i}32_{u,i}16, v_lerp_u8, v_sad_u{8,16,32}, v_cvt_pk_{u,i}16_{u,i}32, v_dot{2,4}_{i,u}32_{i,u}{16,8}) with DXIL validation and conditional INT64 feature flagging (Marvisak#157) - Add portable victory.toml lookup next to victory.exe, interactive [S] Setup wizard and [K] Controls guide in victory.exe, and scripts/build-windows.ps1 release packager Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…erlaps with the GPU bundles Marvisak#189 (wave64 on 32-lane hosts) and the GPU bundles Marvisak#1426 and Marvisak#1439 overlap in three places: - host.rs, where the host is built: Marvisak#208 (Marvisak#1426) logs the capabilities summary, Marvisak#189 chooses the Wave64 mode. Both lines are kept. - host.rs, after the device helpers: Marvisak#208's adapter and capability probe and Marvisak#189's recommended_wave64_mode are two new functions at the same spot. Both are kept. - shader_cache.rs: Marvisak#189 prefixes the translation input with a mode byte (input[33..]), Marvisak#358 (Marvisak#1439) records that a translation ran (self.translated). Both are kept; the two tests of Marvisak#358 that call cached() pass Wave64Mode::Native, as Marvisak#189's own tests do. cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean and cargo test --workspace --locked passes (725 passed, 11 ignored, two runs). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Closing because another open pull request covers the same change. See #967. Same goal as #967 (choose a hardware adapter instead of the default) in 642 lines inside host.rs with a block of unused capability accessors. 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. |
Summary
D3D12CreateDevice(None, ...)with explicit DXGI adapter selection viaIDXGIFactory6::EnumAdapterByGpuPreference(DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE)(falling back toIDXGIFactory1::EnumAdapters1whenIDXGIFactory6is unavailable).DXGI_ADAPTER_FLAG_SOFTWARE) by default while preservingVICTORY_D3D12_WARPsoftware validation underdiagnostics.VICTORY_D3D12_ADAPTERoverride (0-based hardware adapter index or case-insensitive description substring match). Note: a non-matchingVICTORY_D3D12_ADAPTERvalue returns a hard device-creation error (listing available adapters in the error/log) rather than silently falling back to the default adapter.HostCaps(adapter metadata, Options 0/1/5/7/9/11, downwardSHADER_MODELprobe), logs a concise startup summary, and exposes capability getters onHost(caps,mesh_shaders,supports_wave64,wave_lane_count_max,supports_atomic_int64_typed,resource_binding_tier).Verification
cargo clippy --workspace --all-targets— passedcargo clippy -p victory --features diagnostics --all-targets— passedcargo test --workspace— passed (50 passed, 1 ignored invictory-gpu)cargo xtask policy— passed (151 files ok)