startup: float-result conversions refuse output modifiers (5 of 29 loading-screen shader refusals) #1705
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#1705
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?
@triggered02 on GitHub · 2026-11-24 17:28 UTC · original
Found while triaging the refusals in the first main-game loading-screen shader cache (#870). 5 of 29 refused shaders.
Problem
gfx2hlslrefuses any output modifier on the table-driven conversions, even though the same modifiers are implemented for other float results:Cause: the float-result conversions (
v_cvt_f32_i32,v_cvt_f32_u32,v_cvt_f32_ubyte0..3,v_cvt_f32_f16) sit inVEC_U, the uint-result table, whose dispatch rejects every modifier before looking at the instruction.Stage.set_vf()already implementsclamp,mul:2,mul:4anddiv:2for float results.Measured
VOP1-as-VOP3 encodings built in the test (
0b110101prefix, opcode0x180 + 0x05, omod inw1[28:27]),mainat68969ed8:v_cvt_f32_i32_e64 v1, v1v1 = U(float(int(v1)));v_cvt_f32_i32_e64 v1, v1 mul:2v1 = U((float(int(v1))) * 2.0);v_cvt_f32_i32_e64 v1, v1 mul:4... * 4.0v_cvt_f32_i32_e64 v1, v1 div:2... * 0.5v_cvt_f32_i32_e64 v1, v1 clampU(saturate(float(int(v1))))v_cvt_f32_u32_e64,v_cvt_f32_f16_e64withmul:2v_cvt_f16_f32_e64 v1, v1 mul:2(uint result)v_cvt_f32_i32_e64 v1, -v1(source negation)Done when
clamp,mul:2,mul:4,div:2, and emit the same text as before when no modifier is present.op_seland source modifiers are still refused on a conversion rather than silently ignored.docs/experiments.mdrecords the accepted modifiers.Not in this slice:
op_sel/abs/negon conversions (still refused), and proving the loading screen gets further (census counts are aggregates only).AI-assisted (Claude Code).