Shaders: add SQ_IMG_SAMP LOD-bias and no-mip range tests for emit/sampler.rs #1195
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1195"
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?
Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T16:23:48Z.
Summary
Closes #1018
Full verification details and change notes are documented in #1018 (commit
ed1d9c7, based onmainffe310e).Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --checkon edited files: PASScargo xtask policy: PASS (zero game files/data)cargo clippy --all-targets --locked -- -D warnings(default +--features diagnosticswhere applicable): PASSAI-assisted; synthetic tests only, no game files.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T16:27:25Z.
Review: APPROVED
Tested head
ed1d9c7(fast-forward onmainffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):cargo test -p victory-shader sampler: 6 passed, 0 failedcargo clippy -p victory-shader --all-targets: 0 warningscargo xtask policy: okClean synthetic unit test coverage for
emit/sampler.rsdecoding paths. Approving.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Aniseto on 2026-11-24T16:59:46Z.
Ran the
emit::samplertests ated1d9c7: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.All six pass here: the eight address-mode encodings, anisotropy clamping plus comparison sampling, filters, reductions and border colours, the console-compiled sampler case, the signed 14-bit fixed-point LOD bias extremes, and the no-mip LOD range rule. This is a test-only PR, so the adapter is not the variable; the datapoint is the pinned 1.98.1 toolchain. No test report on it yet.
Not tested: a title using these samplers (no game data here), 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 tests, wrote this report; no game data was used.
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:00:22Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
ed1d9c7:cargo test -p victory-shaderpasses, 125 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:18:19Z.
Automated triage for the maintainers.
Merge candidate (small). Update after your changes: the table-copy tests have been dropped. Two tests are left in
crates/victory-shader/src/emit/sampler.rs.mip_lod_bias_decodes_signed_14bit_fixed_point_extremeschecks the sign extension of the 14-bit, 8-fraction-bitLOD_BIASfield at its boundaries (0x1FFF,0x2000,0x3FFF). That is independent of the decoder's tables, and the existing tests do not cover it.no_mip_filter_forces_zero_lod_range_and_non_zero_preserves_itpartly overlapshost_filter_falls_back_without_changing_reduction_or_lod, which already checks the zero LOD range for mip filter 0, but it adds the linear-mip case. It is test-only and merges cleanly.CI: passing (
check).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-25T02:16:26Z.
Rebased cleanly onto \main\ (\
ccfb029), updated anisotropic filter expectations for mip-point (\[PR #1195] Shaders: expand synthetic unit tests for emit/sampler.rsto [PR #1195] Shaders: add SQ_IMG_SAMP LOD-bias and no-mip range tests for emit/sampler.rsImported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T03:56:30Z.
Review: APPROVED
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main
940d32f69b,cargo test -p victory-shader --locked.149 passed / 0 failed / 2 ignored. Synthetic unit tests expanded for emit/sampler.rs (+5 tests) — sampler-emit coverage; good.
Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-25T03:53:06Z.
Updated per triage feedback: dropped the three table-copy tests and kept only the two independent \SQ_IMG_SAMP\ layout tests (\mip_lod_bias_decodes_signed_14bit_fixed_point_extremes\ and
o_mip_filter_forces_zero_lod_range_and_non_zero_preserves_it). Rebased onto \main\ (\
940d32f); \cargo test -p victory-shader --locked emit::sampler::tests\ (6 passed, 0 failed), \cargo clippy -p victory-shader --all-targets --locked -- -D warnings, and \cargo xtask policy\ all pass.