Identify the native code boundary in rejected gfx1013 pixel records #472

Closed
opened 2026-11-22 06:01:27 +00:00 by R0Y00 · 1 comment
R0Y00 commented 2026-11-22 06:01:27 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T06:01:27Z.


At 796304302a a local scan counted 12,101 pixel shader records. For 6,189 records the native_program reader in tools/pixel_aot.py reported "Expected one aligned, terminated program". The reader searches the decompressed FSSM payload from the computed code start for aligned s_endpgm words and requires exactly one match. This diagnostic combines zero and multiple matches.

The maintainer is already investigating the shader corpus. This issue tracks the boundary question for coordination. Please link existing findings here before starting overlapping work. A useful first result is an aggregate split by zero vs. multiple matches, with one layout explained using instruction boundaries or an independently checked size field. Build a small synthetic fixture for that layout with one valid case and one ambiguous case. Include the command and expected result so another contributor can reproduce it without a local package. Share only counts and source-built examples.

This task is complete when we can explain one rejected layout and distinguish it from the ambiguous control. Any change to the reader can then be reviewed against that evidence.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6539105900 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/478). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T06:01:27Z. --- At 796304302ae9427a9e4d046a69045e61131f55a2 a local scan counted 12,101 pixel shader records. For 6,189 records the native_program reader in tools/pixel_aot.py reported "Expected one aligned, terminated program". The reader searches the decompressed FSSM payload from the computed code start for aligned s_endpgm words and requires exactly one match. This diagnostic combines zero and multiple matches. The maintainer is already investigating the shader corpus. This issue tracks the boundary question for coordination. Please link existing findings here before starting overlapping work. A useful first result is an aggregate split by zero vs. multiple matches, with one layout explained using instruction boundaries or an independently checked size field. Build a small synthetic fixture for that layout with one valid case and one ambiguous case. Include the command and expected result so another contributor can reproduce it without a local package. Share only counts and source-built examples. This task is complete when we can explain one rejected layout and distinguish it from the ambiguous control. Any change to the reader can then be reviewed against that evidence. AI-assisted.
R0Y00 commented 2026-11-24 06:48:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T06:18:15Z.


Resolved by #477, merged into main at 3310cb8. Among the 6,189 previously rejected pixel records, 3,561 had two termination markers 20 bytes apart. The reader uses the section extent and decoded branch targets to identify a reachable second exit. The synthetic fixtures accept that layout and reject a disconnected target or a branch into an instruction. To reproduce without a local package, run python3 -B tests/pixel_aot_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1. The LLVM 15 run passed. The rescan accepted 3,536 records in that group.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7075247553 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/478#issuecomment-7075247553). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T06:18:15Z. --- Resolved by #477, merged into main at 3310cb8. Among the 6,189 previously rejected pixel records, 3,561 had two termination markers 20 bytes apart. The reader uses the section extent and decoded branch targets to identify a reachable second exit. The synthetic fixtures accept that layout and reject a disconnected target or a branch into an instruction. To reproduce without a local package, run `python3 -B tests/pixel_aot_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1`. The LLVM 15 run passed. The rescan accepted 3,536 records in that group.
Sign in to join this conversation.
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#472
No description provided.