Shaders: support static samplers in image_get_lod #1775
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1775
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1775/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?
@Flyander on GitHub · 2026-11-24 20:34 UTC · original
Flyander:codex/image-get-lod-static-sampler→main· +136 −10 · 4 files · 1 commits · closed without mergingAdds direct DXIL lowering for pixel
IMAGE_GET_LODinstructions whose sampler is static. The direct backend now binds and reuses that root-signature sampler instead of refusing the instruction. This complements the HLSL-path coverage in #1562. Part of #1269.What is in it
lower_image.rs: calculate clamped and unclamped LOD with the discovered static sampler.kernel.rs: increment the direct translator cache version.runner.rsandtests.rs: draw with a graphics root signature containing static samplers and verify the direct pixel result on the GPU.Tested
scripts/test.ps1: 890 passed, 0 failed, 42 ignored; GPU skips: 2no wave64, 1no heap windows.cargo test -p xcl --lib gpu_direct_image_get_lod_static_sampler -- --nocapture: 1 passed on the RTX 5070 Ti.xcl shaders shaders.rpf --direct --sample 0 --threads 8 --timeout 30 --validate --top 50on the same local retail 1.0.2.1 pack at base and head: translated programs rose from 22,029/22,445 to 22,055/22,445. Pixel shaders rose from 9,485/9,511 to 9,511/9,511. The 26 static-sampler LOD refusals are gone; validator errors, panics, and timeouts were 0. 4,253 records over the 16,384-byte default cap were skipped; 390 geometry-mode GS programs remain unsupported.xcl shaders shaders.rpf --direct --sample 0 --max-bytes 1048576 --threads 8 --timeout 120 --validate --top 50: all 26,698 programs from 26,503 records validated in 406.8 s; no records over 1,048,576 bytes were skipped. CS 2,689/2,689, MS 9,282/9,282, PS 12,101/12,101, VS 2,236/2,236. Only the 390 geometry-mode GS programs remain unsupported; validator errors, panics, and timeouts were 0.XCL_DIRECT_DXIL=allfor 60 seconds; see the blocks below.Regression run
main:
PR:
Not tested
AI use
@Flyander on GitHub · 2026-11-24 21:04 UTC · original
Closing this as a duplicate of #1806, which now implements static-sampler support for IMAGE_GET_LOD and includes the full-pack sweep. The distinct addition here is a runtime GPU regression checking clamped and unclamped LOD with a static sampler; I have mentioned that coverage on #1806 as a possible focused follow-up.
@DavidM1911 on GitHub · 2026-11-24 23:24 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
mainincrates/xcl/src/gpu/dxil/lower_image.rs— needs a rebase before it can be tested.Pull request closed