gpu, shader: Intel Arc DG2/Battlemage optimizations and hardware execution fallbacks #1066
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!1066
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1066/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?
@UnkwnDev on GitHub · 2026-11-24 15:27 UTC · original
UnkwnDev:arc-optimizations→main· +836 −70 · 7 files · 4 commits · closed without mergingResolves #740
Summary
Hardware execution fallbacks and shader optimizations targeting Intel Arc DG2 and Battlemage architectures.
Changes
@UnkwnDev on GitHub · 2026-11-24 18:30 UTC · original
Rebased cleanly onto main at
ffe310e. Conflicts in crates/victory-shader/src/emit/valu_tests.rs have been resolved to preserve our Wave32 simulation and packed dot product tests alongside the waterfall/EXEC tests from #566, including synchronizing dispatch tests under ONE_AT_A_TIME. All workspace tests and clippy checks (--all-targets, with and without --all-features) pass cleanly.Regarding the split: if separating the victory-shader changes from the Windows-only victory-gpu compaction pass makes review and testing on macOS easier, let me know and I can extract the shader commits into a separate PR.
@UnkwnDev on GitHub · 2026-11-24 18:51 UTC · original
Updated branch at
dc1aa37following a self-review pass:Re-verified with cargo clippy --workspace --all-targets --locked -- -D warnings, --all-features, and full cargo test --workspace --locked (all tests passing, including new VOP2 dot2c, integer clamp, and opsel hardware tests).
@DeerSilver on GitHub · 2026-11-24 23:06 UTC · original
Tested on an Intel Xe-LP iGPU (not Arc) and an NVIDIA card. Setup: one laptop with an NVIDIA GeForce RTX 5060 Laptop GPU (Blackwell,
10de:2d59, driver 621.24) and an Intel UHD Graphics (Raptor Lake Xe-LP,8086:a788, driver 32.0.101.7088), Windows 11 26300, Rust 1.98.1. The PR was merged ontomainffe310e.cargo test --workspace --all-features --locked --no-fail-fast -- --test-threads=1with the D3D12 debug layer on (VICTORY_D3D12_DEBUG=1, and a local, uncommitted change that also turns the debug layer on in victory-shader's testHost): 350 passed, 0 failed, 6 ignored. The four new tests passed in that run, which used the default adapter, the RTX.cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features: cleanvictory-shader's lib tests on each adapter (
cargo test --locked -p victory-shader --lib -- --test-threads=1, with a local switch that creates the testHoston a chosen DXGI adapter and prints its name):mainv_med3_f32_matches_rdna2_with_nan)main+ this PRThe PR's NaN bit test fixes
v_med3_f32on the Intel UHD. The failure with the PR is the newwave32_simulation_and_reduction_executes_cleanly:The debug layer gives the reason:
This Xe-LP reports a maximum of 16 lanes, so a shader with a fixed wave size of 32 can't be created there. The test skips WARP on a
compute_pipelineerror but panics for hardware. CheckingD3D12_FEATURE_DATA_D3D12_OPTIONS1.WaveLaneCountMin/Maxand skipping when 32 is out of range would fix that. I don't know whether Arc reports the same 16-lane maximum; it's worth checking, since the PR targets Arc.No game data used. AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 00:31 UTC · original
Automated triage for the maintainers. Closing because by our reading the change is incorrect or would break something that works today.
A release environment variable (VICTORY_WAVE_SIZE_MAX) makes console wave64 programs that depend on lane order declare WaveSize(32) and simulates their whole-wave sections at 32 lanes, with no emulation and outside the shader cache key: wrong results where it is used. Its other parts exist elsewhere (v_dot4* in main, the med3 NaN test is #1689) or are unrelated (indirect stream compaction against a rewritten indirect.rs).
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