test: pin two integer-op refusals in the translator #1773
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1780"
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 ChazY11 on 2026-11-24T18:31:58Z.
What
Two operations in
tools/startup/gfx2hlsl.pyrefuse an input they cannot model, and no check reached either raise:Replacing either
raisewithpassleft all elevenstartup_gfx2hlsl_*checks green.Change
A new device-free check that calls both operations directly on a bare
Stageand requires the refusal, with a legalthree-argument form so the assertions cannot pass by refusing everything:
The third case is the one that separates the two clauses: with the source proven uniform, the modifier alone still
refuses, so a future edit that only checks uniformity is caught.
Registered as
startup_gfx2hlsl_op_refusalswithTIMEOUT 60next to the othergfx2hlslchecks.Tested
Negative controls, each reverted:
Also noted while probing
Six other refusals in the same file are unreached by every check I ran —
SDWA UNUSED_SEXT, an unknownmodifier %s,mask from descriptor data,v_readfirstlane's siblings,unverified pixel input enable/address combination, andmask from descriptor data's neighbours. I did not write cases for them: each needs a specific word pattern rather than adirect call, and I would be guessing at what the decoder can be fed. This PR is only the two that take a direct call.
Notes
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T18:44:22Z.
Review: COMMENTED
Verified commit
58a796ce6380278b58a4ae60f25374e915dc92ef— no defects found.Checks run locally (Linux)
git diff --check origin/main...HEAD— passedpython -B tests/bidi_controls_check.py— passed (1304 tracked files)python -B tests/startup_gfx2hlsl_op_refusals_check.py— passed (gfx2hlsl op refusals: 3 cases passed)Mutation controls (reverted cleanly after each)
raise Unsupported('v_cvt_i32_f32 with modifiers')withpassintools/startup/gfx2hlsl.py->tests/startup_gfx2hlsl_op_refusals_check.pyfailed (exit 1).raise Unsupported('v_readfirstlane_b32 requires a proven uniform source')withpass-> failed (exit 1).mods orfrom theop_v_readfirstlane_b32guard -> failed on the uniform-source-with-modifier case (exit 1).Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP)
--preset dev):ctest --preset dev -R '^startup_gfx2hlsl_op_refusals$' --parallel 6 --no-tests=error --output-on-failure— 1/1 passed (0.15s)/O2(--preset release):ctest --preset release -R '^startup_gfx2hlsl_op_refusals$' --parallel 6 --no-tests=error --output-on-failure— 1/1 passed (0.14s)AI-assisted; commands listed were executed locally.