fix: preserve point mips for anisotropic heap samplers #326
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!326
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-326"
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?
@mauroalvare on GitHub · 2026-11-26 03:21 UTC · original
mauroalvare:codex/victory-anisotropic-point-mips→main· +308 −10 · 4 files · 1 commits · openChange
Neptune's
CreateSamplerXmaterializer usedD3D12_FILTER_ANISOTROPIC(0x55) for every anisotropic heap sampler. In a two-level texture, a sampler that requested point mip selection therefore returned a blend of both levels.Use
D3D12_OPTIONS19to checkAnisoFilterWithPointMipSupportedonce for the host device. Choose0x54for point mip selection when supported, including the sampler's reduction bits.0x55supplies linear mips and the compatibility fallback for devices that lack the optional filter. This exercises theView::ConsoleSamplerpath in the Neptune D3D12 backend built bytools/lancer_victory.ps1. DirectX capability specificationThe implementation adapts Flare's heap sampler change to Neptune and adds a texture sampling readback. The commit trailer and
THIRD_PARTY.mdrecord the source and licence. VIctory source commitVerification
Base
c4c93bdc413191a9dc909998d2d53080a3f0c880and fix44fd0b5228d4c5500f297b0de11c6eb05d9bf9f6. To reproduce the base, addanisotropic_sampler_tests.rsand its#[cfg(test)]module declaration from this PR to the base revision. Run fromthird_party/victory. LeaveVICTORY_D3D12_WARPunset for NVIDIA or set it to1for WARP.[0.06640726, 0.94140536][0.0, 1.0][0.06640726, 0.94140536][0.25, 0.75][0.0, 1.0][0.25, 0.75]Both adapters reported
OPTIONS19=trueandaniso_point_mip=true. On each adapter the base failed the point-sampling assertion and the fix passed with no skips. The differing linear blend weights also occur with the native control. The GPU test checks that its local control blends and uses it as the fallback oracle.cargo test --locked --offline -p victory-gpu --lib --features diagnostics sampler::tests:: -- --test-threads=1reported 2 passed.cargo test --locked --offline -p victory-gpu --lib --features diagnostics -- --test-threads=1reported 198 passed, 3 failed, 3 ignored. The matchingmainbaseline had 196 passed, 3 failed, 3 ignored. The same assertions failed inspans_say_the_next_start_and_the_lowest_level_viewed,warp_card_fetch_copies_flagged_pieces_to_their_slots, andwarp_card_patch_writes_the_masked_bytes_and_no_others.cargo test --locked --offline -p victory-loader --test load_probereported 2 passed.cargo build --locked --offline --release -p victorypassed.cargo xtask policyreportedasset policy: 200 files ok.cargo build --release --locked --offline --manifest-path rust/Cargo.tomlpassed.cargo test --release --locked --offline --manifest-path rust/Cargo.tomlreported 12 passed in total.python -m ruff check --select W605,F,E9 PrototypeScarlett tests toolsreportedAll checks passed!.python -m pytest -rswithANYXBOXX_REQUIRE_RUNTIME=1on Python 3.13.15 reported1665 passed in 336.77s (0:05:36)with no skips.Oracle and test data
The fixture clears the mip levels of a synthetic 2×2 texture to 0 and 1. One compute thread samples both the console heap sampler and a native D3D12 anisotropic linear-mip control at explicit LODs 0.25 and 0.75, then writes the results to a UAV. The point result must select the two uniform levels. The CPU test also exercises the filter mapping for a simulated unsupported device and for each reduction mode.
Checklist
AI assistance was used for investigation, implementation, and verification with OpenAI Codex.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.