feat(shader): implement image_msaa_load #790

Merged
CnRJay merged 3 commits from upstream-pr/790 into main 2026-10-06 03:29:56 +00:00
CnRJay commented 2026-10-06 00:56:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-06T00:56:43Z.


Implements IMAGE_MSAA_LOAD (MIMG opcode 0x80).

  • Decoder: accepts it only on 2D MSAA and 2D MSAA array images with a single-bit dmask. It returns four dwords, like gather. D16, TFE/LWE and non-multisampled dimensions are rejected.
  • Translation: emits one ImageRead for each of the four fragments, starting at the fragment ID in the address (fragId + 0..3), and writes the selected component of each fragment to vdata + i. makeImageAddress takes an optional fragment step and adds it to the dword that holds the fragment component, so the a16 layouts work (low half for 2D MSAA, high half for 2D MSAA array).
  • Tests: a new image_msaa_load unit test covers decoding, the four reads and their fragment offsets for the plain and a16 forms of both dimensions, and the rejected encodings.

Shader progress goes from 1124 to 1125 out of 1166. The full ctest suite passes (338/338).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4752682949 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/790). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-10-06T00:56:43Z. --- Implements `IMAGE_MSAA_LOAD` (MIMG opcode 0x80). - **Decoder:** accepts it only on 2D MSAA and 2D MSAA array images with a single-bit dmask. It returns four dwords, like gather. D16, TFE/LWE and non-multisampled dimensions are rejected. - **Translation:** emits one `ImageRead` for each of the four fragments, starting at the fragment ID in the address (`fragId + 0..3`), and writes the selected component of each fragment to `vdata + i`. `makeImageAddress` takes an optional fragment step and adds it to the dword that holds the fragment component, so the a16 layouts work (low half for 2D MSAA, high half for 2D MSAA array). - **Tests:** a new `image_msaa_load` unit test covers decoding, the four reads and their fragment offsets for the plain and a16 forms of both dimensions, and the rejected encodings. Shader progress goes from 1124 to 1125 out of 1166. The full ctest suite passes (338/338). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-06 00:57:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-06T00:57:08Z.


Progress report (fe98276 → 8cfe87b)

📈 GPU shader instructions: 96.48% (+0.08%, +1 implemented instructions)

✅ 1 implemented
Encoding Name
MIMG IMAGE_MSAA_LOAD
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6007000990 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/790#issuecomment-6007000990). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-06T00:57:08Z. --- <!-- progress-report --> ### Progress report (fe98276 → 8cfe87b) 📈 **GPU shader instructions**: 96.48% (+0.08%, +1 implemented instructions) <details> <summary>✅ 1 implemented</summary> | Encoding | Name | | - | - | | MIMG | `IMAGE_MSAA_LOAD` | </details>
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
boykopovar/AnyPS5!790
No description provided.