shader: accept inline constants in packed binary16 arithmetic and min/max in direct DXIL #3228
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3228
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@legacy-code-archaeologist on GitHub · 2026-11-27 23:57 UTC · original
Refs #2935 and #3226.
In
src/gfx1013_direct_compute.inl,DirectCompute::packed_f16_alu()(v_pk_add_f16,v_pk_mul_f16,v_pk_fma_f16) currently refuses every inline constant except128(0) and255(literal) with"unsupported packed binary16 arithmetic source", andDirectCompute::packed_minmax()(v_pk_min_f16,v_pk_max_f16) likewise refuses inline binary16 float constants240..248and non-zero inline integers129..208with"unsupported packed 16-bit min/max source".As noted on #3226 (Rank 3 follow-on after #3222), shaders using
v_pk_*_f16with inline binary16 float constants (0.5,-0.5,1.0,-1.0,2.0,-2.0,4.0,-4.0,1/(2*pi)) or inline integers (0..64,-1..-16) hit this refusal.Scope
240..248, with[31:16] = 0per gfx1013 hardware) and inline integer constants (128..208, 32-bit sign-extended) inpacked_f16_alu()andpacked_minmax()(keeping float240..248refused on integerv_pk_min_{i,u}16/v_pk_max_{i,u}16).vcc_lo/vcc_hi,m0,exec_lo/exec_hi,scc,clamp, reserved bits, and non-default FP16 MODE.op_sel_hi=1),neg_lo/neg_hi, single-rounding FMA tie witnesses with0.5, inline integer constants, and kept refusals.AI-assisted.