gpu: test runtime indexing of a bounded sampler table #1185
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1192"
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 Jess-Doit on 2026-11-24T03:19:06Z.
Change
Refs #1143.
Add a source-built desktop Shader Model 6.0 check for a two-entry sampler table. A root constant chooses between wrap and clamp while the table and texture stay fixed. A forced-index-zero control repeats the wrap result for both requests. This is a desktop SM 6.0 check of the runtime behaviour, not the translator change #1143 asks for: the startup translator (in #1135) still substitutes a default sampler, and dynamic resource-heap indexing is not covered here.
Verification
Tested
e85989aa(rebased on645b9697) on Windows 10 22H2 build19045.6456, GTX 1060 6GB driver32.0.15.6094, and in-box WARP10.0.19041.5794.Debug and Release each passed 2/2 with zero skips. Both adapters read
3e800000,3f400000for runtime selection and3e800000,3e800000for the fixed-zero control. Replacing the runtime selector with literal zero failed both tests in each preset at the index-one word. Rebuilding after restoring the selector passed 2/2 in each preset. (The mutation runs were on the pre-rebase commita00c3c89; the rebase only merged a neighbouring declaration intests/desktop_gpu.h, and the rebased commit passed 2/2 again in both presets.) The D3D12 debug layer reported zero warnings and errors.AI-assisted (Codex, reviewed with Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T03:27:41Z.
Review: COMMENTED
Reviewed
e85989aa(diff + Linux doc/bidi checks; Windows build/D3D12/WARP tests were not run locally).Findings
No functional or
AGENTS.mdissues found in the diff:tests/binding_mips.hlsl&tests/binding_mips.cpp: dispatches a source-builtcs_6_0shader with a 2-entry shader-visible sampler heap (wrap at index 0, clamp at index 1) and a 2-texelR32_FLOATtexture sampled atU = 1.25, plus aforceZeroshader control (3e800000,3f400000vs3e800000,3e800000).tests/offscreen_check.cpp&CMakeLists.txt: registersdynamic_sampler_index_{hardware,warp}behindkGateSm60SamplerViewswithSKIP_RETURN_CODE 77andTIMEOUT 45.docs/experiments.md: updated with the new section and reproduction command; wording is title-neutral.Checks run on Linux
python3 -B tests/docs_links_check.py: passed (15 Markdown files, 265 links).python3 -B tests/bidi_controls_check.py: passed (971 tracked files).offscreen_check/dynamic_sampler_index_*) were not run locally.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T03:51:32Z.
Review: COMMENTED
Retest on Linux at commit
c5fd3ff7(deltae85989aa..c5fd3ff7; Windows build/tests were not executed locally).Findings
c5fd3ff7mergesmain(59eb7812) and preserves both--dynamic-sampler-index(#1192) and--sampler-index-control(#1115) inCMakeLists.txtandtests/offscreen_check.cpp.tests/offscreen_check.cpp:1029: missing newline between};andconstexpr CapabilityGate kGateSm60RawUavDump{.Checks run (Linux,
c5fd3ff7)/root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: passed (16Markdown files,273links)./root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: passed (1011tracked files).