startup: remove the unread SAMPLER_CLAMP table from gfx2hlsl #1842
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1849"
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 winne42 on 2026-11-24T19:32:34Z.
Change
Removes
SAMPLER_CLAMPfromtools/startup/gfx2hlsl.py. Nothing reads it. Refs #1764.e658fe24) and has never had a reader. After this change,git grep SAMPLER_CLAMPfinds nothing.decode_sampler()insrc/startup_stubs/translated_sampler_bindings.h:26. It has the same eight entries. The translator writes the inline sampler words to the manifest unchanged, assmp/smpclines (gfx2hlsl.py, manifest writer). The runtime decodesAddressU/V/WfromWORD0bits 2:0, 5:3 and 8:6 through its ownmodes[8].decode_sampler().No behaviour change. No docs mention the table.
Verification
Commit
f5ca2686onbbadc76d(origin/main). Linux, Python 3.14.8,pefile==2024.8.26,iced-x86==1.21.0.I ran all 53 checks in the AGENTS.md pure-Python list:
Result: 53 passed, 0 failed. These include the five checks named in #1764:
startup_translator_check,startup_inline_sampler_check,startup_sampler_heap_check,startup_flat_param_checkandstartup_gfx2hlsl_capture_check.Not run: the Windows ctest targets, including
startup_translated_sampler_bindings_check, which callsdecode_sampler()(it does not check the address modes). I had no Windows/MSVC environment. This change does not touch C++.Evidence and follow-up
No new fixture. The change is a deletion, so a negative control does not apply.
Checklist
AI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T19:36:51Z.
Review: COMMENTED
Peer review of head
f5ca26865db1259a8da89f135a3233e09d938d37.Result: no P1/P2 defects found in the local verification.
The change deletes the module-level
SAMPLER_CLAMPdictionary (3 lines) fromtools/startup/gfx2hlsl.py.git grep -n -i SAMPLER_CLAMPon this head finds nothing in the whole repository (tools, tests, docs, workflows, CMake), and onorigin/mainthe only hit is the definition attools/startup/gfx2hlsl.py:138. No other module reads it by attribute or by string.hasattr(gfx2hlsl, 'SAMPLER_CLAMP')is false, as intended.tests/startup_inline_sampler_check.py(below).Win2025 (coordinator run, Windows Server 2025 build 26100, MSVC 14.44, auto-selected targets):
ctest -R '^startup_translator$'passed 1/1 in Debugdev(0.17 s) and in Release/O2(0.19 s); the Windows Python checktests/startup_translator_check.pyalso exited 0.Linux checks run locally in a clean worktree at this head:
git diff --check origin/main...HEAD: cleantests/bidi_controls_check.py: passed (1324 files)tests/startup_translator_check.py: 0 failedtests/startup_inline_sampler_check.py: passed (clamp and wrap fold to the expected sampler words; the unsupported descriptor operand is still refused)tests/docs_links_check.pywas not run: the PR changes no Markdown.No mutation was run: the PR only removes an unreferenced constant, and the grep above is the evidence that nothing depends on it.
AI-assisted; commands listed were executed locally.