startup: lower one slot 57 scalar load in a pre-exchange execz block (Part of #2413) #2652
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2660"
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-26T01:01:52Z.
Part of #2413 (claim), the slice described in the maintainer's comment of 2026-11-26 00:35Z: one scalar load in a pre-exchange
s_cbranch_execzblock whose result is live after the join. It follows #2643 and sits next to #2601's scalar shifts.Accepted shape (between the group-index and count exchanges):
Semantics. The guest runs the block once per wave when any lane of the wave is active, and the active lanes are a prefix (
thread < bound). So:wave_any = (tid & ~63u) < boundat the compare.wave_anyis false, so an empty wave issues no load and keeps the previous value ofs<d>.The bound, the load's offset and
s<d>must be wave-uniform.Still refused:
s_load_dword, wider loads, buffer stores and atomics;Tests (Windows 11, Python 3.14, DXC from the Windows SDK 10.0.26100), on main
5aac1edplus this commit:python -B tests/startup_mesh57_skeleton_check.py: ok, with the refusal controls above and a check that the branch uses the wave predicate captured at the compare.python -B tests/startup_mesh57_skeleton_check.py draw <dxc> <offscreen_check> warpandhardware: ok on WARP (Microsoft Basic Render Driver) and an NVIDIA GeForce RTX 5080. The source-built fixture covers:startup_mesh57_loop_refusal_check,startup_translator_check,docs_links_check.Mutation checks, run by hand. Each fails the controls and, where it changes the HLSL, the WARP draw:
wave_any;Measured on a local capture (counts only, inputs private) at main
b32eb9e(before the rebase): no additional slot 57 request translates. The 426 that pass the #2643 entry stop at this refusal, but their blocks hold several scalar loads and scalar ALU, while this slice takes exactly one load.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T01:06:17Z.
Review: COMMENTED
Review of head
c809415e(2 commits behind main, no conflict). Comment only.What I checked:
mesh_skeleton: the accepted shape needs exactly ones_buffer_load_dword, av_cmpx_gt_u32_e32 s<bound>, v<t>after as_mov_b64 exec, -1, no branch target between compare and branch, only no-effect or lane-only instructions otherwise, and a destination that is read after the join (live_at_joinfollows both fall-through and branch edges and stops at the count exchange). The refusal paths keep their own messages.wave_anyis captured at the compare, the bound must be a defined uniform SGPR, and the branch uses!wave_any. The[branch]attribute only applies to the block of the load.Commands run locally on this head:
python3 -B tests/startup_mesh57_skeleton_check.py: okpython3 -B tests/startup_mesh57_loop_refusal_check.py: okpython3 -B tests/startup_translator_check.py: 0 failedpython3 tests/docs_links_check.py: okpython3 tests/bidi_controls_check.py: okgit diff --check origin/main...HEAD: cleanwave_anycompare flipped to>: the skeleton check fails ("the branch uses the wave predicate captured at the compare").Notes:
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T01:10:32Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
c809415ea6187585e2e53bf34ea0201f2b5e9901:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2):1.30s(configure1.95s)ctest --preset dev -R 'startup_mesh57_skeleton|startup_mesh57_loop_refusal|startup_translator' --parallel 6 --no-tests=error --output-on-failure): 8/9 passed (2.69s:startup_mesh57_skeleton_wave_shift_hardware0.55s,startup_mesh57_skeleton_wave_shift_warp0.55s,startup_mesh57_loop_refusal0.23s,startup_mesh57_skeleton_exchange_hardware0.31s,startup_translator0.59s,startup_mesh57_skeleton1.27s,startup_mesh57_skeleton_exchange_warp2.32s,startup_mesh57_skeleton_draw_warp2.52s,startup_mesh57_skeleton_draw_hardware2.58s); skipped (capability, not a pass):startup_mesh57_skeleton_exchange_hardware/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2):2.70s(configure1.94s)ctest --preset release -R 'startup_mesh57_skeleton|startup_mesh57_loop_refusal|startup_translator' --parallel 6 --no-tests=error --output-on-failure): 8/9 passed (2.77s:startup_mesh57_skeleton_wave_shift_warp0.48s,startup_mesh57_skeleton_wave_shift_hardware0.50s,startup_mesh57_loop_refusal0.22s,startup_mesh57_skeleton_exchange_hardware0.29s,startup_translator0.53s,startup_mesh57_skeleton1.12s,startup_mesh57_skeleton_exchange_warp2.36s,startup_mesh57_skeleton_draw_hardware2.54s,startup_mesh57_skeleton_draw_warp2.65s); skipped (capability, not a pass):startup_mesh57_skeleton_exchange_hardwaretests/mesh_heap_sampler_check.pyok (0.6s),tests/startup_buffer_address_check.pyok (0.4s),tests/startup_buffer_format_word3_table_check.pyok (0.1s),tests/startup_compute_request_offline_check.pyok (0.4s),tests/startup_compute_store_format_xyzw_check.pyok (0.2s),tests/startup_compute_translate_check.pyok (0.2s),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.1s),tests/startup_gfx2hlsl_bit_alu_check.pyok (0.6s),tests/startup_gfx2hlsl_capture_check.pyok (0.9s),tests/startup_gfx2hlsl_cmp16_check.pyok (0.2s),tests/startup_gfx2hlsl_compare_dst_check.pyok (0.1s),tests/startup_gfx2hlsl_compute_check.pyok (0.3s),tests/startup_gfx2hlsl_cselect_mask_check.pyok (0.1s),tests/startup_gfx2hlsl_cvt_alu_check.pyok (0.2s),tests/startup_gfx2hlsl_cvt_off_f32_i4_check.pyok (0.2s),tests/startup_gfx2hlsl_cvt_pk_int16_check.pyok (0.2s),tests/startup_gfx2hlsl_f32_lg_check.pyok (1.1s),tests/startup_gfx2hlsl_f32_nan_check.pyok (4.1s),tests/startup_gfx2hlsl_fma_mix_check.pyok (0.1s),tests/startup_gfx2hlsl_getpc_refusal_check.pyok (0.1s),tests/startup_gfx2hlsl_handler_arity_check.pyok (0.1s),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_interp_p2_hi_check.pyok (0.2s),tests/startup_gfx2hlsl_join_symbols_check.pyok (0.2s),tests/startup_gfx2hlsl_loop_constants_check.pyok (0.1s),tests/startup_gfx2hlsl_mask_data_check.pyok (0.1s),tests/startup_gfx2hlsl_mask_overwrite_check.pyok (0.1s),tests/startup_gfx2hlsl_operand_count_check.pyok (0.3s),tests/startup_gfx2hlsl_pack_absdiff_check.pyok (2.1s),tests/startup_gfx2hlsl_pack_b32_f16_check.pyok (0.1s),tests/startup_gfx2hlsl_readfirstlane_recompute_check.pyok (0.1s),tests/startup_gfx2hlsl_readfirstlane_uniform_check.pyok (0.1s),tests/startup_gfx2hlsl_refusals_check.pyok (0.5s),tests/startup_gfx2hlsl_root_check.pyok (0.6s),tests/startup_gfx2hlsl_s_abs_check.pyok (0.1s),tests/startup_gfx2hlsl_s_bitset_check.pyok (0.1s),tests/startup_gfx2hlsl_sad_check.pyok (0.3s),tests/startup_gfx2hlsl_saveexec_same_reg_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_arity_check.pyok (0.2s),tests/startup_gfx2hlsl_scalar_brev_fold_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_m0_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_table_arity_check.pyok (0.2s),tests/startup_gfx2hlsl_sdwa_cvt_check.pyok (0.2s),tests/startup_gfx2hlsl_sgpr_spill_check.pyok (0.1s),tests/startup_gfx2hlsl_shift64_check.pyok (0.2s),tests/startup_gfx2hlsl_sload_const_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_smem_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_sop2_complement_check.pyok (4.8s),tests/startup_gfx2hlsl_sopk_accum_check.pyok (0.8s),tests/startup_gfx2hlsl_sopk_signext_check.pyok (0.1s),tests/startup_gfx2hlsl_swap_check.pyok (0.3s),tests/startup_gfx2hlsl_vopc_sdwa_check.pyok (3.7s),tests/startup_gfx2hlsl_waitcnt_depctr_check.pyok (0.1s),tests/startup_gfx2hlsl_watch_check.pyok (2.4s),tests/startup_image_2d_array_check.pyok (0.1s),tests/startup_image_3d_check.pyok (0.1s),tests/startup_image_gather_lz_check.pyok (0.5s),tests/startup_image_load_d16_check.pyok (0.8s),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.2s),tests/startup_image_sample_l_check.pyok (0.2s),tests/startup_image_sample_lod_check.pyok (0.5s),tests/startup_inline_sampler_check.pyok (0.1s),tests/startup_mesh57_loop_refusal_check.pyok (0.1s),tests/startup_mesh57_skeleton_check.pyok (0.7s),tests/startup_run_ps1_check.pyok (10.9s),tests/startup_run_sh_check.pyskipped (0.1s),tests/startup_sampler_heap_check.pyok (0.1s),tests/startup_shader_cache_rekey_check.pyok (2.2s),tests/startup_smem_address_check.pyok (0.1s),tests/startup_stream_fetch_check.pyok (0.2s),tests/startup_stream_interface_check.pyok (0.2s),tests/startup_translator_check.pyok (0.4s)sccache: 4/6 hits; wall64.0sAI-assisted; commands listed were executed locally.