• win64-main-4b7df86 4b7df8623a

    Ghost released this 2026-07-13 10:20:12 -04:00 | 511 commits to 1016_part3 since this release

    VOP2 opcode 0x2B was mapped to v_ldexp_f32, which is its gfx6/gfx7
    assignment. On gfx10-class hardware 0x2B is v_fmac_f32, so any shader
    using it silently computed ldexp(a, b) instead of dst += a * b.
    v_ldexp_f32 on gfx10 only exists as VOP3 0x362, which the VOP3 table
    already maps correctly.

    Also add the remaining members of the fmac family:

    • v_fmamk_f32 (0x2C) and v_fmaak_f32 (0x2D), including their mandatory
      literal dword in instruction sizing and operand construction, reusing
      the existing v_madmk/v_madak handling.
    • The VOP3-encoded form of v_fmac_f32 (0x12B), emitted when source
      modifiers are present.

    SPIR-V emission reuses the existing v_mac_f32 body (fma with the
    destination register as addend) and the v_mad/v_fma case group.

    Opcode assignments verified against LLVM's AMDGPU backend
    (VOP2Instructions.td): V_FMAC_F32 gfx10 = 0x02b, V_FMAMK_F32 = 0x02c,
    V_FMAAK_F32 = 0x02d; V_LDEXP_F32 is 0x02b only on gfx6/gfx7 and is
    VOP3-only 0x362 on gfx10. Decode verified by feeding hand-assembled
    gfx1013 words through Gen5ShaderTranslator: 0x560A0501 previously
    decoded as VLdexpF32 and a v_fmamk_f32 program failed with
    unknown-vop2 op=0x2C; both now decode correctly, and VOP3 0x362 still
    decodes as VLdexpF32.

    Co-authored-by: Claude Fable 5 noreply@anthropic.com

    Downloads