Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2512"
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-25T19:13:18Z.
Continues #2086 by @tedin7 (paused to keep the Windows test queue short; takeover note). Part of #1723.
The first two commits are tedin7's, rebased on main
851a140with his authorship:s_pack_ll_b32_b16ands_pack_lh_b32_b16join the existings_pack_hh_b32_b16lowering. SCC is unchanged.s_absdiff_i32:D = |wrap32(S0 - S1)|(INT_MIN stays INT_MIN),SCC = D != 0.s_absdiff_i32it is "scc from descriptor data", since its SCC would be left stale.Rebase. The cherry-pick of the two commits onto
adf4e3bconflicted with main'sscc_effectlines inStage.scalar. I resolved it as #2086's own merge commit does. The normalized diff is identical to #2086's. Rebasing onto851a140was clean: #2459'slane_complementis only true for the complement forms, so pack and absdiff are still refused on lane masks.Two commits of mine on top
startup_gfx2hlsl_bit_alu_check.pynow asserts thatabsgets a signed value. HLSLabsof auintis the identity, so ans_absdiff_i32lowering withoutasintused to pass.startup_gfx2hlsl_sop2_complement_check.py, whose helpers it imports.Why now. In a local first-refusal census of captured start-up requests at main
dbab543,s_pack_ll_b32_b16is the first refusal for 59 requests. The inputs are private; these are counts only.Tests. Run on Windows 11 with Python 3.14 at this branch's head, all passing:
tests/startup_gfx2hlsl_pack_absdiff_check.py;startup_gfx2hlsl_bit_alu_check.py;startup_gfx2hlsl_sop2_complement_check.py;startup_gfx2hlsl_scalar_arity_check.py;startup_gfx2hlsl_operand_count_check.py.Mutation checks, run by hand.
startup_gfx2hlsl_pack_absdiff_check.pyfails on each:s_pack_llshifting S1 by 8;s_pack_lhwith its sources swapped;s_absdiff_i32without its SCC;s_absdiff_i32;s_absdiff_i32;s_absdiff_i32withoutasint(caught by the new evaluator assertion).No GPU run: the check evaluates the emitted lines with the integer evaluator.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:24:30Z.
Review: COMMENTED
Review of head
e2b7dca3against origin/main (8 behind, mergeable).Code: looks correct.
s_pack_ll_b32_b16,s_pack_lh_b32_b16: expressions match the ISA meaning, SCC untouched.s_absdiff_i32:asuint(abs(asint(a - b)))keeps the wrapped INT_MIN case, SCC =D != 0.Missing before merge: a real D3D12 WARP readback test.
tests/startup_gfx2hlsl_pack_absdiff_check.pyruns the emitted lines on a Python integer evaluator. That is a good model check, but it does not compile the HLSL or run it on a GPU. For a shader/math lowering we need a WARP GPU readback compared with a CPU reference. Please extend an existing WARP suite with these three ops over the edge values (include0x80000000 - 1anda == bfor absdiff, and the<< 16/& 0xffff0000edges for the packs).Commands run (Linux, in a clean worktree of this head)
python3 tests/startup_gfx2hlsl_pack_absdiff_check.py-> okpython3 tests/docs_links_check.py-> ok;python3 tests/bidi_controls_check.py-> ok;git diff --check origin/main...HEAD-> cleanasintin absdiff (evaluator assert), dropping the absdiff SCC (s_absdiff_i32 value and SCC), changing<< 16to<< 15in pack_ll (s_pack_ll_b32_b16 value and SCC).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:35:20Z.
Win2025 WARP receipt for head
79927a57after updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
79927a57f5a3261c332cca062974a0755c874844:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2):0.74s(configure2.86s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2):1.83s(configure2.91s)tests/mesh_heap_sampler_check.pyok (0.9s),tests/startup_buffer_address_check.pyok (0.6s),tests/startup_compute_request_offline_check.pyok (0.6s),tests/startup_compute_translate_check.pyok (0.3s),tests/startup_flat_param_check.pyok (0.1s),tests/startup_gfx2hlsl_add_sub_co_check.pyok (0.2s),tests/startup_gfx2hlsl_add_sub_co_ci_check.pyok (0.2s),tests/startup_gfx2hlsl_bit_alu_check.pyok (1.1s),tests/startup_gfx2hlsl_capture_check.pyok (1.4s),tests/startup_gfx2hlsl_cmp16_check.pyok (0.3s),tests/startup_gfx2hlsl_compare_dst_check.pyok (0.1s),tests/startup_gfx2hlsl_compute_check.pyok (0.5s),tests/startup_gfx2hlsl_cselect_mask_check.pyok (0.1s),tests/startup_gfx2hlsl_cvt_alu_check.pyok (0.2s),tests/startup_gfx2hlsl_f32_lg_check.pyok (1.9s),tests/startup_gfx2hlsl_f32_nan_check.pyok (8.0s),tests/startup_gfx2hlsl_getpc_refusal_check.pyok (0.1s),tests/startup_gfx2hlsl_handler_arity_check.pyok (0.2s),tests/startup_gfx2hlsl_image_arity_check.pyok (0.1s),tests/startup_gfx2hlsl_image_get_lod_check.pyok (0.1s),tests/startup_gfx2hlsl_int_med3_check.pyok (0.1s),tests/startup_gfx2hlsl_join_symbols_check.pyok (0.3s),tests/startup_gfx2hlsl_loop_constants_check.pyok (0.1s),tests/startup_gfx2hlsl_mad_check.pyok (0.2s),tests/startup_gfx2hlsl_mask_overwrite_check.pyok (0.1s),tests/startup_gfx2hlsl_operand_count_check.pyok (0.4s),tests/startup_gfx2hlsl_pack_absdiff_check.pyok (4.3s),tests/startup_gfx2hlsl_readfirstlane_recompute_check.pyok (0.2s),tests/startup_gfx2hlsl_readfirstlane_uniform_check.pyok (0.2s),tests/startup_gfx2hlsl_refusals_check.pyok (0.7s),tests/startup_gfx2hlsl_root_check.pyok (1.1s),tests/startup_gfx2hlsl_saveexec_same_reg_check.pyok (0.2s),tests/startup_gfx2hlsl_scalar_arity_check.pyok (0.3s),tests/startup_gfx2hlsl_scalar_brev_fold_check.pyok (0.2s),tests/startup_gfx2hlsl_scalar_m0_check.pyok (0.1s),tests/startup_gfx2hlsl_sdwa_cvt_check.pyok (0.4s),tests/startup_gfx2hlsl_sgpr_spill_check.pyok (0.2s),tests/startup_gfx2hlsl_shift64_check.pyok (0.2s),tests/startup_gfx2hlsl_smem_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_sop2_complement_check.pyok (11.2s),tests/startup_gfx2hlsl_sopk_accum_check.pyok (1.5s),tests/startup_gfx2hlsl_sopk_signext_check.pyok (0.2s),tests/startup_gfx2hlsl_swap_check.pyok (0.4s),tests/startup_gfx2hlsl_vopc_sdwa_check.pyok (8.2s),tests/startup_gfx2hlsl_waitcnt_depctr_check.pyok (0.1s),tests/startup_gfx2hlsl_watch_check.pyok (3.2s),tests/startup_image_2d_array_check.pyok (0.3s),tests/startup_image_3d_check.pyok (0.1s),tests/startup_image_gather_lz_check.pyok (1.0s),tests/startup_image_load_d16_check.pyok (1.6s),tests/startup_image_sample_a16_check.pyok (0.3s),tests/startup_image_sample_b_check.pyok (0.2s),tests/startup_image_sample_c_check.pyok (0.3s),tests/startup_image_sample_l_check.pyok (0.3s),tests/startup_image_sample_lod_check.pyok (1.0s),tests/startup_inline_sampler_check.pyok (0.3s),tests/startup_mesh57_skeleton_check.pyok (0.3s),tests/startup_run_ps1_check.pyok (18.0s),tests/startup_run_sh_check.pyFAIL (0.2s),tests/startup_sampler_heap_check.pyok (0.2s),tests/startup_smem_address_check.pyok (0.1s),tests/startup_stream_fetch_check.pyok (0.3s),tests/startup_stream_interface_check.pyok (0.3s),tests/startup_translator_check.pyok (0.6s)sccache: 6/271 hits; wall94.2sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:39:04Z.
Win2025 WARP receipt for head
79927a57after updating with main (focused run on the PR test and sibling gfx2hlsl checks).Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
79927a57f5a3261c332cca062974a0755c874844:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2):1.07s(configure3.14s)ctest --preset dev -R 'startup_gfx2hlsl_(pack_absdiff|bit_alu|sop2_complement)' --parallel 2 --no-tests=error --output-on-failure): 5/5 passed (14.49s:startup_gfx2hlsl_bit_alu_warp7.07s,startup_gfx2hlsl_sop2_complement9.23s,startup_gfx2hlsl_bit_alu_controls0.89s,startup_gfx2hlsl_pack_absdiff3.58s,startup_gfx2hlsl_bit_alu_hardware7.26s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2):14.50s(configure2.59s)ctest --preset release -R 'startup_gfx2hlsl_(pack_absdiff|bit_alu|sop2_complement)' --parallel 2 --no-tests=error --output-on-failure): 5/5 passed (15.25s:startup_gfx2hlsl_bit_alu_hardware6.79s,startup_gfx2hlsl_bit_alu_warp6.80s,startup_gfx2hlsl_bit_alu_controls1.12s,startup_gfx2hlsl_pack_absdiff3.81s,startup_gfx2hlsl_sop2_complement8.32s)tests/mesh_heap_sampler_check.pyok (1.0s),tests/startup_buffer_address_check.pyok (0.6s),tests/startup_compute_request_offline_check.pyok (0.6s),tests/startup_compute_translate_check.pyok (0.3s),tests/startup_flat_param_check.pyok (0.1s),tests/startup_gfx2hlsl_add_sub_co_check.pyok (0.1s),tests/startup_gfx2hlsl_add_sub_co_ci_check.pyok (0.2s),tests/startup_gfx2hlsl_bit_alu_check.pyok (0.9s),tests/startup_gfx2hlsl_capture_check.pyok (1.3s),tests/startup_gfx2hlsl_cmp16_check.pyok (0.3s),tests/startup_gfx2hlsl_compare_dst_check.pyok (0.1s),tests/startup_gfx2hlsl_compute_check.pyok (0.5s),tests/startup_gfx2hlsl_cselect_mask_check.pyok (0.1s),tests/startup_gfx2hlsl_cvt_alu_check.pyok (0.1s),tests/startup_gfx2hlsl_f32_lg_check.pyok (1.6s),tests/startup_gfx2hlsl_f32_nan_check.pyok (11.6s),tests/startup_gfx2hlsl_getpc_refusal_check.pyok (1.0s),tests/startup_gfx2hlsl_handler_arity_check.pyok (0.8s),tests/startup_gfx2hlsl_image_arity_check.pyok (0.6s),tests/startup_gfx2hlsl_image_get_lod_check.pyok (0.5s),tests/startup_gfx2hlsl_int_med3_check.pyok (0.6s),tests/startup_gfx2hlsl_join_symbols_check.pyok (0.6s),tests/startup_gfx2hlsl_loop_constants_check.pyok (0.9s),tests/startup_gfx2hlsl_mad_check.pyok (0.5s),tests/startup_gfx2hlsl_mask_overwrite_check.pyok (1.3s),tests/startup_gfx2hlsl_operand_count_check.pyok (2.0s),tests/startup_gfx2hlsl_pack_absdiff_check.pyok (6.8s),tests/startup_gfx2hlsl_readfirstlane_recompute_check.pyok (2.6s),tests/startup_gfx2hlsl_readfirstlane_uniform_check.pyok (4.6s),tests/startup_gfx2hlsl_refusals_check.pyok (2.4s),tests/startup_gfx2hlsl_root_check.pyok (1.3s),tests/startup_gfx2hlsl_saveexec_same_reg_check.pyok (0.2s),tests/startup_gfx2hlsl_scalar_arity_check.pyok (0.3s),tests/startup_gfx2hlsl_scalar_brev_fold_check.pyok (0.2s),tests/startup_gfx2hlsl_scalar_m0_check.pyok (0.2s),tests/startup_gfx2hlsl_sdwa_cvt_check.pyok (0.5s),tests/startup_gfx2hlsl_sgpr_spill_check.pyok (0.2s),tests/startup_gfx2hlsl_shift64_check.pyok (0.2s),tests/startup_gfx2hlsl_smem_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_sop2_complement_check.pyok (9.1s),tests/startup_gfx2hlsl_sopk_accum_check.pyok (1.1s),tests/startup_gfx2hlsl_sopk_signext_check.pyok (0.2s),tests/startup_gfx2hlsl_swap_check.pyok (0.4s),tests/startup_gfx2hlsl_vopc_sdwa_check.pyok (5.8s),tests/startup_gfx2hlsl_waitcnt_depctr_check.pyok (0.1s),tests/startup_gfx2hlsl_watch_check.pyok (2.5s),tests/startup_image_2d_array_check.pyok (0.2s),tests/startup_image_3d_check.pyok (0.1s),tests/startup_image_gather_lz_check.pyok (0.6s),tests/startup_image_load_d16_check.pyok (1.0s),tests/startup_image_sample_a16_check.pyok (0.2s),tests/startup_image_sample_b_check.pyok (0.2s),tests/startup_image_sample_c_check.pyok (0.3s),tests/startup_image_sample_l_check.pyok (0.2s),tests/startup_image_sample_lod_check.pyok (0.7s),tests/startup_inline_sampler_check.pyok (0.2s),tests/startup_mesh57_skeleton_check.pyok (0.2s),tests/startup_run_ps1_check.pyok (13.0s),tests/startup_run_sh_check.pyFAIL (0.1s),tests/startup_sampler_heap_check.pyok (0.1s),tests/startup_smem_address_check.pyok (0.1s),tests/startup_stream_fetch_check.pyok (0.3s),tests/startup_stream_interface_check.pyok (0.3s),tests/startup_translator_check.pyok (0.6s)sccache: -44/-1153 hits; wall130.5sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T19:47:36Z.
@tedin7, thanks for merging. The WARP and hardware readback you asked for is in follow-up #2523 (35/35 cases on WARP and on an RTX 5080; each of five mutations of the lowering fails both).
AI-assisted.