Skip to content

shader: propagate descriptor pointers through s_add_u32/s_addc_u32 in gfx2hlsl (Part of #1723) - #2069

Merged
R0Y00 merged 19 commits into
R0Y00:mainfrom
tedin7:x2w-r23-desc-ptr-prop
Nov 25, 2026
Merged

R0Y00 merged 19 commits into
R0Y00:mainfrom
tedin7:x2w-r23-desc-ptr-prop

Conversation

@tedin7

@tedin7 tedin7 commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Part of #1723

What this unblocks: shaders that build a descriptor address with s_add_u32/s_addc_u32 (51-114 pairs in Run 20 #3) no longer lose the pointer, so the following s_load can fetch the right descriptor.

First clean slice in tools/startup/gfx2hlsl.py:

  • s_add_u32 sD, sP, <literal> on a table/root pointer keeps ('ptr', source, offset), in the same or another register pair.
  • s_addc_u32 sD+1, sP+1, 0 keeps the high word (ptrhi) when it follows a matching low-word add. The carry is taken as zero (offset below 1 MiB).
  • s_load* through an advanced pointer adds that offset to the descriptor (or root buffer) byte offset.
  • Fix: a register addend on a pointer used to leave the pointer unchanged without any error. It is now refused.
  • Still refused: advanced sampler/resource heap pointers, and an advanced pointer used whole as a descriptor.

Test: tests/startup_gfx2hlsl_desc_ptr_prop_check.py, registered as startup_gfx2hlsl_desc_ptr_prop in CMakeLists.txt.

Verification:

  • python3 -B tests/startup_gfx2hlsl_desc_ptr_prop_check.py: ok (7 checks) with the change.
  • Same test against origin/main gfx2hlsl.py: fails (s_addc_u32 refused; register addend accepted silently).
  • for t in tests/startup_gfx2hlsl_*.py; do python3 -B $t; done: all exit 0.
  • Not run on Win2025: Python-only change, no CMake build executed here.

AI-assisted; commands listed were executed locally.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
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-25T00:05:56.377428Z 11ee884 PR opened
ℹ️ 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 11ee88438c

ℹ️ 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".

Comment thread tools/startup/gfx2hlsl.py Resolved
Comment thread tools/startup/gfx2hlsl.py Resolved
Comment thread tools/startup/gfx2hlsl.py Resolved
A table or root pointer advanced by a literal offset now keeps its source and
byte offset, so a following s_load reads the advanced descriptor. A register
addend on a pointer is refused instead of silently keeping the old pointer.

Part of R0Y00#1723
@tedin7
tedin7 force-pushed the x2w-r23-desc-ptr-prop branch from 11ee884 to 72eee11 Compare November 25, 2026 10:59

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On 49f5fabe, the original ten controls pass. Removing the high-word s_addc_u32 from the out-of-place fixture still allows s_load_dwordx4 s[4:7], s[20:21], 0x10 and returns the same table+0x50 symbol, even though s21 was never defined. The load looks up only s20. Please require a completed matching pair for this fold. Cover a missing, overwritten, or mismatched high word, plus a valid complete pair across a low-DWORD carry. If SCC or either raw half is observed independently, model that result or refuse that form.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed in 41599ffd and 91f4b214. Thanks for the careful review. You were right: the load looked up only the low register of the pair.

What changed:

  • s_add_u32 on a descriptor pointer now marks the high word as pending.
  • Only the matching s_addc_u32 (immediately after, high half of the same source pair, literal 0) completes it.
  • s_load through an advanced pointer now requires the high word to be that completed pair. Otherwise it is refused.

New checks in tests/startup_gfx2hlsl_desc_ptr_prop_check.py:

  • missing high-word add is refused
  • missing high-word add in place is refused
  • overwritten high word is refused
  • high word from another pointer is refused
  • high word from a different register pair is refused
  • complete pair with a large low-word add is folded (valid pair, low-dword carry range)

The s_addc_u32 is only accepted as the direct successor of its s_add_u32, so SCC is never observed by anything else. A pair whose halves are read separately is refused.

Commands run (Linux):

  • python3 -B tests/startup_gfx2hlsl_desc_ptr_prop_check.py: before the change, 3 new checks fail; after, all pass.
  • python3 -B on startup_gfx2hlsl_join_symbols_check.py, smem_offset_check.py, smem_address_check.py, root_check.py, refusals_check.py, add_sub_co_check.py, scalar_m0_check.py: all pass.

Follow-up fixes (second review):

  • A table pointer is one 32-bit register with no high word. Only 64-bit pointers (root, vertex-buffer table) need the add/addc pair, and only they get the pending high-word marker. A table advance with the low add alone now loads. The neighbouring register keeps its symbol.
  • The high operand of s_addc_u32 is now judged by what it holds (the high word of the same pointer), not by sitting next to the low word. A copied high word or a low word held in m0 is accepted.
  • New checks use the real state from setup_entry: table advance, table in place, root pair, root without high add, copied high, low in m0.
  • python3 -B tests/startup_gfx2hlsl_desc_ptr_prop_check.py: 7 new checks fail before the fix, all pass after. The seven sibling checks listed above still pass.

AI-assisted; commands listed were executed locally.

@tedin7
tedin7 requested a review from R0Y00 November 25, 2026 15:22
@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

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

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target cpu_exe_io cpu_frame_guest cpu_frame_host cpu_shim_draw cpu_shim_startup cpu_shim_startup_guest cpu_shim_startup_lifted cpu_tls_sink d3d12_xs_device_obj d3d12_xs_sh ... (cut, ~41 names in total)): 63.09s (configure 0.00s)
    • Test (ctest --preset dev -R '^(adapter_selection_unmatched|bc7_draw_warp|bc7_mode6_multiblock_warp|bvh_atomics_warp|bvh_buffer_ops_warp|bvh_differential_pipeline_warp|bvh_differential_warp|bvh_hits_warp|bvh ... (cut, ~503 names in total)): 471/495 passed (579.04s: startup_gfx2hlsl_f32_sdwa_warp 19.17s, pixel_aot_warp 19.07s, compute_store_aot_descriptor_load_format_warp 38.45s, startup_gfx2hlsl_f32_nan_warp 11.88s, startup_mrt_dxc_warp 13.58s, startup_mrt_fxc_warp 13.63s, pixel_aot_compare_warp 12.54s, startup_image_gather_c_lz_warp 4.44s, startup_gfx2hlsl_bit_alu_warp 6.52s, startup_run_ps1 11.99s, ...); skipped (capability, not a pass): bvh_wave64_warp, wave_shuffle_warp, shader_wave32_warp, shader_wave64_warp, startup_logical_view_warp, startup_run_sh, spirv_address_window_warp, spirv_address_window_atomic_warp, spirv_address_window_signed_warp, startup_draw_depth_target_debug_warp, spirv_address_window_float_warp, spirv_address_window_vec4_warp, spirv_address_window_qword_warp, spirv_sampler_views_warp, spirv_ballot_extract_warp, spirv_compaction_warp, spirv_compare_sampler_warp, spirv_minlod_warp, spirv_minlod_exact_warp, spirv_minlod_levels_warp, spirv_minlod_fractional_warp, pixel_batch_debug_warp, mesh_two_exits_warp, bc7_mode6_multiblock_warp
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target cpu_exe_io cpu_frame_guest cpu_frame_host cpu_shim_draw cpu_shim_startup cpu_shim_startup_guest cpu_shim_startup_lifted cpu_tls_sink d3d12_xs_device_obj d3d12_x ... (cut, ~41 names in total)): 2.24s (configure 0.00s)
    • Test (ctest --preset release -R '^(adapter_selection_unmatched|bc7_draw_warp|bc7_mode6_multiblock_warp|bvh_atomics_warp|bvh_buffer_ops_warp|bvh_differential_pipeline_warp|bvh_differential_warp|bvh_hits_warp ... (cut, ~503 names in total)): 471/495 passed (443.94s: pixel_aot_warp 18.81s, cpu_shim_shadow_warp 5.81s, cpu_shim_upload_texture_warp 4.34s, compute_store_aot_descriptor_load_format_warp 38.83s, pixel_aot_buffer_color_warp 13.86s, pixel_aot_compare_warp 23.88s, pixel_aot_three_way_warp 13.81s, pixel_aot_bits_warp 15.90s, pixel_aot_comparisons_warp 9.16s, startup_vertex_fetch_formats_warp 44.22s, ...); skipped (capability, not a pass): bvh_wave64_warp, wave_shuffle_warp, shader_wave32_warp, shader_wave64_warp, startup_logical_view_warp, startup_run_sh, spirv_address_window_warp, spirv_address_window_atomic_warp, startup_draw_depth_target_debug_warp, spirv_address_window_signed_warp, spirv_address_window_float_warp, spirv_address_window_vec4_warp, spirv_address_window_qword_warp, spirv_sampler_views_warp, spirv_ballot_extract_warp, spirv_compaction_warp, spirv_compare_sampler_warp, spirv_minlod_warp, spirv_minlod_exact_warp, spirv_minlod_levels_warp, spirv_minlod_fractional_warp, pixel_batch_debug_warp, mesh_two_exits_warp, bc7_mode6_multiblock_warp
  • sccache: 89/888 hits; wall 1102.9s

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

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

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2): 2.76s (configure 1.65s)
    • Test (ctest --preset dev -R '^(startup_gfx2hlsl_.*|pixel_aot_.*_warp|compute_store_aot_.*_warp|form_coverage)$' --parallel 6 --no-tests=error --output-on-failure): 296/296 passed (127.64s: pixel_aot_bits_warp 13.46s, pixel_aot_buffer_color_warp 7.37s, form_coverage 26.25s, pixel_aot_three_way_warp 7.53s, startup_gfx2hlsl_f32_nan_warp 30.21s, pixel_aot_compare_warp 31.60s, pixel_aot_comparisons_warp 9.74s, startup_gfx2hlsl_f32_sdwa_warp 36.11s, pixel_aot_e64_warp 7.79s, compute_store_aot_heap_view_load_warp 9.53s, startup_gfx2hlsl_cvt_alu_warp 6.67s, compute_store_aot_descriptor_load_format_warp 43.23s, compute_store_aot_guard_read_warp 7.84s, pixel_aot_blend_scalar_warp 9.86s, compute_store_aot_lds_qword_warp 6.84s, compute_store_aot_lds_arithmetic_warp 6.39s, startup_gfx2hlsl_f32_sdwa_hardware 19.33s, pixel_aot_cmpx_regions_warp 7.26s, pixel_aot_cvt_flr_rpi_warp 5.98s, startup_gfx2hlsl_f32_nan_hardware 13.47s, compute_store_aot_mimg_mip_warp 4.89s, compute_store_aot_mimg_load_warp 4.96s, compute_store_aot_heap_view_store_warp 8.84s, pixel_aot_cvt_f64_f32_warp 7.49s, pixel_aot_f16_arith_warp 6.46s, pixel_aot_predicate_rounding_warp 5.65s, compute_store_aot_lds_private_warp 4.90s, compute_store_aot_mimg_packed_warp 4.07s, pixel_aot_compare_gather_warp 3.39s, pixel_aot_gather_warp 3.50s, compute_store_aot_lds_f32_warp 4.35s, pixel_aot_cmpx_e64_warp 5.21s, pixel_aot_core_vector_warp 6.01s, compute_store_aot_lds_replacement_warp 3.08s, startup_gfx2hlsl_f32_nan 6.98s, pixel_aot_exec_regions_warp 5.87s, pixel_aot_compare_sample_warp 3.17s, startup_gfx2hlsl_bit_alu_warp 6.73s, compute_store_aot_lds_packed_warp 3.26s, startup_gfx2hlsl_f32_lg_warp 4.94s, pixel_aot_sample_coarse_gradient_warp 2.76s, pixel_aot_sample_gradient_warp 2.63s, compute_store_aot_mubuf_reduction_x2_warp 2.72s, compute_store_aot_mimg_atomic_counter_warp 2.33s, compute_store_aot_alu_lane_gaps_warp 1.81s, compute_store_aot_lane_mask_warp 2.38s, compute_store_aot_mtbuf_store_warp 2.73s, compute_store_aot_mubuf_reduction_warp 2.79s, startup_gfx2hlsl_sop2_complement 5.82s, compute_store_aot_mimg_store_packed_warp 2.70s, compute_store_aot_mimg_store_warp 2.60s, startup_gfx2hlsl_cvt_alu_hardware 5.83s, compute_store_aot_gfx1013_image_atomics_warp 1.96s, compute_store_aot_mubuf_d16_warp 2.31s, compute_store_aot_mubuf_store_format_warp 2.41s, pixel_aot_dpp_f16_warp 4.34s, compute_store_aot_vcmp_select_warp 2.67s, compute_store_aot_mimg_atomic_float_warp 2.05s, compute_store_aot_mtbuf_load_warp 2.61s, pixel_aot_sample_offset_warp 2.14s, compute_store_aot_descriptor_store_format_warp 1.99s, compute_store_aot_mimg_resinfo_warp 2.21s, compute_store_aot_mubuf_store_subword_warp 2.10s, compute_store_aot_f32_warp 2.11s, pixel_aot_cvt_int_f64_warp 4.41s, compute_store_aot_lds_wide_replacement_warp 1.94s, startup_gfx2hlsl_cmp_class_f16 5.57s, compute_store_aot_sub_co_warp 1.36s, pixel_aot_f16_round_warp 4.34s, compute_store_aot_ff1_scalar_warp 1.40s, compute_store_aot_scratch_base_warp 1.61s, compute_store_aot_mbcnt_warp 1.46s, startup_gfx2hlsl_vopc_sdwa 5.78s, compute_store_aot_add_co_warp 1.33s, compute_store_aot_cvt_u32_f32_warp 1.42s, compute_store_aot_gfx1013_gather4_l_warp 1.74s, compute_store_aot_bcnt_exec_warp 1.34s, compute_store_aot_mubuf_subword_warp 1.91s, compute_store_aot_mimg_atomic_minmax_warp 1.78s, startup_gfx2hlsl_bit_alu_hardware 6.57s, compute_store_aot_dot_u_warp 1.35s, compute_store_aot_writelane_warp 1.39s, compute_store_aot_vadd_nc_i32_warp 1.49s, compute_store_aot_salu_i32_warp 1.39s, compute_store_aot_ff1_exec_warp 1.20s, pixel_aot_get_lod_warp 1.78s, compute_store_aot_lds_strided_warp 1.76s, compute_store_aot_mimg_atomic_integer_warp 1.76s, compute_store_aot_alu_xor3_warp 1.97s, compute_store_aot_alu_bcnt_warp 2.05s, compute_store_aot_alu_minmax3_warp 1.89s, compute_store_aot_salu_absdiff_warp 1.45s, compute_store_aot_bfe_warp 1.42s, startup_gfx2hlsl_f32_lg_hardware 4.87s, compute_store_aot_mubuf_format_warp 1.70s, compute_store_aot_mubuf_load_format_d16_warp 1.68s, startup_gfx2hlsl_s_lshl_add 4.68s, compute_store_aot_readlane_warp 1.22s, compute_store_aot_alu_cvt_pk_u8_warp 1.79s, startup_gfx2hlsl_cmp_class 6.02s, pixel_aot_cmp_f64_warp 4.34s, pixel_aot_dpp_extra_warp 3.09s, compute_store_aot_mac_f32_warp 1.37s, compute_store_aot_mubuf_csub_warp 1.05s, compute_store_aot_alu_mad_i24_warp 1.50s, compute_store_aot_mubuf_exchange_warp 1.45s, compute_store_aot_alu_med3_warp 1.46s, compute_store_aot_mubuf_counter_warp 1.33s, compute_store_aot_mubuf_vector_warp 1.57s, compute_store_aot_mubuf_counter-x2_warp 1.31s, compute_store_aot_mubuf_exchange-x2_warp 1.46s, compute_store_aot_ds_route_warp 1.34s, pixel_aot_shift64_warp 4.11s, pixel_aot_f16_fmac_ldexp_warp 3.75s, compute_store_aot_dpp_warp 1.16s, pixel_aot_region_body_warp 2.46s, pixel_aot_sample_lod_warp 1.76s, compute_store_aot_mimg_msaa_warp 1.15s, compute_store_aot_mimg_atomic_exchange_warp 1.25s, pixel_aot_dmask_warp 1.56s, compute_store_aot_mubuf_store_format_xyz_warp 1.15s, compute_store_aot_gfx1013_image_store_warp 1.00s, pixel_aot_rndne_warp 1.61s, pixel_aot_cmp64_warp 2.98s, pixel_aot_attribute_warp 1.03s, pixel_aot_vop3_ternary_int_warp 1.68s, pixel_aot_int16_ternary_warp 2.74s, pixel_aot_cvt_f64_int_warp 2.43s, startup_gfx2hlsl_shift64_warp 3.56s, pixel_aot_u32_from_f32_warp 1.47s, startup_gfx2hlsl_sdwa_cvt_warp 2.09s, pixel_aot_dpp_cvt_warp 2.56s, pixel_aot_scc_skip_warp 1.96s, pixel_aot_f16_cvt_int16_warp 2.56s, startup_gfx2hlsl_dpp_pair_warp 2.09s, pixel_aot_cvt_f32_f64_warp 2.01s, compute_store_aot_gfx1013_image_store_d16_warp 1.03s, pixel_aot_cvt_float_int_e64_warp 2.24s, compute_store_aot_desc_numeric_warp 1.40s, startup_gfx2hlsl_f32_sdwa 3.08s, pixel_aot_swaprel_warp 1.20s, compute_store_aot_gfx1013_image_uav_load_warp 0.93s, pixel_aot_plain_bitscan_warp 1.55s, pixel_aot_mac_legacy_warp 1.32s, startup_gfx2hlsl_dpp_pair_hardware 2.01s, pixel_aot_align_warp 1.51s, pixel_aot_plain_movrel_warp 1.77s, pixel_aot_pk_fmac_warp 2.10s, pixel_aot_f16_to_int16_warp 1.84s, startup_gfx2hlsl_watch 2.68s, startup_gfx2hlsl_shift64_hardware 3.35s, pixel_aot_bitset64_warp 1.77s, pixel_aot_int16_vop3_warp 1.72s, startup_gfx2hlsl_dpp_quad_swap_warp 1.94s, pixel_aot_flat_scratch_warp 1.46s, pixel_aot_sdwa_integer_warp 1.32s, startup_gfx2hlsl_mad_dispatch_hardware 1.64s, pixel_aot_e64_spellings_warp 1.28s, startup_gfx2hlsl_dpp_quad_swap_hardware 2.10s, pixel_aot_first_bit_warp 1.56s, pixel_aot_dpp_movrel_warp 1.43s, startup_gfx2hlsl_compute_hardware 2.15s, pixel_aot_mad64_warp 1.27s, pixel_aot_sdwa_movrel_warp 1.30s, pixel_aot_div_fmas_warp 1.39s, pixel_aot_region_scalar_load_warp 1.60s, pixel_aot_uncompressed_integer_export_warp 1.21s, startup_gfx2hlsl_mad_dispatch_warp 1.64s, pixel_aot_carry_in_warp 1.13s, pixel_aot_uncompressed_export_warp 1.16s, pixel_aot_carry_out_warp 1.10s, pixel_aot_sdwa_unary_warp 1.13s, startup_gfx2hlsl_cmp16_warp 2.03s, pixel_aot_swap_warp 1.20s, pixel_aot_brev_warp 1.17s, startup_gfx2hlsl_sdwa_cvt_hardware 1.89s, startup_gfx2hlsl_mad_preserve_hardware 1.04s, pixel_aot_smovrel_warp 1.28s, pixel_aot_region_scalar_alu_warp 1.21s, startup_gfx2hlsl_cmp16_hardware 1.96s, pixel_aot_region_waits_warp 1.20s, pixel_aot_sdwa_cmp_warp 1.13s, pixel_aot_frexp_exp_warp 1.06s, pixel_aot_sad_warp 1.10s, pixel_aot_e64_integer_warp 1.01s, pixel_aot_s_call_warp 1.14s, startup_gfx2hlsl_f32_lg 1.55s, pixel_aot_vop1_nops_warp 0.82s, pixel_aot_bfm_warp 0.99s, pixel_aot_title_loads_warp 1.23s, pixel_aot_smem_pointers_warp 0.99s, pixel_aot_compressed_export_warp 0.97s, pixel_aot_sopk_hwreg_warp 0.82s, pixel_aot_integer_nc_warp 1.00s, pixel_aot_pack_b32_warp 0.94s, startup_gfx2hlsl_compute_warp 2.12s, pixel_aot_ds_swizzle_warp 0.98s, pixel_aot_pack_int16_warp 0.98s, pixel_aot_e64_approx_warp 0.88s, startup_gfx2hlsl_scalar_m0_warp 1.19s, pixel_aot_sopp_round_mode_warp 0.91s, startup_gfx2hlsl_compute_dropped-store_hardware 0.34s, startup_gfx2hlsl_compute_swapped-axes_hardware 0.34s, startup_gfx2hlsl_compute_b-offset_hardware 0.33s, startup_gfx2hlsl_vopc_sdwa_warp 1.38s, startup_gfx2hlsl_mad_preserve_warp 1.07s, startup_gfx2hlsl_vopc_sdwa_hardware 1.33s, startup_gfx2hlsl_compute_c-unpredicated_hardware 0.34s, startup_gfx2hlsl_compute_mbcnt_warp 0.75s, startup_gfx2hlsl_sgpr_spill_warp 1.01s, startup_gfx2hlsl_interp_f16_warp 0.95s, startup_gfx2hlsl_dpp_quad_broadcast_warp 1.01s, pixel_aot_attribute_sampled_warp 0.76s, startup_gfx2hlsl_scalar_m0_hardware 1.15s, startup_gfx2hlsl_capture 1.22s, startup_gfx2hlsl_compute_dropped-store_warp 0.29s, startup_gfx2hlsl_compute_c-unpredicated_warp 0.29s, startup_gfx2hlsl_compute_b-offset_warp 0.31s, startup_gfx2hlsl_sgpr_spill_hardware 1.03s, startup_gfx2hlsl_compute_swapped-axes_warp 0.33s, startup_gfx2hlsl_compute_controls 0.57s, startup_gfx2hlsl_root 0.83s, startup_gfx2hlsl_dpp_quad_broadcast_hardware 1.22s, startup_gfx2hlsl_cvt_pk_u8_warp 1.03s, startup_gfx2hlsl_join_symbols_warp 0.41s, startup_gfx2hlsl_compute_g-overlap_warp 0.30s, startup_gfx2hlsl_sopk_accum 1.15s, startup_gfx2hlsl_interp_f16_hardware 0.98s, startup_gfx2hlsl_join_symbols_controls 0.25s, startup_gfx2hlsl_bit_alu_controls 0.85s, startup_gfx2hlsl_cvt_pk_u8_hardware 0.81s, startup_gfx2hlsl_refusals 0.57s, startup_gfx2hlsl_sdwa 0.18s, startup_gfx2hlsl_sample_c_lz_mip 0.19s, startup_gfx2hlsl_buffer_store 0.56s, startup_gfx2hlsl_compute_mbcnt_hardware 0.70s, startup_gfx2hlsl_compute_g-swapped-offsets_warp 0.29s, startup_gfx2hlsl_cvt_alu_controls 0.18s, startup_gfx2hlsl_compute_j-scalar-dropped_warp 0.29s, startup_gfx2hlsl_swap 0.31s, startup_gfx2hlsl_join_symbols_hardware 0.38s, startup_gfx2hlsl_compute_h-inner-unpredicated_warp 0.29s, startup_gfx2hlsl_draw_skip 0.49s, startup_gfx2hlsl_compute_k-block-entered_hardware 0.29s, startup_gfx2hlsl_compute_g-swapped-offsets_hardware 0.29s, startup_gfx2hlsl_compute_f-peer_hardware 0.31s, startup_gfx2hlsl_interp_f16_controls 0.23s, startup_gfx2hlsl_compute_k-block-entered_warp 0.30s, startup_gfx2hlsl_compute_h-inner-unpredicated_hardware 0.29s, startup_gfx2hlsl_compute_j-scalar-dropped_hardware 0.30s, startup_gfx2hlsl_compute_g-overlap_hardware 0.29s, startup_gfx2hlsl_compute_f-broadcast_hardware 0.29s, startup_gfx2hlsl_sdwa_cvt 0.30s, startup_gfx2hlsl_join_symbols_folded_warp 0.22s, startup_gfx2hlsl_compute_f-broadcast_warp 0.30s, startup_gfx2hlsl_dpp_quad_swap_controls 0.16s, startup_gfx2hlsl_sopk_signext 0.16s, startup_gfx2hlsl_cmp16_controls 0.27s, startup_gfx2hlsl_compute_f-peer_warp 0.31s, startup_gfx2hlsl_shift64_controls 0.15s, startup_gfx2hlsl_operand_count 0.21s, startup_gfx2hlsl_dpp_pair 0.13s, startup_gfx2hlsl_scalar_m0_controls 0.11s, startup_gfx2hlsl_export_mask_drop_control 0.15s, startup_gfx2hlsl_export_mask 0.14s, startup_gfx2hlsl_join_symbols_folded_hardware 0.22s, startup_gfx2hlsl_sgpr_spill_controls 0.14s, startup_gfx2hlsl_add_sub_co_controls 0.12s, startup_gfx2hlsl_calculated_target 0.11s, startup_gfx2hlsl_readfirstlane_uniform 0.14s, startup_gfx2hlsl_s_sext_cmov 0.12s, startup_gfx2hlsl_cvt_pk_u8_controls 0.12s, startup_gfx2hlsl_scalar_shift64_bfe_controls 0.22s, startup_gfx2hlsl_opsel 0.10s, startup_gfx2hlsl_tbuffer_16f 0.11s, startup_gfx2hlsl_vcvt_omod 0.11s, startup_gfx2hlsl_dpp_quad_broadcast 0.14s, startup_gfx2hlsl_mask_overwrite_controls 0.12s, startup_gfx2hlsl_int_med3_controls 0.12s, startup_gfx2hlsl_cselect_mask_controls 0.11s, startup_gfx2hlsl_s_bitcmp 0.11s, startup_gfx2hlsl_cndmask_neg 0.11s, startup_gfx2hlsl_desc_ptr_prop 0.11s, startup_gfx2hlsl_smem_offset 0.11s, startup_gfx2hlsl_b64_shift 0.10s, startup_gfx2hlsl_readfirstlane_recompute 0.12s, startup_gfx2hlsl_op_refusals 0.10s, startup_gfx2hlsl_neg_operand 0.10s, startup_gfx2hlsl_handler_arity 0.11s, startup_gfx2hlsl_loop_constants 0.10s, startup_gfx2hlsl_compare_dst_controls 0.10s, startup_gfx2hlsl_scalar_brev_fold 0.11s, startup_gfx2hlsl_saveexec_same_reg_controls 0.10s, startup_gfx2hlsl_mad_controls 0.13s, startup_gfx2hlsl_image_arity 0.10s, startup_gfx2hlsl_image_get_lod_controls 0.11s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2): 127.65s (configure 1.66s)
    • Test (ctest --preset release -R '^(startup_gfx2hlsl_.*|pixel_aot_.*_warp|compute_store_aot_.*_warp|form_coverage)$' --parallel 6 --no-tests=error --output-on-failure): 296/296 passed (131.40s: pixel_aot_three_way_warp 17.18s, pixel_aot_buffer_color_warp 17.54s, pixel_aot_bits_warp 22.31s, form_coverage 29.01s, startup_gfx2hlsl_f32_nan_warp 14.63s, startup_gfx2hlsl_f32_sdwa_warp 35.42s, pixel_aot_compare_warp 14.62s, startup_gfx2hlsl_f32_sdwa_hardware 19.69s, pixel_aot_e64_warp 7.53s, pixel_aot_comparisons_warp 11.29s, compute_store_aot_guard_read_warp 8.07s, compute_store_aot_lds_qword_warp 7.29s, compute_store_aot_lds_arithmetic_warp 6.80s, pixel_aot_blend_scalar_warp 10.14s, compute_store_aot_descriptor_load_format_warp 47.57s, startup_gfx2hlsl_f32_nan_hardware 13.67s, compute_store_aot_lds_private_warp 4.81s, compute_store_aot_mimg_mip_warp 4.77s, pixel_aot_cmpx_e64_warp 5.42s, compute_store_aot_heap_view_load_warp 7.57s, startup_gfx2hlsl_f32_nan 6.98s, pixel_aot_f16_arith_warp 6.23s, compute_store_aot_lds_f32_warp 4.35s, compute_store_aot_mimg_load_warp 4.83s, compute_store_aot_mimg_packed_warp 4.07s, pixel_aot_cvt_f64_f32_warp 7.55s, compute_store_aot_heap_view_store_warp 8.72s, pixel_aot_core_vector_warp 6.25s, compute_store_aot_mimg_store_packed_warp 2.64s, pixel_aot_compare_gather_warp 3.36s, pixel_aot_cvt_flr_rpi_warp 5.74s, startup_gfx2hlsl_vopc_sdwa 6.45s, compute_store_aot_mtbuf_load_warp 2.63s, compute_store_aot_mubuf_reduction_x2_warp 2.75s, compute_store_aot_lds_replacement_warp 3.06s, compute_store_aot_mimg_atomic_counter_warp 2.54s, compute_store_aot_mubuf_reduction_warp 2.75s, compute_store_aot_mtbuf_store_warp 2.69s, startup_gfx2hlsl_cvt_alu_warp 5.99s, compute_store_aot_mubuf_subword_warp 2.01s, startup_gfx2hlsl_cvt_alu_hardware 5.96s, compute_store_aot_lds_packed_warp 3.11s, compute_store_aot_mimg_atomic_float_warp 1.98s, compute_store_aot_mimg_store_warp 2.60s, pixel_aot_cmpx_regions_warp 7.25s, pixel_aot_compare_sample_warp 3.12s, startup_gfx2hlsl_f32_lg_hardware 4.57s, compute_store_aot_salu_i32_warp 1.48s, pixel_aot_predicate_rounding_warp 5.30s, compute_store_aot_mimg_atomic_minmax_warp 1.76s, compute_store_aot_mubuf_store_format_warp 2.35s, compute_store_aot_descriptor_store_format_warp 1.95s, compute_store_aot_mubuf_d16_warp 2.28s, compute_store_aot_alu_minmax3_warp 1.88s, pixel_aot_sample_coarse_gradient_warp 2.65s, compute_store_aot_mimg_resinfo_warp 2.23s, compute_store_aot_mbcnt_warp 1.55s, startup_gfx2hlsl_cmp_class_f16 5.73s, compute_store_aot_bcnt_exec_warp 1.22s, compute_store_aot_cvt_u32_f32_warp 1.36s, compute_store_aot_mimg_atomic_integer_warp 1.72s, startup_gfx2hlsl_bit_alu_hardware 6.40s, pixel_aot_sample_gradient_warp 2.61s, compute_store_aot_lane_mask_warp 2.35s, compute_store_aot_mubuf_store_subword_warp 2.09s, compute_store_aot_f32_warp 2.21s, pixel_aot_cvt_int_f64_warp 4.87s, compute_store_aot_vadd_nc_i32_warp 1.44s, compute_store_aot_lds_wide_replacement_warp 2.04s, compute_store_aot_mubuf_load_format_d16_warp 1.76s, startup_gfx2hlsl_bit_alu_warp 6.65s, pixel_aot_shift64_warp 3.95s, compute_store_aot_bfe_warp 1.36s, startup_gfx2hlsl_sop2_complement 5.78s, startup_gfx2hlsl_f32_lg_warp 4.61s, compute_store_aot_alu_xor3_warp 1.86s, compute_store_aot_ff1_scalar_warp 1.29s, compute_store_aot_lds_strided_warp 1.75s, compute_store_aot_scratch_base_warp 1.59s, compute_store_aot_alu_cvt_pk_u8_warp 1.78s, startup_gfx2hlsl_cmp_class 6.37s, compute_store_aot_readlane_warp 1.38s, compute_store_aot_dot_u_warp 1.45s, compute_store_aot_alu_bcnt_warp 2.13s, compute_store_aot_mubuf_format_warp 1.98s, pixel_aot_sample_offset_warp 2.32s, pixel_aot_exec_regions_warp 6.27s, pixel_aot_f16_round_warp 4.83s, compute_store_aot_writelane_warp 1.80s, pixel_aot_gather_warp 4.10s, compute_store_aot_mubuf_exchange_warp 1.62s, startup_gfx2hlsl_s_lshl_add 5.82s, compute_store_aot_mubuf_exchange-x2_warp 1.59s, compute_store_aot_sub_co_warp 1.45s, pixel_aot_cmp_f64_warp 4.73s, compute_store_aot_ff1_exec_warp 1.31s, compute_store_aot_add_co_warp 1.40s, compute_store_aot_mubuf_csub_warp 1.29s, compute_store_aot_mubuf_vector_warp 1.65s, compute_store_aot_mimg_atomic_exchange_warp 1.35s, compute_store_aot_mubuf_counter_warp 1.49s, compute_store_aot_dpp_warp 1.17s, compute_store_aot_alu_med3_warp 1.56s, pixel_aot_get_lod_warp 1.86s, compute_store_aot_mubuf_counter-x2_warp 1.48s, compute_store_aot_mubuf_store_format_xyz_warp 1.41s, compute_store_aot_ds_route_warp 1.63s, compute_store_aot_mimg_msaa_warp 1.27s, compute_store_aot_alu_mad_i24_warp 1.50s, compute_store_aot_salu_absdiff_warp 1.52s, compute_store_aot_gfx1013_image_store_warp 1.08s, compute_store_aot_gfx1013_image_atomics_warp 1.99s, compute_store_aot_mac_f32_warp 1.48s, pixel_aot_region_body_warp 2.40s, pixel_aot_f16_fmac_ldexp_warp 3.83s, startup_gfx2hlsl_shift64_hardware 3.54s, pixel_aot_cvt_f64_int_warp 3.26s, pixel_aot_dpp_extra_warp 3.37s, startup_gfx2hlsl_dpp_pair_hardware 2.07s, pixel_aot_cmp64_warp 3.21s, compute_store_aot_vcmp_select_warp 2.84s, pixel_aot_int16_ternary_warp 2.95s, compute_store_aot_desc_numeric_warp 1.45s, pixel_aot_sample_lod_warp 1.90s, startup_gfx2hlsl_shift64_warp 3.60s, startup_gfx2hlsl_mad_dispatch_hardware 1.71s, pixel_aot_f16_cvt_int16_warp 2.73s, pixel_aot_dpp_f16_warp 4.66s, pixel_aot_dpp_cvt_warp 2.65s, compute_store_aot_alu_lane_gaps_warp 1.93s, pixel_aot_dmask_warp 1.62s, startup_gfx2hlsl_dpp_pair_warp 1.98s, startup_gfx2hlsl_f32_sdwa 3.33s, startup_gfx2hlsl_dpp_quad_swap_hardware 2.13s, pixel_aot_pk_fmac_warp 2.24s, pixel_aot_plain_movrel_warp 2.02s, startup_gfx2hlsl_compute_hardware 2.29s, pixel_aot_cvt_float_int_e64_warp 2.28s, pixel_aot_flat_scratch_warp 1.57s, compute_store_aot_gfx1013_image_store_d16_warp 0.96s, startup_gfx2hlsl_watch 2.80s, pixel_aot_scc_skip_warp 1.95s, pixel_aot_cvt_f32_f64_warp 2.09s, startup_gfx2hlsl_dpp_quad_swap_warp 2.11s, pixel_aot_f16_to_int16_warp 2.21s, pixel_aot_bitset64_warp 2.14s, pixel_aot_int16_vop3_warp 2.08s, pixel_aot_vop3_ternary_int_warp 2.03s, startup_gfx2hlsl_sdwa_cvt_hardware 2.11s, pixel_aot_sdwa_integer_warp 1.49s, startup_gfx2hlsl_cmp16_warp 2.15s, startup_gfx2hlsl_cmp16_hardware 2.13s, pixel_aot_align_warp 1.79s, pixel_aot_u32_from_f32_warp 1.38s, pixel_aot_dpp_movrel_warp 1.51s, pixel_aot_div_fmas_warp 1.62s, startup_gfx2hlsl_f32_lg 1.85s, pixel_aot_e64_spellings_warp 1.34s, startup_gfx2hlsl_mad_preserve_hardware 1.07s, pixel_aot_plain_bitscan_warp 1.63s, startup_gfx2hlsl_sdwa_cvt_warp 2.02s, pixel_aot_rndne_warp 1.68s, pixel_aot_first_bit_warp 1.62s, pixel_aot_sdwa_unary_warp 1.31s, pixel_aot_region_scalar_load_warp 1.77s, pixel_aot_sdwa_movrel_warp 1.43s, pixel_aot_swaprel_warp 1.23s, pixel_aot_pack_b32_warp 1.03s, pixel_aot_mac_legacy_warp 1.41s, compute_store_aot_gfx1013_gather4_l_warp 1.83s, pixel_aot_swap_warp 1.26s, pixel_aot_mad64_warp 1.40s, pixel_aot_carry_in_warp 1.28s, pixel_aot_region_scalar_alu_warp 1.27s, pixel_aot_sopk_hwreg_warp 0.92s, pixel_aot_uncompressed_integer_export_warp 1.26s, pixel_aot_title_loads_warp 1.53s, pixel_aot_uncompressed_export_warp 1.29s, startup_gfx2hlsl_mad_dispatch_warp 1.65s, pixel_aot_smovrel_warp 1.31s, pixel_aot_brev_warp 1.27s, pixel_aot_region_waits_warp 1.21s, pixel_aot_sdwa_cmp_warp 1.30s, pixel_aot_sad_warp 1.31s, pixel_aot_carry_out_warp 1.19s, pixel_aot_frexp_exp_warp 1.17s, pixel_aot_s_call_warp 1.23s, pixel_aot_e64_integer_warp 1.17s, pixel_aot_attribute_warp 1.07s, pixel_aot_integer_nc_warp 1.14s, startup_gfx2hlsl_scalar_m0_hardware 1.26s, pixel_aot_bfm_warp 1.15s, pixel_aot_vop1_nops_warp 0.97s, startup_gfx2hlsl_compute_warp 2.27s, pixel_aot_smem_pointers_warp 1.11s, pixel_aot_compressed_export_warp 1.05s, pixel_aot_e64_approx_warp 0.92s, pixel_aot_ds_swizzle_warp 1.01s, pixel_aot_pack_int16_warp 1.04s, startup_gfx2hlsl_vopc_sdwa_hardware 1.38s, startup_gfx2hlsl_scalar_m0_warp 1.22s, startup_gfx2hlsl_sgpr_spill_warp 1.05s, pixel_aot_sopp_round_mode_warp 0.98s, startup_gfx2hlsl_vopc_sdwa_warp 1.35s, startup_gfx2hlsl_capture 1.30s, startup_gfx2hlsl_mad_preserve_warp 1.04s, startup_gfx2hlsl_dpp_quad_broadcast_hardware 1.01s, startup_gfx2hlsl_sgpr_spill_hardware 1.05s, startup_gfx2hlsl_sopk_accum 1.14s, startup_gfx2hlsl_interp_f16_hardware 0.96s, startup_gfx2hlsl_interp_f16_warp 0.97s, startup_gfx2hlsl_dpp_quad_broadcast_warp 0.99s, compute_store_aot_gfx1013_image_uav_load_warp 1.33s, startup_gfx2hlsl_root 0.90s, startup_gfx2hlsl_cvt_pk_u8_warp 1.21s, startup_gfx2hlsl_bit_alu_controls 1.02s, pixel_aot_attribute_sampled_warp 0.97s, startup_gfx2hlsl_compute_mbcnt_warp 1.12s, startup_gfx2hlsl_compute_g-overlap_warp 0.32s, startup_gfx2hlsl_compute_g-swapped-offsets_warp 0.32s, startup_gfx2hlsl_join_symbols_hardware 0.40s, startup_gfx2hlsl_join_symbols_warp 0.43s, startup_gfx2hlsl_compute_mbcnt_hardware 0.76s, startup_gfx2hlsl_cvt_pk_u8_hardware 0.86s, startup_gfx2hlsl_draw_skip 0.55s, startup_gfx2hlsl_compute_j-scalar-dropped_warp 0.31s, startup_gfx2hlsl_buffer_store 0.59s, startup_gfx2hlsl_compute_b-offset_warp 0.33s, startup_gfx2hlsl_compute_controls 0.50s, startup_gfx2hlsl_refusals 0.60s, startup_gfx2hlsl_sdwa 0.25s, startup_gfx2hlsl_compute_k-block-entered_hardware 0.34s, startup_gfx2hlsl_compute_swapped-axes_warp 0.33s, startup_gfx2hlsl_compute_c-unpredicated_warp 0.35s, startup_gfx2hlsl_compute_dropped-store_warp 0.32s, startup_gfx2hlsl_compute_j-scalar-dropped_hardware 0.35s, startup_gfx2hlsl_join_symbols_folded_hardware 0.24s, startup_gfx2hlsl_compute_h-inner-unpredicated_warp 0.31s, startup_gfx2hlsl_join_symbols_controls 0.27s, startup_gfx2hlsl_compute_g-overlap_hardware 0.30s, startup_gfx2hlsl_compute_f-peer_hardware 0.29s, startup_gfx2hlsl_compute_f-broadcast_hardware 0.32s, startup_gfx2hlsl_compute_g-swapped-offsets_hardware 0.30s, startup_gfx2hlsl_scalar_shift64_bfe_controls 0.23s, startup_gfx2hlsl_compute_h-inner-unpredicated_hardware 0.29s, startup_gfx2hlsl_compute_swapped-axes_hardware 0.28s, startup_gfx2hlsl_compute_k-block-entered_warp 0.28s, startup_gfx2hlsl_compute_dropped-store_hardware 0.27s, startup_gfx2hlsl_compute_c-unpredicated_hardware 0.30s, startup_gfx2hlsl_compute_b-offset_hardware 0.30s, startup_gfx2hlsl_dpp_quad_swap_controls 0.14s, startup_gfx2hlsl_compute_f-peer_warp 0.30s, startup_gfx2hlsl_swap 0.32s, startup_gfx2hlsl_compute_f-broadcast_warp 0.29s, startup_gfx2hlsl_cmp16_controls 0.31s, startup_gfx2hlsl_interp_f16_controls 0.22s, startup_gfx2hlsl_cvt_alu_controls 0.18s, startup_gfx2hlsl_scalar_m0_controls 0.11s, startup_gfx2hlsl_sample_c_lz_mip 0.18s, startup_gfx2hlsl_join_symbols_folded_warp 0.20s, startup_gfx2hlsl_dpp_pair 0.15s, startup_gfx2hlsl_sdwa_cvt 0.33s, startup_gfx2hlsl_operand_count 0.22s, startup_gfx2hlsl_cndmask_neg 0.10s, startup_gfx2hlsl_vcvt_omod 0.11s, startup_gfx2hlsl_sopk_signext 0.15s, startup_gfx2hlsl_b64_shift 0.10s, startup_gfx2hlsl_desc_ptr_prop 0.11s, startup_gfx2hlsl_shift64_controls 0.18s, startup_gfx2hlsl_readfirstlane_uniform 0.15s, startup_gfx2hlsl_opsel 0.11s, startup_gfx2hlsl_sgpr_spill_controls 0.14s, startup_gfx2hlsl_tbuffer_16f 0.10s, startup_gfx2hlsl_smem_offset 0.10s, startup_gfx2hlsl_cvt_pk_u8_controls 0.12s, startup_gfx2hlsl_dpp_quad_broadcast 0.14s, startup_gfx2hlsl_s_sext_cmov 0.11s, startup_gfx2hlsl_export_mask_drop_control 0.15s, startup_gfx2hlsl_mad_controls 0.15s, startup_gfx2hlsl_op_refusals 0.10s, startup_gfx2hlsl_export_mask 0.14s, startup_gfx2hlsl_add_sub_co_controls 0.15s, startup_gfx2hlsl_image_get_lod_controls 0.12s, startup_gfx2hlsl_calculated_target 0.14s, startup_gfx2hlsl_int_med3_controls 0.16s, startup_gfx2hlsl_s_bitcmp 0.14s, startup_gfx2hlsl_readfirstlane_recompute 0.12s, startup_gfx2hlsl_scalar_brev_fold 0.16s, startup_gfx2hlsl_mask_overwrite_controls 0.12s, startup_gfx2hlsl_cselect_mask_controls 0.12s, startup_gfx2hlsl_saveexec_same_reg_controls 0.13s, startup_gfx2hlsl_handler_arity 0.13s, startup_gfx2hlsl_loop_constants 0.11s, startup_gfx2hlsl_image_arity 0.11s, startup_gfx2hlsl_neg_operand 0.10s, startup_gfx2hlsl_compare_dst_controls 0.10s)
  • Windows Python checks: tests/mesh_heap_sampler_check.py ok (0.5s), tests/startup_buffer_address_check.py ok (0.3s), tests/startup_compute_request_offline_check.py ok (0.3s), tests/startup_compute_translate_check.py ok (0.2s), tests/startup_flat_param_check.py ok (0.1s), tests/startup_gfx2hlsl_add_sub_co_check.py ok (0.1s), tests/startup_gfx2hlsl_bit_alu_check.py ok (0.5s), tests/startup_gfx2hlsl_capture_check.py ok (0.7s), tests/startup_gfx2hlsl_cmp16_check.py ok (0.2s), tests/startup_gfx2hlsl_compare_dst_check.py ok (0.1s), tests/startup_gfx2hlsl_compute_check.py ok (0.3s), tests/startup_gfx2hlsl_cselect_mask_check.py ok (0.1s), tests/startup_gfx2hlsl_cvt_alu_check.py ok (0.1s), tests/startup_gfx2hlsl_f32_lg_check.py ok (1.0s), tests/startup_gfx2hlsl_f32_nan_check.py ok (3.9s), tests/startup_gfx2hlsl_handler_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_get_lod_check.py ok (0.1s), tests/startup_gfx2hlsl_int_med3_check.py ok (0.1s), tests/startup_gfx2hlsl_join_symbols_check.py ok (0.2s), tests/startup_gfx2hlsl_loop_constants_check.py ok (0.1s), tests/startup_gfx2hlsl_mask_overwrite_check.py ok (0.1s), tests/startup_gfx2hlsl_operand_count_check.py ok (0.1s), tests/startup_gfx2hlsl_readfirstlane_recompute_check.py ok (0.1s), tests/startup_gfx2hlsl_readfirstlane_uniform_check.py ok (0.1s), tests/startup_gfx2hlsl_refusals_check.py ok (0.3s), tests/startup_gfx2hlsl_root_check.py ok (0.5s), tests/startup_gfx2hlsl_saveexec_same_reg_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_brev_fold_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_m0_check.py ok (0.1s), tests/startup_gfx2hlsl_sdwa_cvt_check.py ok (0.2s), tests/startup_gfx2hlsl_sgpr_spill_check.py ok (0.1s), tests/startup_gfx2hlsl_shift64_check.py ok (0.1s), tests/startup_gfx2hlsl_smem_offset_check.py ok (0.1s), tests/startup_gfx2hlsl_sop2_complement_check.py ok (3.3s), tests/startup_gfx2hlsl_sopk_accum_check.py ok (0.6s), tests/startup_gfx2hlsl_sopk_signext_check.py ok (0.1s), tests/startup_gfx2hlsl_swap_check.py ok (0.2s), tests/startup_gfx2hlsl_vopc_sdwa_check.py ok (3.5s), tests/startup_gfx2hlsl_watch_check.py ok (2.2s), tests/startup_image_2d_array_check.py ok (0.1s), tests/startup_image_3d_check.py ok (0.1s), tests/startup_image_gather_lz_check.py ok (0.5s), tests/startup_image_load_d16_check.py ok (0.7s), tests/startup_image_sample_a16_check.py ok (0.1s), tests/startup_image_sample_b_check.py ok (0.1s), tests/startup_image_sample_c_check.py ok (0.2s), tests/startup_image_sample_l_check.py ok (0.1s), tests/startup_image_sample_lod_check.py ok (0.1s), tests/startup_inline_sampler_check.py ok (0.1s), tests/startup_run_ps1_check.py ok (7.8s), tests/startup_run_sh_check.py skipped by itself on Windows, rc=77 (0.1s), tests/startup_sampler_heap_check.py ok (0.1s), tests/startup_smem_address_check.py ok (0.1s), tests/startup_stream_fetch_check.py ok (0.2s), tests/startup_stream_interface_check.py ok (0.2s), tests/startup_translator_check.py ok (0.3s)
  • sccache: 0/2 hits; wall 303.9s

AI-assisted; commands listed were executed locally.

@RavenCurseBurg

Copy link
Copy Markdown
Contributor

While checking #2463 I reproduced a branch case both on this PR alone (99e1c69f) and with #2460 (661c9a1a) integrated. An in-place literal table-pointer add followed by a copy, a forward conditional writing an unrelated SGPR, and an immediate s_load on the copied pointer can raise TypeError in the translator. In a branch-bearing program pointer_add declines the add, the older path records ('ptr', source, 'added'), and op_s_load_dwordx4 uses the string as an integer byte offset. A straight-line control with the same table, add and load binds byte 32.

I am testing the forward-only, 32-bit graphics table case for #2463 separately. The other inputs to the established branch refusal can keep returning Unsupported. Posting here because the marker and numeric-offset paths meet in #2069.

AI-assisted with Codex (GPT-6.2 Astra, xhigh).

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

@R0Y00 the changes you requested are addressed on the current head 99e1c69f7f72a63a5ef4a8f1bd83360f7b3b5ad5 (see our reply above). Could you re-review, or dismiss the change request if it is resolved? Under the new scope, MasterDomino can then review and merge it.

AI-assisted; commands listed were executed locally.

R0Y00 commented Nov 25, 2026

Copy link
Copy Markdown
Owner

The new completed-pair controls address the original straight-line issue. Keep this review open for the branch case RavenCurseBurg reproduced on 99e1c69f: the added marker reaches the numeric offset calculation and raises TypeError. Please keep the joined pointer unsupported here unless this PR proves it. Add that exact branch shape as a refusal control and keep its straight-line sibling passing. The new forward-branch support can stay in the separate #2463 work.

…ad through a pointer advanced by an untracked offset
@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

@R0Y00 the branch case is fixed on a747241f (merged with current main, no conflicts left).

  • Cause: in a program with branches, s_add_u32 s8, s8, 0x40 leaves the added marker on the pointer, and s_load_dwordx4 then added an int to that marker and raised TypeError.
  • Fix: op_s_load_dwordx4 now refuses a load through a pointer whose offset is untracked (s_load through s8: the pointer was advanced by an untracked offset). The joined pointer stays unsupported here.
  • New controls in tests/startup_gfx2hlsl_desc_ptr_prop_check.py: the in-place advance plus load with branches is a refusal (it was the TypeError before), and the same straight-line shape still folds to +0x50.

Commands run locally: python3 -B tests/startup_gfx2hlsl_desc_ptr_prop_check.py, startup_gfx2hlsl_join_symbols_check.py, startup_gfx2hlsl_refusals_check.py, startup_smem_address_check.py, startup_gfx2hlsl_root_check.py (all ok), git diff --check (clean). Forward-branch support stays in #2463.

AI-assisted; commands listed were executed locally.

R0Y00 commented Nov 25, 2026

Copy link
Copy Markdown
Owner

The branch-only untracked offset guard passes on 62bf81d0. I found two remaining cases using the source-built root-pointer fixture. A complete in-place pair (s_add_u32 s8, s8, 0x20; s_addc_u32 s9, s9, 0) refuses because the first instruction replaces s9 with pending before the second can read it. Conversely, the out-of-place low add followed by s_mov_b32 s21, s9 and s_load_dwordx4 s[4:7], s[20:21], 0x10 is accepted and emits r0.Load(80) without the matching ADDC. Please keep completion state on the advanced low result until the adjacent matching pair completes, without changing the original high source. Add a valid in-place case and a copied-but-unadvanced high-word refusal. The original request remains open.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

@R0Y00 both cases are fixed on 77abd82a (merged with current main, no conflicts).

  • Cause: the low add wrote a pending marker into the next register. In place, that replaced the original high word, so the matching s_addc_u32 could not read it. Out of place, s_mov s21, s9 copied the unadvanced high word over the marker, so the load was accepted without the pair.
  • Fix: the low add now only opens the pair (the high register and the original high source are left untouched). The matching adjacent s_addc_u32 closes it. A load through an open pair is refused.
  • New controls in tests/startup_gfx2hlsl_desc_ptr_prop_check.py:
    • a complete in-place pair (s_add_u32 s8, s8, 0x20; s_addc_u32 s9, s9, 0) now folds to +0x30;
    • the low add followed by s_mov_b32 s21, s9 and the load is a refusal;
    • a complete out-of-place pair leaves the original high source unchanged.
      The first two failed on the previous head and pass now. The missing, overwritten and mismatched high word controls and the large low-word add control still pass.

Commands run locally: python3 -B tests/startup_gfx2hlsl_desc_ptr_prop_check.py, startup_gfx2hlsl_join_symbols_check.py, startup_gfx2hlsl_refusals_check.py, startup_smem_address_check.py, startup_gfx2hlsl_root_check.py (all ok), git diff --check (clean).

AI-assisted; commands listed were executed locally.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Merged current main into this branch at 1ecf3bcbc (merge commit, no force-push). One conflict in tools/startup/gfx2hlsl.py, kept both sides:

  • The descriptor-pointer add guard stays first, then main's raw-descriptor conversion branch.
  • The s_load descriptor symbol keeps our base_off + off and main's new load-tag suffix.

Commands run locally: python3 -B tests/startup_gfx2hlsl_desc_ptr_prop_check.py (all cases ok), python3 -B tests/startup_gfx2hlsl_compute_check.py (the test main changed in the same area, passes), git diff --check (clean). CI on 1ecf3bcbc: Linux checks, gfx1013 fixtures and Windows build/test are green. No Win2025 run on this head yet. The previous review request is still open: @R0Y00, the two cases from your last comment are fixed on the earlier head and unchanged here. Could you take another look?

AI-assisted; commands listed were executed locally.

@RavenCurseBurg

Copy link
Copy Markdown
Contributor

I checked the merge with #2546 at 1ecf3bcb using the structured-to-raw store fixture and LLVM 15. Across six pointer-add / load-immediate combinations, both ordinary and converted stores emitted identical HLSL and the expected SRV/UAV offsets. In particular, adding 16 and loading at 16 bound the same bytes (32/48) as adding 32 and loading at 0. The farthest case bound 80/96. With an untouched low word, reloading the stride from the same high word succeeded. Substituting a stride from a different high word refused in all six cases.

The replay on this exact parent takes an LLVM 15 assembler as its argument. I have also synced the dependent #2507 to this head.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this PR for now so we can focus on the test-speed work. The branch stays as it is, and review comments here remain valid.

We will reopen it later, bring it up to date with main, re-run the Win2025 WARP checks at its head, and post the result here.

AI-assisted; commands listed were executed locally.

@tedin7 tedin7 closed this Nov 25, 2026
@tedin7 tedin7 reopened this Nov 25, 2026
@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

I found a full-pipeline case for the current head 1ecf3bcb. The two instruction handlers accept the matched s_add_u32 / s_addc_u32 pair, but the final SCC-read pass rejects the high add itself with scc from descriptor data in s_addc_u32. I reproduced this using a source-built vertex shader that reads the second vertex-buffer view.

I put a two-file fix and host regressions directly on your head for cherry-pick. A high add validated by the existing adjacent-pair proof has already consumed its input carry symbolically. Its outgoing SCC remains unavailable to an ordinary numeric reader. The complete in-place and out-of-place pairs now publish the expected VB binding. Copying the old high word still refuses. A following s_cselect_b32 still refuses until a fresh scalar compare establishes SCC. All 78 related host and documentation checks passed.

The independent draw fixture reuses the existing direct/indexed 8×4 stream scene. LLVM 15 matches all three programs. With the direct address, in-place pair and out-of-place pair, all 32 pixels matched POSITION from VB 1. Rebinding exactly the same compiled shader to VB 0 gave the TEXCOORD reference, with exactly 11 pixels changed for each program. Intel UHD 770, RTX 4060 and WARP passed with both FXC and DXC (36 readbacks). The Windows Server 2025 Release run passed all four selected CTests and all 12 WARP readbacks with the new fixture. I verified the recorded source commit and all four artifact digests, then repeated the 36 local readbacks with that same build. The host fix is 6ef0e9f; the tested build 2b57389 adds only the standalone draw script.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

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

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2): 0.87s (configure 3.58s)
    • Test (ctest --preset dev -R 'startup_smem_address_warp|startup_gfx2hlsl_desc_ptr_prop|startup_buffer_address_warp' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (2.62s: startup_smem_address_warp 2.17s, startup_gfx2hlsl_desc_ptr_prop 0.13s, startup_buffer_address_warp 2.41s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2): 2.63s (configure 2.92s)
    • Test (ctest --preset release -R 'startup_smem_address_warp|startup_gfx2hlsl_desc_ptr_prop|startup_buffer_address_warp' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (2.21s: startup_smem_address_warp 1.86s, startup_gfx2hlsl_desc_ptr_prop 0.12s, startup_buffer_address_warp 2.06s)
  • Windows Python checks: tests/mesh_heap_sampler_check.py ok (1.1s), tests/startup_buffer_address_check.py ok (0.7s), tests/startup_buffer_format_word3_table_check.py ok (0.1s), tests/startup_compute_request_offline_check.py ok (0.7s), tests/startup_compute_translate_check.py ok (0.3s), tests/startup_flat_param_check.py ok (0.2s), tests/startup_gfx2hlsl_add_sub_co_check.py ok (0.2s), tests/startup_gfx2hlsl_add_sub_co_ci_check.py ok (0.2s), tests/startup_gfx2hlsl_bit_alu_check.py ok (1.1s), tests/startup_gfx2hlsl_capture_check.py ok (1.6s), tests/startup_gfx2hlsl_cmp16_check.py ok (0.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_f32_lg_check.py ok (2.0s), tests/startup_gfx2hlsl_f32_nan_check.py ok (7.7s), tests/startup_gfx2hlsl_fma_mix_check.py ok (0.2s), tests/startup_gfx2hlsl_getpc_refusal_check.py ok (0.2s), tests/startup_gfx2hlsl_handler_arity_check.py ok (0.1s), 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.2s), tests/startup_gfx2hlsl_join_symbols_check.py ok (0.4s), tests/startup_gfx2hlsl_loop_constants_check.py ok (0.1s), tests/startup_gfx2hlsl_mask_overwrite_check.py ok (0.1s), tests/startup_gfx2hlsl_operand_count_check.py ok (0.4s), tests/startup_gfx2hlsl_pack_absdiff_check.py ok (4.0s), 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 (0.9s), tests/startup_gfx2hlsl_sad_check.py ok (0.6s), 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.1s), tests/startup_gfx2hlsl_scalar_m0_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_table_arity_check.py ok (0.4s), tests/startup_gfx2hlsl_sdwa_cvt_check.py ok (0.4s), tests/startup_gfx2hlsl_sgpr_spill_check.py ok (0.1s), tests/startup_gfx2hlsl_shift64_check.py ok (0.2s), 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 (8.7s), tests/startup_gfx2hlsl_sopk_accum_check.py ok (1.2s), tests/startup_gfx2hlsl_sopk_signext_check.py ok (0.2s), tests/startup_gfx2hlsl_swap_check.py ok (0.4s), tests/startup_gfx2hlsl_vopc_sdwa_check.py ok (6.0s), tests/startup_gfx2hlsl_waitcnt_depctr_check.py ok (0.1s), tests/startup_gfx2hlsl_watch_check.py ok (2.9s), tests/startup_image_2d_array_check.py ok (0.2s), tests/startup_image_3d_check.py ok (0.1s), tests/startup_image_gather_lz_check.py ok (0.7s), tests/startup_image_load_d16_check.py ok (1.2s), tests/startup_image_sample_a16_check.py ok (0.3s), tests/startup_image_sample_b_check.py ok (0.2s), 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.8s), tests/startup_inline_sampler_check.py ok (0.2s), tests/startup_mesh57_skeleton_check.py ok (0.5s), tests/startup_run_ps1_check.py ok (22.6s), tests/startup_run_sh_check.py skipped (0.1s), tests/startup_sampler_heap_check.py ok (0.2s), tests/startup_shader_cache_rekey_check.py ok (3.4s), tests/startup_smem_address_check.py ok (0.2s), tests/startup_stream_fetch_check.py ok (0.4s), tests/startup_stream_interface_check.py ok (0.4s), tests/startup_translator_check.py ok (0.8s)
  • sccache: 198/312 hits; wall 110.2s

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

@MasterDomino @R0Y00 #2069 is ready for re-review at head 6688f74e.

What changed:

  • Merged origin/main (merge commit, no force-push). The earlier completed-pair, in-place pair, copied-high-word and branch refusal controls still pass.
  • Fixed a gap those controls missed: through the full translate, the s_add_u32 / s_addc_u32 pair was refused by the SCC check. The matching s_addc_u32 is now the only accepted reader of the low add's carry; any other SCC reader is still refused.
  • An untracked-offset pointer used whole as a descriptor now refuses instead of raising a TypeError.
  • New real D3D12 WARP readback case in startup_smem_address_check.py: pair-advanced pointer + offset:0x8 is read back against the CPU reference and equals the single load at 0x10. The full-translate checks (same output as the single load, SCC refusal) are in the same file.
  • startup_gfx2hlsl_desc_ptr_prop_check.py now also runs in the Linux CI list.

Verification: CI green on this head. Win2025 dev + release: ctest -R 'startup_smem_address_warp|startup_gfx2hlsl_desc_ptr_prop|startup_buffer_address_warp' 3/3 passed on both (receipt posted above), plus the full planned Python checks.

AI-assisted; commands listed were executed locally.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated pair and full-SMEM translation controls pass. I found two remaining same-origin high-word cases in the existing device-free harness. Given the test's ROOT symbols, run s_add_u32 s20,s8,0x40; s_addc_u32 s21,s9,0; s_mov_b32 s21,s9; then s_load_dwordx4 s[4:7],s[20:21],0x10. This still emits Load(80) after the completed high word was overwritten by the original one. A second variant advances that same low word with s_add_u32 s22,s20,0x20 but uses the original high word again in s_addc_u32 s23,s9,0; the load is accepted and emits Load(112). A low-DWORD carry in the first add makes both folds wrong. A small literal does not by itself exclude that carry.

Please bind the high-word proof to the relevant accumulated offset or pair provenance, so the original high word and the advanced high word cannot compare equal merely because they came from the same root. Keep the matching-high controls and the full GPU readback. Add the two cases above and a positive case that uses the completed high word of the first pair for the second advance.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

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

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target offscreen_check d3d12_xs_shim -- -j 2): 2.69s (configure 0.00s)
    • Test (ctest --preset dev -R 'startup_smem_address|startup_gfx2hlsl_desc_ptr_prop|startup_buffer_address' --parallel 6 --no-tests=error --output-on-failure): 7/7 passed (2.49s: startup_smem_address_controls 0.25s, startup_gfx2hlsl_desc_ptr_prop 0.13s, startup_buffer_address_controls 0.74s, startup_smem_address_warp 2.13s, startup_smem_address_hardware 2.16s, startup_buffer_address_warp 2.32s, startup_buffer_address_hardware 2.35s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target offscreen_check d3d12_xs_shim -- -j 2): 3.78s (configure 0.00s)
    • Test (ctest --preset release -R 'startup_smem_address|startup_gfx2hlsl_desc_ptr_prop|startup_buffer_address' --parallel 6 --no-tests=error --output-on-failure): 7/7 passed (2.15s: startup_gfx2hlsl_desc_ptr_prop 0.12s, startup_smem_address_controls 0.24s, startup_buffer_address_controls 0.62s, startup_smem_address_warp 1.81s, startup_smem_address_hardware 1.81s, startup_buffer_address_warp 2.02s, startup_buffer_address_hardware 2.02s)
  • Windows Python checks: tests/mesh_heap_sampler_check.py ok (0.6s), 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.4s), 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.1s), tests/startup_gfx2hlsl_add_sub_co_check.py ok (0.1s), tests/startup_gfx2hlsl_add_sub_co_ci_check.py ok (0.1s), tests/startup_gfx2hlsl_bit_alu_check.py ok (0.6s), tests/startup_gfx2hlsl_capture_check.py ok (0.9s), tests/startup_gfx2hlsl_cmp16_check.py ok (0.2s), tests/startup_gfx2hlsl_compare_dst_check.py ok (0.1s), tests/startup_gfx2hlsl_compute_check.py ok (0.3s), 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.2s), tests/startup_gfx2hlsl_f32_lg_check.py ok (1.1s), tests/startup_gfx2hlsl_f32_nan_check.py ok (4.1s), 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_image_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_get_lod_check.py ok (0.1s), tests/startup_gfx2hlsl_int_med3_check.py ok (0.1s), tests/startup_gfx2hlsl_interp_p2_hi_check.py ok (0.2s), tests/startup_gfx2hlsl_join_symbols_check.py ok (0.2s), tests/startup_gfx2hlsl_loop_constants_check.py ok (0.1s), tests/startup_gfx2hlsl_mask_overwrite_check.py ok (0.1s), tests/startup_gfx2hlsl_operand_count_check.py ok (0.3s), tests/startup_gfx2hlsl_pack_absdiff_check.py ok (2.2s), tests/startup_gfx2hlsl_readfirstlane_recompute_check.py ok (0.1s), tests/startup_gfx2hlsl_readfirstlane_uniform_check.py ok (0.1s), tests/startup_gfx2hlsl_refusals_check.py ok (0.5s), tests/startup_gfx2hlsl_root_check.py ok (0.7s), tests/startup_gfx2hlsl_sad_check.py ok (0.3s), tests/startup_gfx2hlsl_saveexec_same_reg_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_arity_check.py ok (0.2s), tests/startup_gfx2hlsl_scalar_brev_fold_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_m0_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_table_arity_check.py ok (0.3s), tests/startup_gfx2hlsl_sdwa_cvt_check.py ok (0.2s), tests/startup_gfx2hlsl_sgpr_spill_check.py ok (0.1s), tests/startup_gfx2hlsl_shift64_check.py ok (0.2s), 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 (4.8s), tests/startup_gfx2hlsl_sopk_accum_check.py ok (0.8s), tests/startup_gfx2hlsl_sopk_signext_check.py ok (0.1s), tests/startup_gfx2hlsl_swap_check.py ok (0.2s), tests/startup_gfx2hlsl_vopc_sdwa_check.py ok (3.8s), tests/startup_gfx2hlsl_waitcnt_depctr_check.py ok (0.1s), tests/startup_gfx2hlsl_watch_check.py ok (2.6s), tests/startup_image_2d_array_check.py ok (0.2s), tests/startup_image_3d_check.py ok (0.2s), tests/startup_image_gather_lz_check.py ok (0.5s), tests/startup_image_load_d16_check.py ok (0.9s), tests/startup_image_sample_a16_check.py ok (0.2s), tests/startup_image_sample_b_check.py ok (0.2s), tests/startup_image_sample_c_check.py ok (0.2s), tests/startup_image_sample_l_check.py ok (0.2s), tests/startup_image_sample_lod_check.py ok (0.6s), tests/startup_inline_sampler_check.py ok (0.1s), tests/startup_mesh57_skeleton_check.py ok (0.4s), tests/startup_run_ps1_check.py ok (8.6s), tests/startup_run_sh_check.py skipped (0.1s), tests/startup_sampler_heap_check.py ok (0.1s), tests/startup_shader_cache_rekey_check.py ok (1.8s), tests/startup_smem_address_check.py ok (0.2s), tests/startup_stream_fetch_check.py ok (0.2s), tests/startup_stream_interface_check.py ok (0.2s), tests/startup_translator_check.py ok (0.4s)
  • sccache: 110/138 hits; wall 57.7s

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

@R0Y00 @MasterDomino, updated head ef3425a3 (merged current main, no force-push). Point by point on your 25/11 22:31Z review:

  1. s_add_u32 s20,s8,0x40; s_addc_u32 s21,s9,0; s_mov_b32 s21,s9; s_load_dwordx4 s[4:7],s[20:21],0x10: now refused. The completed high word is bound to the accumulated offset, so the original high word no longer stands in for it.
  2. Second advance s_add_u32 s22,s20,0x20 with s_addc_u32 s23,s9,0: now refused. The s_addc_u32 must read the high word completed for the offset it advances from.
  3. Positive case: s_addc_u32 s23,s21,0 (completed high word of the first pair) folds to Load(112). An in-place double advance with each completed high word also folds.
  4. The matching-high controls and the full GPU readback (startup_smem_address_warp) are kept.

Tests added to tests/startup_gfx2hlsl_desc_ptr_prop_check.py (the two refusals fail on the previous head and pass now).

Verification (Win2025, exact head ef3425a3): dev + release builds and the Windows Python checks passed; ctest -R "startup_smem_address|startup_gfx2hlsl_desc_ptr_prop|startup_buffer_address" 7/7 passed, including startup_smem_address_warp and startup_gfx2hlsl_desc_ptr_prop. Linux CI and the gfx1013 fixture job: green (the GitHub Windows job was still queued when I posted). Full receipt in the comment above.

Re-requesting review.

AI-assisted; commands listed were executed locally.

@tedin7
tedin7 requested a review from R0Y00 November 25, 2026 23:42

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed ef3425a3. The original high word can no longer replace a completed advanced one, and a second advance accepts the high word proved for its input offset. Windows Release passed 7/7 with ctest --preset release --no-tests=error -j 1 -R '^startup_(gfx2hlsl_desc_ptr_prop|smem_address|buffer_address)($|_(controls|warp|hardware)$)' -V. Both the RTX 4060 Laptop and WARP matched all 320 words in the advanced vertex-buffer-table case. The overwritten-high and wrong second carry controls refuse, while both complete-pair paths fold.

@R0Y00
R0Y00 merged commit e3dda42 into R0Y00:main Nov 25, 2026
5 checks passed
SimSalabimse added a commit to SimSalabimse/Xbox2Windows that referenced this pull request Nov 26, 2026
… (#17)

* shader: add offset, short-read, and regular-file guards in sgd5_effects with CLI suite (R0Y00#2608)

Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* startup: count new view records by slot behind an opt-in census (R0Y00#2613)

X2W_D3D12_VIEW_CENSUS=1 counts new distinct view records by device slot
and logs the record vector capacity and hash bucket count before an
insertion that is expected to grow either. Record identity, ids and
descriptor binding do not change.

Refs R0Y00#1199

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>

* startup: lower v_pack_b32_f16 with op_sel and neg/abs in gfx2hlsl (R0Y00#2475)

* startup: lower v_pack_b32_f16 with op_sel and neg/abs in gfx2hlsl

D[15:0] = S0.f16, D[31:16] = S1.f16 (AMD RDNA 2 ISA, VOP3
V_PACK_B32_F16). op_sel[i] selects the high half of source i (LLVM 15:
VOP3_OPSEL); neg and abs act on bit 15 of the selected half, abs first.
The halves are copied as bits, as pixel_aot lowers the same instruction;
no binary16 denormal flush or NaN quieting is modelled (assumed).
Register sources only: an inline float constant on a binary16 operand
is a binary16 value. A destination op_sel bit and clamp are refused.

Test: tests/startup_gfx2hlsl_pack_b32_f16_check.py evaluates the emitted
expression for every op_sel x abs x neg combination over sample register
pairs against a bit reference (2304 cases), plus an SGPR source.
Negative controls: swapped halves and neg-before-abs are caught by the
reference; without the handler the instruction is refused, as on main.

* gfx2hlsl: explain the low/high half reads and the strict op_sel spelling in v_pack_b32_f16 (comments only)

* tests: verify packed binary16 output words on D3D12

---------

Co-authored-by: Royoo <3230853833@qq.com>
Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* cpu: lower 16 VEX.256 AVX2 cross-lane extend and dword/qword unpack forms (R0Y00#2614)

* cpu: lower 32/64-bit BMI2 BZHI, MULX, PDEP, and PEXT in cpu_bmi2_bit_aot (R0Y00#2621)

* pe: sort package scan and harden CLI path guards in pe_package_preflight with CLI suite (R0Y00#2609)

Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* shader: harden rdna_cvt_pk_u8 CLI validation and atomic writes with CLI suite (R0Y00#2619)

* ffx: add upfront path guards and atomic writes to ffx_working_set_delta with CLI suite (R0Y00#2616)

* startup: refuse a lane mask read as data by v_mov_b32 and v_cndmask_b32 (R0Y00#2623)

A lane-mask register (a compare result, vcc_lo, exec_lo, a saved EXEC
copy) holds only the current lane's bit in the one-lane model, while
RDNA 2 reads the whole mask word when the register is a data operand.
v_cndmask_b32 (both data operands) and v_mov_b32 (plain, e64 and SDWA
DWORD) took such a register through u()/u_src and emitted the lane bit.
They now refuse it, after stripping the source modifiers; the lane
select of v_cndmask is unchanged.

Tests that moved a mask with v_mov_b32 first now expect the new refusal,
or read the mask as a lane select instead so they still reach the
refusal they test. The SDWA check that accepted a whole-mask move now
expects a refusal.

AI-assisted.

* tests: reuse the compute pipeline across descriptor-format references (R0Y00#2615)

* tests: run compute store references on a shared renderer device

* tests: compare the descriptor fixture using one device for its reference cases

* tests: use one root signature and compute pipeline for the reference batch

* tests: retain case labels and 320-word diagnostics in the shared compute run

---------

Co-authored-by: RavenCurseBurg <360931527+RavenCurseBurg@users.noreply.github.com>
Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* runtime: add upfront CLI guards and atomic writes to bink_heap_aot with CLI suite (R0Y00#2627)

* ci: harden coverage_svg validation and atomic writes with CLI suite (R0Y00#2617)

Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* shader: classify RDNA2 permlane operations as cross-lane (R0Y00#2628)

- Preserve ordinary vector ALU classification and translator refusal.
- Exercise the authored encodings and dashboard categories.

Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* d3d12: do not wrap large allocations for unplaced memory SRVs (R0Y00#2611)

An unplaced buffer memory SRV (device slot 70, R0Y00#2395) wrapped the whole
allocation holding the view with OpenExistingHeapFromAddress. A 6 KiB view
in a ~2.15 GiB title startup block wrapped the block; afterwards each
VirtualQuery over it took seconds and DirectStorage requests stalled for
~120 s. Wrap only allocations up to the existing 256 MiB span limit (size
from one region-information call); larger ones take the upload copy.

Co-authored-by: lukaslw-lab <291379150+lukaslw-lab@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* cpu: lower VEX.128/256 AVX horizontal and addsub FP ops in cpu_avx_horiz_fp_aot (R0Y00#2629)

* script: add archive file and ASCII state guards to script_state_probe with CLI suite (R0Y00#2620)

Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* tests: use a portable negative record offset in the SGD5 CLI fixture (R0Y00#2632)

* shader: lower image_sample_d and document image_sample_c_d refusal in gfx2hlsl (Part of R0Y00#1723) (R0Y00#2082)

* feat: lower image_sample_d to SampleGrad in gfx2hlsl

Part of R0Y00#1723. 2D, 2D array and 3D gradient samples; image_sample_c_d is refused by name (needs SM 6.8).

* test: register startup_image_sample_d in CMake

Part of R0Y00#1723.

* startup: keep the guest LOD cap for image_sample_d and document the form in gfx2hlsl

* test: WARP and hardware readback for image_sample_d against a CPU reference

* tests: build the implicit Sample negative control with two arguments

---------

Co-authored-by: Royoo <3230853833@qq.com>

* tests: add source-built mesh57 loop refusal fixture (R0Y00#2413 T6) (R0Y00#2622)

Prove tip translate_mesh57 refuses a back-edge outside the accepted
group-memory exchanges by the named loop reason, with a mutant that
drops the back-edge and an exact-string oracle.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* shader: propagate descriptor pointers through s_add_u32/s_addc_u32 in gfx2hlsl (Part of R0Y00#1723) (R0Y00#2069)

* fix: carry descriptor pointers through s_add_u32/s_addc_u32 in gfx2hlsl

A table or root pointer advanced by a literal offset now keeps its source and
byte offset, so a following s_load reads the advanced descriptor. A register
addend on a pointer is refused instead of silently keeping the old pointer.

Part of R0Y00#1723

* shader: refuse descriptor pointer advances across branches and detached s_addc_u32 in gfx2hlsl (Part of R0Y00#1723)

* shader: keep the pointer-advance bookkeeping safe for stages without branch state (Part of R0Y00#1723)

* fix: keep the branch-join refusal for pointer adds in branching shaders

* fix: require the matching high-word add before folding an advanced descriptor pointer

* fix: advance 32-bit table pointers without a high word and judge the high operand by content

* fix: keep descriptor pointer pair open until its matching s_addc_u32

* fix: let the descriptor pointer pair pass translate's SCC check, add WARP readback case

* fix: refuse an untracked-offset pointer as a descriptor, run the pointer check in Linux CI

* fix: refuse a root pointer load whose high word was overwritten

* Revert "fix: refuse a root pointer load whose high word was overwritten"

This reverts commit 0f226c5.

* startup: re-key slot 57 mesh requests in shader_cache_rekey.py (R0Y00#2634)

shader_cache_rekey.py re-keyed graphics, RTV and slot 67 compute requests
and only counted slot 57 mesh requests. mesh57_key hashes the request
files under a versioned prefix, so after a revision that changes it a
kept cache lost every slot 57 request. The tool now recomputes that key
with mesh57_key and copies .ps57, .root and the .m57 ready marker under
the new name, with the rules the other kinds follow: everything read
first, nothing written on a missing or unreadable part, temporary name
then rename, an existing target left alone. Slot 86 is still only
counted.

AI-assisted.

* shader: extract main(argv), bounds checks, and struct/zlib guards in shader_census with CLI suite (R0Y00#2437)

* shader: extract main(argv), bounds checks, and struct/zlib guards in shader_census with CLI suite

* tests: accept Python 3.14+ argparse message in shader_census_cli_check

---------

Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* startup: invalidate slot 35 tables when the compute view heap changes (R0Y00#2636)

Track ordinary and oversized compute view heaps separately from the graphics lookup. Keep the table when the same heap is rebound and clear it on changes or unset. Cover the recorder in the CPU checks.

Co-authored-by: chasegrindy <302242206+chasegrindy@users.noreply.github.com>

* tests: run heap-view load references in one batch per compute shader (R0Y00#2635)

Co-authored-by: RavenCurseBurg <360931527+RavenCurseBurg@users.noreply.github.com>
Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* shader: lower s_bitset0/1_b32 in gfx2hlsl (R0Y00#2023 Item J) (R0Y00#2638)

* shader: lower s_bitset0/1_b32 in gfx2hlsl (R0Y00#2023 Item J)

Port the pixel_aot bit set/clear SOP1 forms so ordinary vertex and pixel
pipelines that only need an in-place scalar bit update stop refusing at
s_bitset1_b32. SCC stays unchanged; lane masks and descriptor SGPRs refuse.

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>

* test: pin sopk descriptor-refusal mutation to sopk-only raise

s_bitset0/1_b32 reused the plain-scalar sym allow-list line, so the
sopk_accum mutant needle was no longer unique. Match the sopk raise that
formats with `base` instead.

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>

* startup: implement command-list slot 14 Dispatch (Part of R0Y00#870) (R0Y00#1974)

* feat: record command-list slot 14 Dispatch on the desktop list

Part of R0Y00#870. Forward Dispatch only with a desktop compute pipeline and root
bound and group counts within 65535 per axis; refuse otherwise.

* startup: refuse Dispatch under a compute root with unforwarded arguments, document slot 14

* startup: gate Dispatch on bound compute root SRVs and a pipeline built against the bound root

Slot 43 clears a parameter's binding when a replacement is rejected, slot 33 clears all bindings, and the compute pipeline records its root so a mismatched pair is refused.

* fix: pass pipeline root out-param in slot86 mesh cached pipeline build

* tests: drive native slot 14 Dispatch through the stand-in

startup_list_dispatch_native creates a guest device on a desktop
adapter (WARP or hardware, debug layer on when installed) and drives
command-list slots 86, 25, 33, 43, 148, 14, 9 and 139 of the stand-in.
Each refused case must write exactly one
"x2w-render Dispatch(x, y, z) refused: <reason>" line, with the
expected reason, to X2W_TRAP_LOG:

- a root SRV never set;
- a rejected (foreign address) or misaligned slot 43 replacement after
  a valid one;
- a root changed and changed back without a new slot 43;
- a pipeline built against another root;
- a root with a descriptor table, and a root with a static sampler;
- an unset root SRV with zero groups;
- 65536 groups on X;
- a Dispatch on the closed list;
- a Dispatch after Reset without new bindings.

A forwarded case must write no line. The fixture wraps a
pipeline-statistics query around every slot 14 call on an open list,
recorded on the underlying desktop list: CSInvocations must be 4 per
group when forwarded and 0 when refused. The fully bound call is
recorded alone and read back first, so a slot 14 that records nothing
fails on its count. All three recordings are executed to a fence and
the debug layer must report no error.

The skip_srv control drops slot 43 from the first forwarded case and
must report it as refused. Each of these one-line changes to
d3d12_xs_device.cpp makes the WARP and hardware tests fail: the
refusal branch never taken, compute_srv_bound not cleared by slot 33,
the bit not cleared by a rejected slot 43, compute_root_has_arguments
forced false, root_matches_pipeline forced true, and the slot 14
registration removed.

The docs section now names the device fixture and corrects the
sentence on which compute root-argument slots have handlers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: list_dispatch header names slot 43 as forwarded

---------

Co-authored-by: The Void <mrdominogrm@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Royoo <3230853833@qq.com>

* startup: implement command-list slots 37 and 39 root constants and views (Part of R0Y00#870) (R0Y00#1975)

* startup: record SetComputeRoot32BitConstant(s) (list slots 37, 39)

Compute root constants are kept per list next to the graphics ones, in a shared 16 x 8 word store that refuses parameter >= 16 and offset >= 8. A new compute root signature clears them.

* fix: track which compute root constant words were set; drop slot 40 claim

* tests: run both PowerShell shells in parallel in startup_run_ps1 (R0Y00#2487)

* shader: preserve proven 32-bit graphics table offsets across forward joins (R0Y00#2507)

* fix: carry descriptor pointers through s_add_u32/s_addc_u32 in gfx2hlsl

A table or root pointer advanced by a literal offset now keeps its source and
byte offset, so a following s_load reads the advanced descriptor. A register
addend on a pointer is refused instead of silently keeping the old pointer.

Part of R0Y00#1723

* shader: refuse descriptor pointer advances across branches and detached s_addc_u32 in gfx2hlsl (Part of R0Y00#1723)

* shader: keep the pointer-advance bookkeeping safe for stages without branch state (Part of R0Y00#1723)

* fix: keep the branch-join refusal for pointer adds in branching shaders

* fix: require the matching high-word add before folding an advanced descriptor pointer

* fix: advance 32-bit table pointers without a high word and judge the high operand by content

* shader: keep 32-bit table offsets at agreeing forward graphics joins

Track a literal table address across copies and forward paths only when the incoming resource and byte offset agree. Exercise the published manifest against two GPU resources and compare all 32 pixels, including the root constant used by the branches.

AI-assisted with Codex (GPT-6.2 Astra, xhigh).

* fix: keep descriptor pointer pair open until its matching s_addc_u32

* tests: cover vertex-table carries and backward edges in pointer propagation

Exercise the two surviving mutations reported on R0Y00#2507 using full source-built programs. AI-assisted with Codex (GPT-6.2 Astra, xhigh).

* fix: let the descriptor pointer pair pass translate's SCC check, add WARP readback case

* fix: refuse an untracked-offset pointer as a descriptor, run the pointer check in Linux CI

* fix: refuse a root pointer load whose high word was overwritten

* Revert "fix: refuse a root pointer load whose high word was overwritten"

This reverts commit 0f226c5.

---------

Co-authored-by: tedin7 <tommasoderosa94@gmail.com>
Co-authored-by: RavenCurseBurg <360931527+RavenCurseBurg@users.noreply.github.com>

* tests: split four long CPU checks into parallel ctest cases (R0Y00#2489)

* tests: split four long CPU checks into parallel ctest cases

* docs: say in the file headers that CTest runs the parts and check runs them all

* fix: let the no-path x87 aggregate modes parse without file arguments

* shader: lower s_abs_i32 in gfx2hlsl (Part of R0Y00#1723) (R0Y00#2640)

* shader: lower s_abs_i32 in gfx2hlsl (R0Y00#1723)

Port the pixel_aot signed absolute SOP1 so ordinary pipelines that only need
|S0| stop refusing. SCC is the nonzero test of the result; INT_MIN stays.
Lane masks and descriptor words are refused. CPU fixture with a negative control.

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>

* test: pin sopk descriptor-refusal mutation to sopk-only raise

s_bitset0/1_b32 reused the plain-scalar sym allow-list line, so the
sopk_accum mutant needle was no longer unique. Match the sopk raise that
formats with `base` instead.

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>

* test: add D3D12 WARP dispatch readback for s_abs_i32

Mirror the R0Y00#2639 / pack_absdiff UAV dump pattern. Cover INT_MIN, -1, 0,
a positive word, SCC, and an SCC-dependent branch on the adapter.

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>

* build: register s_abs_i32 WARP/hardware dispatch ctests

Wire startup_gfx2hlsl_s_abs_dispatch_{warp,hardware} to the new
UAV-readback mode so Windows CI and Sander can run the fixture.

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Co-authored-by: Royoo <3230853833@qq.com>

* startup: accept the slot 57 count exchange entered under a v_cmpx-narrowed EXEC (Part of R0Y00#2413) (R0Y00#2643)

* startup: accept the slot 57 count exchange entered under a v_cmpx-narrowed EXEC

The region before the count exchange may end with s_mov_b64 exec, -1, a
v_cmpx_gt_u32_e32 or v_cmpx_lt_u32_e32 of an SGPR against the proven
thread index, and an s_cbranch_execz to the exchange's first s_barrier.
The skipped block may hold lane-only instructions and scalar ALU whose
results are dead at the exchange: no SGPR it writes is read from the
exchange on, and SCC is rewritten by the exchange's s_cmp_eq_i32 before
any read. Both count-exchange arms replace EXEC before lane-dependent
work, and the HLSL barrier runs for every thread. Branches into the
skipped block, other compare sources, scalar loads and other execz
blocks stay refused.

AI-assisted.

* startup: accept any defined operands in the slot 57 count-entry compare

The entry before the count exchange no longer requires the compare to use
the thread index. The skipped block only leaves lane-predicated VGPR
writes and scalar results that are dead at the exchange, and both exchange
arms replace EXEC, so any per-lane EXEC from v_cmpx_gt_u32_e32 or
v_cmpx_lt_u32_e32 gives the same visible result for a per-lane skip as for
a per-wave skip. Each VGPR operand must be defined for every lane (not an
entry value or left stale by an exchange); SGPRs and constants are taken.

AI-assisted.

* tests: select the hardware adapter for indirect Dispatch readbacks (R0Y00#2652)

Co-authored-by: RavenCurseBurg <360931527+RavenCurseBurg@users.noreply.github.com>

* gfx2hlsl: lower the compute buffer store `off` form when its data is proven wave-uniform (R0Y00#2651)

* gfx2hlsl: lower the compute buffer store `off` form when its data is proven wave-uniform

A MUBUF store with neither offen nor idxen gives every lane the same byte
address (soffset plus the immediate), so the active lanes race on one
location. When every data VGPR holds one proven value in all enabled lanes
the order does not matter, and the store lowers like the offen form with no
VGPR term. The proof is the one v_readfirstlane_b32 already uses (entry
block with a known EXEC, or a recomputable expression with no join or EXEC
write since the definition), now shared as Stage.proven_uniform_v.

v_lshrrev_b64 / v_lshlrev_b64 / v_ashrrev_i64 with scalar or literal
sources now mark both destination halves uniform, under the same conditions
Stage.one applies to the 32-bit VALU forms.

Any other `off` store keeps a named refusal: "buffer store off with data not
proven wave-uniform". The atomic `off` form is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tests: cover the off store proof past the entry block

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tests: dispatch two off-store compute cases and decode the hand-assembled words

Cases O-dword (8 lanes, SGPR soffset plus immediate) and O-shift (32 lanes,
dwordx4 of a 64-bit shift of a scalar pair) store in the off form, so every
lane of a group writes one address. Their expected words are computed from
the instruction semantics, and the dispatch mode compares all 320 words.
The hand-assembled words are decoded with the repository disassembler and
must match their source lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* shader: lower 64-bit scalar bit-count and scan ops in gfx2hlsl (Part of R0Y00#1723) (R0Y00#2072)

* shader: lower s_bcnt0/1, s_ff0/ff1_i32_b64 and s_flbit_i32_b64/i64 in gfx2hlsl (Part of R0Y00#1723)

* docs: document startup scalar bit count and scan lowering (Part of R0Y00#1723)

* test: draw the 64-bit scalar bit scans on the adapter and read them back (R0Y00#1723)

* docs: describe the scalar bit scan draw test and list it in the Linux checks (R0Y00#1723)

* Carry bit-scan words through the float render target

---------

Co-authored-by: Royoo <3230853833@qq.com>

* tests: batch heap-view store references by compute shader (R0Y00#2654)

Co-authored-by: RavenCurseBurg <360931527+RavenCurseBurg@users.noreply.github.com>
Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* runtime: create committed resources through device slot 76 (R0Y00#2648)

* runtime: create committed resources through device slot 76

Device slot 76 (Xbox order, +0x260) takes the seven arguments of desktop
CreateCommittedResource (heap properties, heap flags, desc, initial
state, clear value, riid, ppv); on main the wrapper trapped on it. A
console package module creates its resources through it.

The slot-127 body becomes create_committed(slot, ...): slot 127 calls it
as before, slot 76 without a protected session or castable formats, so
both share the per-heap initial state, clear-value retry and title
memory. The log line names the slot.

New fixture with a negative control: startup_committed_slot76_warp and
_hardware (a render target with a clear value and default, upload and
readback buffers); the control asks for a 2D texture on an upload heap.

* Require exact rejection in the slot 76 control

---------

Co-authored-by: Royoo <3230853833@qq.com>

* startup: lower abs (|src| and -|src|) on v_cndmask_b32_e64 sources (R0Y00#2439)

Co-authored-by: Royoo <3230853833@qq.com>

* startup: handle vertex fetch with invalid input layout in gfx2hlsl (Part of R0Y00#1723) (R0Y00#2002)

* startup: translate a stream vertex fetch whose pipeline declares an empty input layout

A stream vertex shader that calls the fetch routine was refused whenever the
pipeline had no input layout elements. A layout declared with zero elements is
now published as 'ia1 0'; the translator reads each fetched register as zero
instead of refusing. A stream without a readable layout is still refused.

* docs: describe the empty input layout request (ia1 0) and its zero default

* test: draw readback for an empty declared input layout

* fix: gate zero-element input layout zero-fill behind X2W_STREAM_ZERO_FILL opt-in

* shader: lower gfx1030 comparison sample LOD and bias (R0Y00#1568)

* compute: accept gfx1013 image_atomic_umin on R32_UINT

gfx1013 image atomics covered add, umax and cmpswap only; M200-01 A stops at
unsigned image minimum. Allow umin with the shared gfx1030 InterlockedMin
lowering, keep it unsigned, and extend the gfx1013 fixture (high-bit operand
0x80000011 vs smin). Other ops stay refused.

Refs R0Y00#2618

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>

* gfx2hlsl: lower the carry of adjacent compute address adds (R0Y00#2658)

Co-authored-by: RavenCurseBurg <360931527+RavenCurseBurg@users.noreply.github.com>

* shader: lower experimental gfx1030 2D sample clamps (R0Y00#1638)

Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>

* startup: return E_OUTOFMEMORY when a D3D12 wrapper cannot be allocated (R0Y00#2656)

* startup: return E_OUTOFMEMORY when a D3D12 wrapper cannot be allocated

wrap() used the _aligned_malloc result without a check, so a failed
allocation under the job commit limit became a write through a null
pointer inside d3d12_xs.dll (seen at the slot 55 derived-pipeline
placeholder). wrap() now returns nullptr when the allocation or the
registry insert fails. Each of its 16 callers releases the desktop
object it created and returns E_OUTOFMEMORY with a null output.

startup_wrap_allocation_warp forces the failure through the
fixture-only export x2w_d3d12_fail_wraps for device creation and slots
8, 14, 16 and 55; the control never arms it and must report the
failure.

Fixes R0Y00#2653

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tests: cover the allocator, command list and committed-resource wrap failures

Review follow-up on R0Y00#2653. startup_wrap_allocation now also arms the
failure for device slot 9 (CreateCommandAllocator, the shared
create_slot path), slot 73 (command list) and slot 127 (committed
resource). Each must return E_OUTOFMEMORY with a null output, then
succeed. Removing the slot 73 null check makes the test crash at that
slot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Preserve the published D3D12 device on wrapper allocation failure

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Royoo <3230853833@qq.com>

* startup: lower one slot 57 scalar load in a pre-exchange execz block (R0Y00#2660)

A pre-exchange s_cbranch_execz block may hold one s_buffer_load_dword
whose result is live after the join, when EXEC there comes from
s_mov_b64 exec, -1 then v_cmpx_gt_u32_e32 of a wave-uniform SGPR bound
against the proven thread index, with no EXEC write or branch target in
between. The guest runs the block for the whole wave when any lane is
active, so the HLSL computes wave_any = (tid & ~63u) < bound at the
compare, branches around the block only when the wave is empty, and
gives the loaded word to every lane of a wave that has an active lane.
An empty wave issues no load and keeps the previous value. Vector writes
in the block stay predicated per lane. Other compares, non-uniform bounds
or offsets, s_load_dword, wider loads and a second live scalar stay
refused.

AI-assisted.

---------

Co-authored-by: Ammar Abdelfattah <a.mmar067a.mmar067@gmail.com>
Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>
Co-authored-by: JVProg <100954822+JVProg@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: dnn <55638248+denn0x@users.noreply.github.com>
Co-authored-by: Royoo <3230853833@qq.com>
Co-authored-by: Leyukaka <45659323+Leyukaka@users.noreply.github.com>
Co-authored-by: RavenCurseBurg <lycqay@gmail.com>
Co-authored-by: RavenCurseBurg <360931527+RavenCurseBurg@users.noreply.github.com>
Co-authored-by: Chad Hyatt <chad@hyatt.page>
Co-authored-by: lukaslw-lab <lukaslw@gmail.com>
Co-authored-by: lukaslw-lab <291379150+lukaslw-lab@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
Co-authored-by: chasegrindy <szymonkubica.biz@gmail.com>
Co-authored-by: chasegrindy <302242206+chasegrindy@users.noreply.github.com>
Co-authored-by: The Void <mrdominogrm@gmail.com>
Co-authored-by: tedin7 <tommasoderosa94@gmail.com>
Co-authored-by: NiiRoZz <simonin.remi25@gmail.com>
Co-authored-by: pigalot <pigalot@gmail.com>
Co-authored-by: triggered02 <153171514+triggered02@users.noreply.github.com>
Co-authored-by: yjs <1245206726@qq.com>
Co-authored-by: saii <120340942+Not-Saii@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants