shader: combine mesh f16 mixlo/mixhi halves #3762

Merged
lambirou merged 1 commit from upstream-pr/3762 into main 2026-12-01 17:07:35 +00:00
lambirou commented 2026-12-01 16:57:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-01T16:57:10Z.


A real slot 57 mesh request (req_72e1909e13df6f66, MS 3072, PS 4608, root 5724 bytes) still refused at +0x7c0 with unproven mesh entry register 287. The program writes both halves of v31:

  • v_fma_mixlo_f16 v31, s81, v18, v30 at +0x79c
  • v_fma_mixhi_f16 v31, s82, v18, v15 at +0x7b8

and then reads the whole word. The mesh stage only tracked half-writes when layout.texture_heap_slot_map was set, so each instruction left the value marked partial and the whole-word read refused.

This enables graphics_half_writes for every mesh stage. The existing DirectCompute bookkeeping already merges the two halves when both are written; a lone half still refuses a whole-word read, which the new negative control covers.

Validation (Windows, Release, DXC 10.0.26100):

  • python -B tests/native_direct_mesh_check.py out\build\release\compile_dxil.exe "<DXC dir>" - pass, including mesh-mixed-half-pair (both halves through legacyF32ToF16 and or i32, exported) and mesh-mixed-half-single (refused, register 276 undefined).
  • ctest --preset release --no-tests=error -R '^native_direct' - 2/2 passed (native_direct_container, native_direct_mesh).

Counts only; request bytes stay local.

Refs #3497

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5590404214 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3762). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-01T16:57:10Z. --- A real slot 57 mesh request (`req_72e1909e13df6f66`, MS 3072, PS 4608, root 5724 bytes) still refused at `+0x7c0` with `unproven mesh entry register 287`. The program writes both halves of `v31`: - `v_fma_mixlo_f16 v31, s81, v18, v30` at `+0x79c` - `v_fma_mixhi_f16 v31, s82, v18, v15` at `+0x7b8` and then reads the whole word. The mesh stage only tracked half-writes when `layout.texture_heap_slot_map` was set, so each instruction left the value marked partial and the whole-word read refused. This enables `graphics_half_writes` for every mesh stage. The existing `DirectCompute` bookkeeping already merges the two halves when both are written; a lone half still refuses a whole-word read, which the new negative control covers. Validation (Windows, Release, DXC 10.0.26100): - `python -B tests/native_direct_mesh_check.py out\build\release\compile_dxil.exe "<DXC dir>"` - pass, including `mesh-mixed-half-pair` (both halves through `legacyF32ToF16` and `or i32`, exported) and `mesh-mixed-half-single` (refused, register 276 undefined). - `ctest --preset release --no-tests=error -R '^native_direct'` - 2/2 passed (`native_direct_container`, `native_direct_mesh`). Counts only; request bytes stay local. Refs #3497
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3762
No description provided.