feat: accept key-independent body scalars read after a compute waterfall #2737

Manually merged
github merged 2 commits from gh-pr/2737/head into gh-pr/2737/base 2026-11-27 01:19:12 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-26 04:35 UTC · original
tedin7:x2w-waterfall-invariant-read → main · +29 −6 · 3 files · 2 commits · merged 2026-11-26 05:13 UTC

Part of #1723

What this unblocks: compute readfirstlane waterfall loops whose body writes a scalar that does not depend on the key and is read after the loop (the "body scalar is live at the loop exit" refusal).

What changed

  • waterfall_refusal tracks which body scalars depend on the key (the key itself, anything computed from a key-dependent scalar, and anything touched by a body load).
  • A body scalar that is live after the loop is refused only if it is in that set.

Why it is correct

  • On hardware, after the loop every lane sees the scalar of the last pass. A scalar written only from loop-invariant inputs has the same value in every pass, so the last pass's value equals each lane's own value.
  • In the model the body runs once per lane, including lanes that were inactive at the loop entry (as the hardware body runs at least once), so those lanes get the same value.
  • The body is still limited to the short list of lane-local instructions, no loop-carried reads, no lane-mask or exec access.

What stays refused

  • The key, and any scalar computed from it, read after the loop.
  • A scalar whose clean value is overwritten by a key-dependent one.

Tests

Extends startup_compute_waterfall.py (run by startup_compute_readfirstlane): accepted controls, refused controls, and a new WARP dispatch case invariant (0 to 4 active lanes, repeated and distinct keys) with the existing wrong-value control.

Verification

  • Linux: the new accepted case fails on main ("body scalar is live at the loop exit") and passes here.
  • Linux: python3 -B tests/startup_compute_readfirstlane_check.py --llvm-mc llvm-mc-19 passes.
  • Linux: all 246 tests/startup_*check.py pass; the shape kit finds no translation change on 166 shapes.
  • Win2025 WARP dev+release: pending Stage-2.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 04:35 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2737) `tedin7:x2w-waterfall-invariant-read` → `main` · +29 −6 · 3 files · 2 commits · merged 2026-11-26 05:13 UTC Part of #1723 What this unblocks: compute readfirstlane waterfall loops whose body writes a scalar that does not depend on the key and is read after the loop (the "body scalar is live at the loop exit" refusal). ## What changed - `waterfall_refusal` tracks which body scalars depend on the key (the key itself, anything computed from a key-dependent scalar, and anything touched by a body load). - A body scalar that is live after the loop is refused only if it is in that set. ## Why it is correct - On hardware, after the loop every lane sees the scalar of the last pass. A scalar written only from loop-invariant inputs has the same value in every pass, so the last pass's value equals each lane's own value. - In the model the body runs once per lane, including lanes that were inactive at the loop entry (as the hardware body runs at least once), so those lanes get the same value. - The body is still limited to the short list of lane-local instructions, no loop-carried reads, no lane-mask or exec access. ## What stays refused - The key, and any scalar computed from it, read after the loop. - A scalar whose clean value is overwritten by a key-dependent one. ## Tests Extends `startup_compute_waterfall.py` (run by `startup_compute_readfirstlane`): accepted controls, refused controls, and a new WARP dispatch case `invariant` (0 to 4 active lanes, repeated and distinct keys) with the existing wrong-value control. ## Verification - Linux: the new accepted case fails on main ("body scalar is live at the loop exit") and passes here. - Linux: `python3 -B tests/startup_compute_readfirstlane_check.py --llvm-mc llvm-mc-19` passes. - Linux: all 246 `tests/startup_*check.py` pass; the shape kit finds no translation change on 166 shapes. - Win2025 WARP dev+release: pending Stage-2. AI-assisted; commands listed were executed locally.
A body scalar written from loop-invariant inputs holds one value in every pass, so the last pass's value is each lane's own. Scalars that read the key stay refused. Extends the waterfall fixture with accepted/refused controls and a WARP dispatch case.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:19:11 +00:00
github manually merged commit 132d59c439 into gh-pr/2737/base 2026-11-27 01:19:12 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 04:41 UTC · original

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit f2061ff0b544875adb748f1cc6a673dfbeca22fd:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2): 5.34s (configure 3.77s)
    • Test (ctest --preset dev -R '^startup_compute_(readfirstlane|waterfall)|^startup_gfx2hlsl_compute' --parallel 4 --no-tests=error --output-on-failure): 38/38 passed (7.73s: startup_compute_readfirstlane_warp 2.10s, startup_compute_readfirstlane_hardware 2.18s, startup_gfx2hlsl_compute_mbcnt_warp 0.98s, startup_gfx2hlsl_compute_mbcnt_hardware 1.04s, startup_gfx2hlsl_compute_dropped-store_warp 0.43s, startup_gfx2hlsl_compute_c-unpredicated_warp 0.44s, startup_gfx2hlsl_compute_warp 3.98s, startup_gfx2hlsl_compute_hardware 4.01s, startup_gfx2hlsl_compute_swapped-axes_warp 0.45s, startup_gfx2hlsl_compute_b-offset_warp 0.43s, startup_gfx2hlsl_compute_c-unpredicated_hardware 0.44s, startup_gfx2hlsl_compute_b-offset_hardware 0.46s, startup_gfx2hlsl_compute_controls 0.96s, startup_gfx2hlsl_compute_dropped-store_hardware 0.43s, startup_gfx2hlsl_compute_swapped-axes_hardware 0.42s, startup_gfx2hlsl_compute_m-else-unswitched_hardware 0.47s, startup_gfx2hlsl_compute_n-dropped-broadcast_hardware 0.44s, startup_gfx2hlsl_compute_m-else-unswitched_warp 0.46s, startup_gfx2hlsl_compute_n-dropped-broadcast_warp 0.45s, startup_compute_readfirstlane 1.15s, startup_gfx2hlsl_compute_f-peer_warp 0.43s, startup_gfx2hlsl_compute_f-broadcast_hardware 0.43s, startup_gfx2hlsl_compute_f-broadcast_warp 0.44s, startup_gfx2hlsl_compute_k-block-entered_warp 0.46s, startup_gfx2hlsl_compute_h-inner-unpredicated_hardware 0.48s, startup_gfx2hlsl_compute_f-peer_hardware 0.44s, startup_gfx2hlsl_compute_k-block-entered_hardware 0.46s, startup_gfx2hlsl_compute_h-inner-unpredicated_warp 0.46s, startup_gfx2hlsl_compute_j-scalar-dropped_hardware 0.44s, startup_gfx2hlsl_compute_g-swapped-offsets_hardware 0.45s, startup_gfx2hlsl_compute_g-overlap_warp 0.43s, startup_gfx2hlsl_compute_g-swapped-offsets_warp 0.42s, startup_gfx2hlsl_compute_g-overlap_hardware 0.40s, startup_gfx2hlsl_compute_j-scalar-dropped_warp 0.43s, startup_gfx2hlsl_compute_n-unmasked_warp 0.41s, startup_gfx2hlsl_compute_o-mask-kept_warp 0.42s, startup_gfx2hlsl_compute_n-unmasked_hardware 0.40s, startup_gfx2hlsl_compute_o-mask-kept_hardware 0.37s)
  • Windows Python checks: tests/mesh_heap_sampler_check.py ok (0.7s), tests/startup_buffer_address_check.py ok (0.4s), tests/startup_buffer_format_word3_table_check.py ok (0.1s), tests/startup_compute_request_offline_check.py ok (0.8s), tests/startup_compute_store_format_xyzw_check.py ok (0.2s), tests/startup_compute_translate_check.py ok (0.2s), tests/startup_flat_param_check.py ok (0.2s), tests/startup_gfx2hlsl_add_sub_co_check.py ok (0.1s), tests/startup_gfx2hlsl_add_sub_co_ci_check.py ok (0.2s), tests/startup_gfx2hlsl_bit_alu_check.py ok (0.7s), tests/startup_gfx2hlsl_capture_check.py ok (1.1s), tests/startup_gfx2hlsl_cmp16_check.py ok (0.3s), tests/startup_gfx2hlsl_cmp_class_f16_sdwa_check.py ok (34.4s), tests/startup_gfx2hlsl_compare_dst_check.py ok (0.1s), tests/startup_gfx2hlsl_compute_check.py ok (0.6s), tests/startup_gfx2hlsl_cselect_mask_check.py ok (0.1s), tests/startup_gfx2hlsl_cvt_alu_check.py ok (0.2s), tests/startup_gfx2hlsl_cvt_off_f32_i4_check.py ok (0.2s), tests/startup_gfx2hlsl_cvt_pk_int16_check.py ok (0.4s), tests/startup_gfx2hlsl_f32_lg_check.py ok (1.5s), tests/startup_gfx2hlsl_f32_nan_check.py ok (5.7s), tests/startup_gfx2hlsl_fma_mix_check.py ok (0.1s), tests/startup_gfx2hlsl_getpc_refusal_check.py ok (0.1s), tests/startup_gfx2hlsl_handler_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_heap_record_check.py ok (0.2s), tests/startup_gfx2hlsl_image_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_get_lod_check.py ok (0.2s), tests/startup_gfx2hlsl_int_med3_check.py ok (0.1s), tests/startup_gfx2hlsl_interp_p2_hi_check.py ok (0.3s), tests/startup_gfx2hlsl_join_symbols_check.py ok (0.6s), tests/startup_gfx2hlsl_loop_constants_check.py ok (0.2s), tests/startup_gfx2hlsl_mask_data_check.py ok (0.1s), tests/startup_gfx2hlsl_mask_overwrite_check.py ok (0.1s), tests/startup_gfx2hlsl_operand_count_check.py ok (0.5s), tests/startup_gfx2hlsl_pack_absdiff_check.py ok (2.7s), tests/startup_gfx2hlsl_pack_b32_f16_check.py ok (0.2s), tests/startup_gfx2hlsl_readfirstlane_recompute_check.py ok (0.1s), tests/startup_gfx2hlsl_readfirstlane_uniform_check.py ok (0.2s), tests/startup_gfx2hlsl_refusals_check.py ok (0.8s), tests/startup_gfx2hlsl_root_check.py ok (1.3s), tests/startup_gfx2hlsl_s_abs_check.py ok (0.2s), tests/startup_gfx2hlsl_s_bitset_check.py ok (0.2s), tests/startup_gfx2hlsl_s_ff0_check.py ok (0.5s), tests/startup_gfx2hlsl_s_ff1_check.py ok (1.4s), tests/startup_gfx2hlsl_s_flbit_check.py ok (0.9s), tests/startup_gfx2hlsl_s_quadmask_check.py ok (0.2s), tests/startup_gfx2hlsl_sad_check.py ok (0.5s), tests/startup_gfx2hlsl_saveexec_same_reg_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_arity_check.py ok (0.3s), tests/startup_gfx2hlsl_scalar_brev_fold_check.py ok (0.3s), tests/startup_gfx2hlsl_scalar_m0_check.py ok (0.2s), tests/startup_gfx2hlsl_scalar_null_check.py ok (0.3s), tests/startup_gfx2hlsl_scalar_table_arity_check.py ok (0.5s), tests/startup_gfx2hlsl_sdwa_cndmask_check.py ok (0.3s), tests/startup_gfx2hlsl_sdwa_cvt_check.py ok (0.4s), tests/startup_gfx2hlsl_sgpr_spill_check.py ok (0.3s), tests/startup_gfx2hlsl_shift64_check.py ok (0.3s), tests/startup_gfx2hlsl_sload_const_offset_check.py ok (0.1s), tests/startup_gfx2hlsl_smem_offset_check.py ok (0.1s), tests/startup_gfx2hlsl_sop2_complement_check.py ok (10.7s), tests/startup_gfx2hlsl_sopk_accum_check.py ok (2.0s), tests/startup_gfx2hlsl_sopk_signext_check.py ok (0.3s), tests/startup_gfx2hlsl_spill_branches_check.py ok (1.6s), tests/startup_gfx2hlsl_swap_check.py ok (0.6s), tests/startup_gfx2hlsl_vopc_sdwa_check.py ok (7.9s), tests/startup_gfx2hlsl_waitcnt_depctr_check.py ok (0.2s), tests/startup_gfx2hlsl_watch_check.py ok (3.3s), tests/startup_image_2d_array_check.py ok (0.3s), tests/startup_image_3d_check.py ok (0.2s), tests/startup_image_gather_lz_check.py ok (0.9s), tests/startup_image_load_d16_check.py ok (1.6s), tests/startup_image_sample_a16_check.py ok (0.3s), tests/startup_image_sample_b_check.py ok (0.3s), tests/startup_image_sample_c_check.py ok (0.4s), tests/startup_image_sample_l_check.py ok (0.3s), tests/startup_image_sample_lod_check.py ok (0.9s), tests/startup_inline_sampler_check.py ok (0.3s), tests/startup_mesh57_depth_only_check.py ok (0.3s), tests/startup_mesh57_lane_spill_check.py ok (0.3s), tests/startup_mesh57_loop_check.py ok (0.4s), tests/startup_mesh57_loop_refusal_check.py ok (0.3s), tests/startup_mesh57_skeleton_check.py ok (2.0s), tests/startup_run_ps1_check.py ok (26.6s), tests/startup_run_sh_check.py skipped (0.2s), tests/startup_sampler_heap_check.py ok (0.3s), tests/startup_shader_cache_rekey_check.py ok (4.2s), tests/startup_smem_address_check.py ok (0.3s), tests/startup_stream_fetch_check.py ok (0.3s), tests/startup_stream_interface_check.py ok (0.4s), tests/startup_translator_check.py ok (0.8s)
  • sccache: 56/63 hits; wall 157.5s

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 04:41 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2737#issuecomment-7182815334) Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `f2061ff0b544875adb748f1cc6a673dfbeca22fd`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2`): `5.34s` (configure `3.77s`) - Test (`ctest --preset dev -R '^startup_compute_(readfirstlane|waterfall)|^startup_gfx2hlsl_compute' --parallel 4 --no-tests=error --output-on-failure`): **38/38 passed** (`7.73s`: `startup_compute_readfirstlane_warp` `2.10s`, `startup_compute_readfirstlane_hardware` `2.18s`, `startup_gfx2hlsl_compute_mbcnt_warp` `0.98s`, `startup_gfx2hlsl_compute_mbcnt_hardware` `1.04s`, `startup_gfx2hlsl_compute_dropped-store_warp` `0.43s`, `startup_gfx2hlsl_compute_c-unpredicated_warp` `0.44s`, `startup_gfx2hlsl_compute_warp` `3.98s`, `startup_gfx2hlsl_compute_hardware` `4.01s`, `startup_gfx2hlsl_compute_swapped-axes_warp` `0.45s`, `startup_gfx2hlsl_compute_b-offset_warp` `0.43s`, `startup_gfx2hlsl_compute_c-unpredicated_hardware` `0.44s`, `startup_gfx2hlsl_compute_b-offset_hardware` `0.46s`, `startup_gfx2hlsl_compute_controls` `0.96s`, `startup_gfx2hlsl_compute_dropped-store_hardware` `0.43s`, `startup_gfx2hlsl_compute_swapped-axes_hardware` `0.42s`, `startup_gfx2hlsl_compute_m-else-unswitched_hardware` `0.47s`, `startup_gfx2hlsl_compute_n-dropped-broadcast_hardware` `0.44s`, `startup_gfx2hlsl_compute_m-else-unswitched_warp` `0.46s`, `startup_gfx2hlsl_compute_n-dropped-broadcast_warp` `0.45s`, `startup_compute_readfirstlane` `1.15s`, `startup_gfx2hlsl_compute_f-peer_warp` `0.43s`, `startup_gfx2hlsl_compute_f-broadcast_hardware` `0.43s`, `startup_gfx2hlsl_compute_f-broadcast_warp` `0.44s`, `startup_gfx2hlsl_compute_k-block-entered_warp` `0.46s`, `startup_gfx2hlsl_compute_h-inner-unpredicated_hardware` `0.48s`, `startup_gfx2hlsl_compute_f-peer_hardware` `0.44s`, `startup_gfx2hlsl_compute_k-block-entered_hardware` `0.46s`, `startup_gfx2hlsl_compute_h-inner-unpredicated_warp` `0.46s`, `startup_gfx2hlsl_compute_j-scalar-dropped_hardware` `0.44s`, `startup_gfx2hlsl_compute_g-swapped-offsets_hardware` `0.45s`, `startup_gfx2hlsl_compute_g-overlap_warp` `0.43s`, `startup_gfx2hlsl_compute_g-swapped-offsets_warp` `0.42s`, `startup_gfx2hlsl_compute_g-overlap_hardware` `0.40s`, `startup_gfx2hlsl_compute_j-scalar-dropped_warp` `0.43s`, `startup_gfx2hlsl_compute_n-unmasked_warp` `0.41s`, `startup_gfx2hlsl_compute_o-mask-kept_warp` `0.42s`, `startup_gfx2hlsl_compute_n-unmasked_hardware` `0.40s`, `startup_gfx2hlsl_compute_o-mask-kept_hardware` `0.37s`) - **Windows Python checks**: `tests/mesh_heap_sampler_check.py` ok (`0.7s`), `tests/startup_buffer_address_check.py` ok (`0.4s`), `tests/startup_buffer_format_word3_table_check.py` ok (`0.1s`), `tests/startup_compute_request_offline_check.py` ok (`0.8s`), `tests/startup_compute_store_format_xyzw_check.py` ok (`0.2s`), `tests/startup_compute_translate_check.py` ok (`0.2s`), `tests/startup_flat_param_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_add_sub_co_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_add_sub_co_ci_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_bit_alu_check.py` ok (`0.7s`), `tests/startup_gfx2hlsl_capture_check.py` ok (`1.1s`), `tests/startup_gfx2hlsl_cmp16_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_cmp_class_f16_sdwa_check.py` ok (`34.4s`), `tests/startup_gfx2hlsl_compare_dst_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_compute_check.py` ok (`0.6s`), `tests/startup_gfx2hlsl_cselect_mask_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_cvt_alu_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_cvt_off_f32_i4_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_cvt_pk_int16_check.py` ok (`0.4s`), `tests/startup_gfx2hlsl_f32_lg_check.py` ok (`1.5s`), `tests/startup_gfx2hlsl_f32_nan_check.py` ok (`5.7s`), `tests/startup_gfx2hlsl_fma_mix_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_getpc_refusal_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_handler_arity_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_heap_record_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_image_arity_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_image_get_lod_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_int_med3_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_interp_p2_hi_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_join_symbols_check.py` ok (`0.6s`), `tests/startup_gfx2hlsl_loop_constants_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_mask_data_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_mask_overwrite_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_operand_count_check.py` ok (`0.5s`), `tests/startup_gfx2hlsl_pack_absdiff_check.py` ok (`2.7s`), `tests/startup_gfx2hlsl_pack_b32_f16_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_readfirstlane_recompute_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_readfirstlane_uniform_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_refusals_check.py` ok (`0.8s`), `tests/startup_gfx2hlsl_root_check.py` ok (`1.3s`), `tests/startup_gfx2hlsl_s_abs_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_s_bitset_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_s_ff0_check.py` ok (`0.5s`), `tests/startup_gfx2hlsl_s_ff1_check.py` ok (`1.4s`), `tests/startup_gfx2hlsl_s_flbit_check.py` ok (`0.9s`), `tests/startup_gfx2hlsl_s_quadmask_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_sad_check.py` ok (`0.5s`), `tests/startup_gfx2hlsl_saveexec_same_reg_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_scalar_arity_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_scalar_brev_fold_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_scalar_m0_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_scalar_null_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_scalar_table_arity_check.py` ok (`0.5s`), `tests/startup_gfx2hlsl_sdwa_cndmask_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_sdwa_cvt_check.py` ok (`0.4s`), `tests/startup_gfx2hlsl_sgpr_spill_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_shift64_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_sload_const_offset_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_smem_offset_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_sop2_complement_check.py` ok (`10.7s`), `tests/startup_gfx2hlsl_sopk_accum_check.py` ok (`2.0s`), `tests/startup_gfx2hlsl_sopk_signext_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_spill_branches_check.py` ok (`1.6s`), `tests/startup_gfx2hlsl_swap_check.py` ok (`0.6s`), `tests/startup_gfx2hlsl_vopc_sdwa_check.py` ok (`7.9s`), `tests/startup_gfx2hlsl_waitcnt_depctr_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_watch_check.py` ok (`3.3s`), `tests/startup_image_2d_array_check.py` ok (`0.3s`), `tests/startup_image_3d_check.py` ok (`0.2s`), `tests/startup_image_gather_lz_check.py` ok (`0.9s`), `tests/startup_image_load_d16_check.py` ok (`1.6s`), `tests/startup_image_sample_a16_check.py` ok (`0.3s`), `tests/startup_image_sample_b_check.py` ok (`0.3s`), `tests/startup_image_sample_c_check.py` ok (`0.4s`), `tests/startup_image_sample_l_check.py` ok (`0.3s`), `tests/startup_image_sample_lod_check.py` ok (`0.9s`), `tests/startup_inline_sampler_check.py` ok (`0.3s`), `tests/startup_mesh57_depth_only_check.py` ok (`0.3s`), `tests/startup_mesh57_lane_spill_check.py` ok (`0.3s`), `tests/startup_mesh57_loop_check.py` ok (`0.4s`), `tests/startup_mesh57_loop_refusal_check.py` ok (`0.3s`), `tests/startup_mesh57_skeleton_check.py` ok (`2.0s`), `tests/startup_run_ps1_check.py` ok (`26.6s`), `tests/startup_run_sh_check.py` skipped (`0.2s`), `tests/startup_sampler_heap_check.py` ok (`0.3s`), `tests/startup_shader_cache_rekey_check.py` ok (`4.2s`), `tests/startup_smem_address_check.py` ok (`0.3s`), `tests/startup_stream_fetch_check.py` ok (`0.3s`), `tests/startup_stream_interface_check.py` ok (`0.4s`), `tests/startup_translator_check.py` ok (`0.8s`) - `sccache`: 56/63 hits; wall `157.5s` AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 04:41 UTC · original

Independent gate for f2061ff0b5: PASS.

  • Hand-built adversarial cases (indirect key chains through other scalars, 2-hop and/or, shifted key, key-dependent descriptor address, key read after the loop, loop-carried scalar, nested branch / readfirstlane in the body): every key-dependent case is refused, every key-independent case is accepted.
  • Negative controls: removing the key filter, or widening it, makes startup_compute_readfirstlane_check.py fail.
  • The WARP readback invariant case (0 to 4 active lanes, wrong-value control) passes on Windows Server 2025 (receipt above).

@⁠MasterDomino this is ready for your review.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 04:41 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2737#issuecomment-7182815936) Independent gate for f2061ff0b544875adb748f1cc6a673dfbeca22fd: PASS. - Hand-built adversarial cases (indirect key chains through other scalars, 2-hop and/or, shifted key, key-dependent descriptor address, key read after the loop, loop-carried scalar, nested branch / readfirstlane in the body): every key-dependent case is refused, every key-independent case is accepted. - Negative controls: removing the key filter, or widening it, makes `startup_compute_readfirstlane_check.py` fail. - The WARP readback `invariant` case (0 to 4 active lanes, wrong-value control) passes on Windows Server 2025 (receipt above). @⁠MasterDomino this is ready for your review. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠RonLogic on GitHub · 2026-11-26 04:41 UTC · original

Independent Windows x64 Release verification at f2061ff0b544875adb748f1cc6a673dfbeca22fd, Windows 26300.10075, DXC 1.9.2602.17. python -B tests/startup_compute_readfirstlane_check.py and --dispatch <dxc> <offscreen_check> <backend> passed on both in-box WARP 10.0.26100.10068 and physical RTX 4070 32.0.16.2124, without skips. The invariant waterfall matched all 320 words at each active-lane count from zero to four and for the uniform-key case. The mutated value changed exactly one word on each backend. D3D12 debug errors and warnings were zero. I used the MSVC Release runner after checking that its native and HLSL source trees matched this head.

**@⁠RonLogic** on GitHub · 2026-11-26 04:41 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2737#issuecomment-7182817221) Independent Windows x64 Release verification at `f2061ff0b544875adb748f1cc6a673dfbeca22fd`, Windows `26300.10075`, DXC `1.9.2602.17`. `python -B tests/startup_compute_readfirstlane_check.py` and `--dispatch <dxc> <offscreen_check> <backend>` passed on both in-box WARP `10.0.26100.10068` and physical RTX 4070 `32.0.16.2124`, without skips. The invariant waterfall matched all 320 words at each active-lane count from zero to four and for the uniform-key case. The mutated value changed exactly one word on each backend. D3D12 debug errors and warnings were zero. I used the MSVC Release runner after checking that its native and HLSL source trees matched this head.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 04:41 UTC · original · edited 2026-11-26 04:46 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T04:46:11.523804Z f2061ff Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 04:41 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2737#issuecomment-7182819245) · edited 2026-11-26 04:46 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"f2061ff0b544875adb748f1cc6a673dfbeca22fd","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-26T04:46:11.523804Z">2026-11-26T04:46:11.523804Z</relative-time> | `f2061ff` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 04:46 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2061ff0b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 04:46 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2737#pullrequestreview-6068675599) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `f2061ff0b5` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
@ -2783,0 +2787,4 @@
# A scalar written from loop-invariant inputs only (no read of the key or of a key-dependent scalar, no
# load through a body address) holds the same value in every iteration, so the last pass's value is each
# lane's own: it may be live. The key and anything computed from it may not.
if close + 1 < len(ins) and (body_writes - {'scc'}) & live_in[close + 1] & (keyed | {key}):
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 04:46 UTC · original

P1 Badge Update the documented waterfall live-out restriction

This now accepts compute waterfalls with key-independent scalars live at exit, but docs/experiments.md:15744-15747 still requires temporary scalars to be dead and lists any live scalar as a refusal. The published support boundary therefore contradicts the newly accepted fixture. Update that section to distinguish invariant from key-dependent live-outs, as required by the public-capability documentation rule in AGENTS.md.

AGENTS.md reference: AGENTS.md:L315-L316

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 04:46 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2737#discussion_r4703994401) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Update the documented waterfall live-out restriction** This now accepts compute waterfalls with key-independent scalars live at exit, but `docs/experiments.md:15744-15747` still requires temporary scalars to be dead and lists any live scalar as a refusal. The published support boundary therefore contradicts the newly accepted fixture. Update that section to distinguish invariant from key-dependent live-outs, as required by the public-capability documentation rule in `AGENTS.md`. AGENTS.md reference: [AGENTS.md:L315-L316](https://github.com/R0Y00/Xbox2Windows/blob/f2061ff0b544875adb748f1cc6a673dfbeca22fd/AGENTS.md#L315-L316) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
@ -2783,0 +2787,4 @@
# A scalar written from loop-invariant inputs only (no read of the key or of a key-dependent scalar, no
# load through a body address) holds the same value in every iteration, so the last pass's value is each
# lane's own: it may be live. The key and anything computed from it may not.
if close + 1 < len(ins) and (body_writes - {'scc'}) & live_in[close + 1] & (keyed | {key}):
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 04:49 UTC · original

Fixed in 132d59c4. docs/experiments.md (waterfall section) now separates the two cases: a live-out scalar written only from constants or loop-invariant inputs (no read of the key or of a key-dependent scalar) is accepted, while a live-out that depends on the key stays refused. It also names the fixtures: the accepted invariant case with the D3D12 WARP readback, and the refused key-dependent cases.

Commands run locally: git diff --check (clean), python3 tests/startup_compute_waterfall.py (exit 0, docs-only change on top of f2061ff0).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 04:49 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2737#discussion_r4704010971) Fixed in 132d59c4. `docs/experiments.md` (waterfall section) now separates the two cases: a live-out scalar written only from constants or loop-invariant inputs (no read of the key or of a key-dependent scalar) is accepted, while a live-out that depends on the key stays refused. It also names the fixtures: the accepted invariant case with the D3D12 WARP readback, and the refused key-dependent cases. Commands run locally: `git diff --check` (clean), `python3 tests/startup_compute_waterfall.py` (exit 0, docs-only change on top of f2061ff0). AI-assisted; commands listed were executed locally.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-26 05:13 UTC · original · approved these changes

The proof propagates key-dependent reads through the body and treats body loads as dependent. Live-out reads are accepted only for invariant writes, and the docs now state that boundary. I reran the Release dispatch both from the exact source and combined with current scalar tracking. WARP and RTX 4060 Laptop matched all 320 words for active counts 0–4 and uniform keys. Each wrong-value control still returned its expected mismatch.

**@⁠R0Y00** on GitHub · 2026-11-26 05:13 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2737#pullrequestreview-6068876011) · **approved these changes** The proof propagates key-dependent reads through the body and treats body loads as dependent. Live-out reads are accepted only for invariant writes, and the docs now state that boundary. I reran the Release dispatch both from the exact source and combined with current scalar tracking. WARP and RTX 4060 Laptop matched all 320 words for active counts 0–4 and uniform keys. Each wrong-value control still returned its expected mismatch.
This discussion has been locked. Commenting is limited to contributors.
No description provided.