Shaders: support static samplers in image_get_lod #1765
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1775"
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 ivall/xcl. Originally posted by Flyander on 2026-11-24T20:34:14Z.
Adds 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
Imported from ivall/xcl. Originally posted by Flyander on 2026-11-24T21:04:30Z.
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.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:24:34Z.
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