You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
shader: lower v_pack_b32_f16 in the direct C++ DXIL path #2909
Target branch cpp-migration. Open to contributors. Comment here to claim.
On 4036577 the opcode table recognizes VOP3 0x311, but a source-built pixel shader stops at native compute +0x10: direct DXIL lowering for v_pack_b32_f16 in the pixel profile. Removing only the pack instruction produces DXIL.
Reproduce with patched_pixel from tests/native_direct_container_check.py. Supply the instruction words [0x7e0802ff, 0x11223344, 0x7e0a02ff, 0x55667788, 0xd7110004, 0x00020b04] and export (0xf800180f, 0x05040504). Run compile_dxil <sdk-dir> <empty-cache> gfx1013-container-ps input.cdxil output.cso. For the control remove the final two instruction words and adjust the length. The ordinary pack writes 0x77883344 to v4, which also supplies the first source.
Acceptance follows each source's high/low selection, clears the half sign for abs, then toggles it for neg, and places source 0 low and source 1 high. Preserve bit patterns including signed zero and NaN payloads. Cover operand overlap, SGPR input and both wrong-result controls (swapped halves and neg before abs). Document unsupported modifier forms. Generate DXIL with the direct frontend and verify exact packed bits by GPU readback on a synthetic fixture, recording adapter, driver, build, and any capability skips. python -B tests/startup_gfx2hlsl_pack_b32_f16_check.py already passes 2304 reference cases. #1723 tracks the older translator census. #2906–#2908 cover separate branch and descriptor work.
I'd like to take this one. I'll implement the direct-path lowering on cpp-migration from the instruction semantics and the existing fixture, with the overlap, SGPR and wrong-result controls, plus a GPU readback on a synthetic fixture.
Closing: the fix landed on cpp-migration via #2917, squash-merged as 16099d7c. Fixes #2909 does not close issues automatically outside the default branch. Evidence on #2917: native_pack_b32_f16_ir passed on Windows, and on Linux (Ybucaille) and a GTX 1080 Ti (sydney-0o). The GPU readback native_pack_b32_f16_hardware passed 3/3 on an RTX 3080 (JB2WIN, 528 packed words bit-exact). The issue's words now compile with compile_dxil ... gfx1013-container-ps. The RX 9070 XT readback stays blocked by #2915.
Activity
Ybucaille commentedon Nov 26, 2026
I'd like to take this one. I'll implement the direct-path lowering on
cpp-migrationfrom the instruction semantics and the existing fixture, with the overlap, SGPR and wrong-result controls, plus a GPU readback on a synthetic fixture.shader: lower v_pack_b32_f16 in the direct C++ DXIL path (#2917)
MasterDomino commentedon Nov 26, 2026
Closing: the fix landed on
cpp-migrationvia #2917, squash-merged as16099d7c.Fixes #2909does not close issues automatically outside the default branch. Evidence on #2917:native_pack_b32_f16_irpassed on Windows, and on Linux (Ybucaille) and a GTX 1080 Ti (sydney-0o). The GPU readbacknative_pack_b32_f16_hardwarepassed 3/3 on an RTX 3080 (JB2WIN, 528 packed words bit-exact). The issue's words now compile withcompile_dxil ... gfx1013-container-ps. The RX 9070 XT readback stays blocked by #2915.AI-assisted.