victory-shader: lower v_cvt_f32_f64 and image_sample_d_cl #978
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!978
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/978/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?
@bartikele on GitHub · 2026-11-24 14:37 UTC · original
bartikele:shader-cvt-f64-and-sample-d-cl→main· +87 −2 · 3 files · 5 commits · closed without mergingAdds DXIL lowering for two missing GFX10 instructions:
Verified with \cargo clippy -p victory-shader --all-targets --locked -- -D warnings, \cargo test -p victory-shader --locked, \cargo xtask policy, and \ictory translate --validate.
@Aniseto on GitHub · 2026-11-24 14:39 UTC · original
Ran the new lowering test at
c8c117a:Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.emit::lower::tests::v_cvt_f32_f64_lowers_with_double_flagpasses. This is a CPU-side lowering test, so the adapter is not the variable; the datapoint is the pinned 1.98.1 toolchain with DXC 1.9.2609.5 next to the author's run.image_sample_d_clhas no test in this diff, so I could not exercise it without the title's shaders (no game data here). I also did not run the title: the README warns that entering the world on a real GPU can hang the adapter.Not tested:
image_sample_d_cllowering, the world on a real GPU, RDNA2/RDNA4 and Intel GPUs.AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the test, wrote this report; no game data was used.
@MichaelSmithAI on GitHub · 2026-11-24 14:52 UTC · original
On
c8c117a, a live register-pair conversion failed Microsoft DXV with a shader-flag mismatch. Double precision uses bit 2 in DXIL entry-point metadata and bit 0 in SFI0. With the metadata fixed, nine f64→f32 values matched on RTX 4090 under Wine/vkd3d-proton 3.2. A separate inline 1.0 case then exposed an operand-decoding issue. Four immediate cases passed with both corrections. Fix and regression test on this branchThe 32-bit-coordinate image_sample_d_cl path also passed a separate source-built check. Its emitted shader validated and matched an independently compiled DXC SampleGrad reference across 32 lanes, with 16 values from mip 0 and 16 from mip 1. This measures the PC lowering. A16 coordinates, console clamp behavior, and game rendering remain open.
@Zipettte on GitHub · 2026-11-24 14:54 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
c8c117a:cargo test -p victory-shaderpasses, 121 passed / 0 failed, includingv_cvt_f32_f64_lowers_with_double_flag. Workspace baseline on main (ffe310e) was green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 00:29 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #416. image_sample_d_cl is in main. v_cvt_f32_f64 (makeDouble + fptrunc) is the same lowering as #416 (other batch), which adds abs/neg and a GPU test; main has no f64 at all yet.
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