Pin the SPIR-V address window's end bound, direct casts and profile rejections #964
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/971"
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 Leyukaka on 2026-11-23T19:20:55Z.
Change
This closes six gaps in the test coverage of
tools/spirv_address_window.py. Each is a one-line mutation of the lowering that passes bothtests/spirv_window/check.pyand thespirv_address_window_warpand_hardwarereadbacks onmain. Onlycheck.pychanges; the lowering does not.OpULessThanon the indexed address against%x2w_endOpULessThanchanged toOpULessThanEqualOpConvertUToPtr %_ptr_PSB_uintcast is masked from its own address, and the lowered module assembles and validates%x2w_zero64as the address%user_dataalready at descriptor set 1: rejected withdescriptor setsOpEntryPointlines:expected one shader entry pointArrayStride 8on%rt_uint:scalar layoutPushConstantpointer type:unrecognized push-constant declarationTwo further mutations of the emitted text were left out, because the
spirv_address_window_*readbacks onmainalready fail under both:{name}_nowrap = OpUGreaterThanEqual %bool {addr} {base}with%x2w_zero64for{base}, andOpSelect %uint {valid} {name}_word %x2w_invalidwith the last two operands swapped.No fixture file is added; the variants are derived from
subtract.spvasminsidecheck.py.Verification
On
3a795d0(branch on4878211), Windows 11 build 26300, MSVC 14.44.35207, Python 3.14, SPIR-V tools fromtools/setup-spirv-tools.ps1:check.pypasses, and all 16spirvtests pass. The eight_hardwaretests ran on an NVIDIA GeForce RTX 5080 (driver 32.0.16.2101) and none was skipped.Each mutation was applied to
tools/spirv_address_window.pyone at a time. Withmain'scheck.py, bothcheck.pyand thespirv_address_window_*CTest entries passed under all six; with the branch'scheck.py,check.pyfails under each. Both versions pass with the unmutated lowering.The six edits to
tools/spirv_address_window.py:f"{name}_range = OpULessThan %bool {addr} %x2w_end",->OpULessThanEqualoutput.extend(word_pointer(dst, addr, None))->word_pointer(dst, "%x2w_zero64", None)DescriptorSet [12]", line) for line in lines->DescriptorSet 2", line) for line in lines!= 1:in theOpEntryPointcount ->not in (1, 2):"OpDecorate %rt_uint ArrayStride 4"removed fromrequiredif line.split(" = ")[0] not in ("%_ptr_PC_UserData", "%_ptr_PC_uint", "%user_data"):->if False:Checklist
AI-assisted.