shader: lower image_sample_lz in the sampled coverage translator #1284
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1291"
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 R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T06:58:32Z.
What
tools/sampled_coverage_aot.pyacceptsimage_sample_lzwith exactly the operand pattern ofimage_sample(one 2D coordinate pair, one single-channel dmask, the fixture sampler) and lowers it totexN.SampleLevel(samp,uv,0).<channel>instead oftexN.Sample(samp,uv).<channel>. The regex is unchanged, so every modifier that is not modelled is refused as before. All other conditions (quad mask, wait counts, one sample per program) are unchanged and shared by both opcodes; animage_sampleand animage_sample_lzin one program are refused like two plain samples.Why
The explicit-level zero variant is the same sample without an implicit derivative, and was refused with
Unsupported coverage instruction image_sample_lz.Tested
Linux (LLVM 19, no D3D12):
python3 -B tests/sampled_coverage_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: passed. It assembles the lz program with gfx1013, runs the translator command on both textures and compares withlower. It also assembles and refuses tfe, a16, lwe, d16, r128, unorm, glc, slc, dlc, a two-channel dmask, a 3D dimension, image_sample_o, image_sample_lz_o and image_sample_l for both opcodes.daand a 2D array dimension are refused at the translator-level check only (LLVM 19 does not assemble them)..Samplefails the check. I also ran it with the lz entry temporarily mapped toSample(samp,uv): the controls failed, then I restored it.python3 -B tests/docs_links_check.py,python3 -B tests/bidi_controls_check.py, py_compile.Windows (not run locally):
The WARP/hardware draw was NOT run locally: no Windows here. The new draw repeats the first readback with the lz program on texture 0. The textures have one mip and the draw is one-to-one, so the draw cannot tell SampleLevel(0) from Sample; only the Linux checks distinguish them. The CTest timeout (150 s) was not re-measured with the extra six renderer runs.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T07:00:53Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207, D3D12 WARP) at
50430a15:--preset dev):ctest --preset dev -R "^sampled_coverage_warp$"— 1/1 PASS (10.30s)/O2(--preset release):ctest --preset release -R "^sampled_coverage_warp$"— 1/1 PASS (9.97s, build0.35s)Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T07:01:03Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
50430a1ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.