gfx2hlsl: allow component-wise float VALU ops from proven uniform sources for v_readfirstlane_b32 #3789
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3789"
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 Holastor on 2026-12-01T22:34:48Z.
Summary
Extends
UNIFORM_VALUintools/startup/gfx2hlsl.pyto cover component-wise single-precision float conversions, arithmetic, transcendental, and clamp/min/max instructions (v_cvt_f32_i32,v_add_f32,v_sub_f32,v_subrev_f32,v_fmamk_f32,v_mad_f32,v_madak_f32,v_madmk_f32,v_rcp_iflag_f32,v_rsq_f32,v_sqrt_f32,v_exp_f32,v_floor_f32,v_trunc_f32,v_fract_f32,v_rndne_f32,v_sin_f32,v_cos_f32,v_min_f32,v_max_f32,v_min3_f32,v_max3_f32) when all source operands are proven uniform under an activeEXECmask.EXECprovenance, source/output modifier (abs/neg/clamp/mul/div), anduniform_exprchecks.v_fmac_f32,v_mac_f32) that implicitly readdst.v_readfirstlane_b32site completely and advanced to later checks, while larger.c67programs advanced past their initial uniform float chains to downstream non-uniform/wave-read sites.Verification
python -B tests/startup_gfx2hlsl_readfirstlane_uniform_check.py(0 failed; added positive tests forv_cvt_f32_i32,v_add_f32/v_sub_f32withneg/clamp, andv_mad_f32+v_floor_f32, plus negative controls forv_fmac_f32_e32and varyingv_add_f32)python -B tests/startup_compute_readfirstlane_check.py(passed)python -B tests/startup_gfx2hlsl_readfirstlane_recompute_check.py(0 failed)python -B tests/startup_gfx2hlsl_readfirstlane_load_recompute_check.py(0 failed)python -B tests/docs_links_check.pyandpython -B tests/bidi_controls_check.py(passed)