Shaders: add SQ_IMG_SAMP LOD-bias and no-mip range tests for emit/sampler.rs #1195
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!1195
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1195/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?
@geiyiliyabumo on GitHub · 2026-11-24 16:23 UTC · original
geiyiliyabumo:test/shader-sampler→main· +32 −0 · 1 files · 1 commits · merged 2026-11-25 21:50 UTCSummary
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.
@Aniseto on GitHub · 2026-11-24 16:59 UTC · original
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.
@Zipettte on GitHub · 2026-11-24 18:00 UTC · original
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).
@Marvisak on GitHub · 2026-11-25 01:18 UTC · original · edited 2026-11-25 07:21 UTC
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
@geiyiliyabumo on GitHub · 2026-11-25 02:16 UTC · original
Rebased cleanly onto \main\ (\
ccfb029), updated anisotropic filter expectations for mip-point (\@geiyiliyabumo on GitHub · 2026-11-25 03:53 UTC · original
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.