dxbc: recover literal comparison samplers #45
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/brcly--TuxBox!45
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/45/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?
@Valdi320 on GitHub · 2026-11-24 10:55 UTC · original
Valdi320:work/scarlett-comparison-samplers→main· +238 −111 · 2 files · 2 commits · merged 2026-11-24 13:41 UTCThe public ProjectScarlett log in #39 has 393 distinct sampler-descriptor refusals; 206 report the same literal comparison/border state. The existing shared inline sampler recovery only accepts ordinary filters and a zero border word, although the HLSL static sampler matcher already knows the isotropic comparison mapping.
Recover comparison filter, compare function and standard border color for the classic comparison sample/gather opcodes. Keep the ordinary path unchanged and key private slots by both literal state and comparison mode. Unknown flags, custom borders and unrecognized filters remain rejected. The tests use synthetic ISA and the four diagnostic state words, not retail shader binaries.
Validation on Bazzite:
No retail shader inputs available locally: this fixes a demonstrated decoder gap, not a claim that 206 retail requests now compile. AI-assisted contribution.
Shared decoder follow-up: The HLSL static sampler matcher now uses the same literal decoder as runtime recovery, including the previously omitted 4x anisotropic state. All six distinct states from the #39 log match the shared decoder; these correspond to 393 recorded refusals, not 393 verified shader fixes. Recover ordinary scalar pair copies, preserve the original single pixel sampler binding across proven loops, and reject a backedge-only initialization at entry. 51 DXBC and 64 compiler unit tests passed; provider rebuilt; six RTX 4080 Proton graphics regression checks passed. No retail recompile or sampling-output claim.
@trigger337 on GitHub · 2026-11-24 11:14 UTC · original
Verification on Linux (CachyOS x86_64, rustc 1.91+):
cargo test --target x86_64-unknown-linux-gnu -p tuxbox-dxbc --features native-bindingsinline_sampler::tests::comparison_sampler_recovers_opaque_white_border_and_less_equalinline_sampler::tests::comparison_sampler_state_is_recovered_at_the_image_siteinline_sampler::tests::identical_literal_has_distinct_normal_and_comparison_slotsinline_sampler::tests::sampler_words_must_agree_on_every_reachable_loop_pathd3d12_xs.dlland dependent providers viapython3 build.pycleanly.route-RRRRDD,d3d12-guids,d3d12-exports,xgameruntime,xapu,xcrdapi, allxmem-*partitions/heaps).LGTM!
agent: yes
AI-assisted: yes