AGC: FMASK decompress over a 4x MSAA target with CMASK, FMASK and DCC stops Ruffle's player (PPSA68091) #4685

Closed
opened 2026-10-12 18:59:16 +00:00 by Recapi · 0 comments
Recapi commented 2026-10-12 18:59:16 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-12T18:59:16Z.


Ruffle Flash (PPSA68091, catalog 1.2.0) gets past start-up with #4593 (--linux-fixed-base 0x400000, #4013). Its game library UI runs. When it starts the Flash player at its default quality (High, 4x MSAA), the first CB pass over the player's multisampled color target throws:

[videoout] presentation failed: AGC graphics: only normal color rendering with copy ROP is supported (CB_COLOR_CONTROL 0x00cc0050, mode FMASK decompress)

Setup: Linux (Ubuntu, GCC, Release), NVIDIA RTX 2080 SUPER, main 1acfa7f plus #4593. The catalog build has sce_module/libc.prx unwrapped. The player renders through wgpu on the title's bundled Mesa RADV (PlayStation 5 GPU (RADV NAVI21), Mesa 26.2.0).

Register state at the pass, captured with a temporary print in DecodeColorMetadataPass, not part of any PR:

Register Value Decoded
CB_COLOR_CONTROL (0x202) 0x00cc0050 MODE 5 (FMASK decompress), ROP3 0xcc
PA_SC_AA_CONFIG (0x2f8) 0x00000000 the pass rasterizes single-sampled
CB_TARGET_MASK / CB_SHADER_MASK 0xf / 0xf slot 0 only
DB_DEPTH_CONTROL (0x200), DB_RENDER_CONTROL (0x0) 0x00700770, 0 no depth or stencil work
viewport, scissors 960±960, 540±540; 0,0–1920,1080 covers the whole target
CB_COLOR0_INFO (0x31c) 0x1002e028 8_8_8_8 UNORM, FAST_CLEAR (bit 13), COMPRESSION (bit 14), BLEND_CLAMP, DCC_ENABLE (bit 28)
CB_COLOR0_ATTRIB (0x31d) 0x00012000 4 samples, 4 fragments
CB_COLOR0_BASE / CMASK / FMASK / DCC_BASE 0x40023a40 / 0x40046000 / 0x40043880 / 0x40046060

What happens before the pass. The player loaded an empty SWF (no games in the library yet, SWF: 0x0 @ 0 fps). So before the pass the target was only cleared, through its metadata, and no draw went through DecodeColorBuffer for it. The FMASK decompress is the first CB operation on the target.

What main would need, from reading the AGC driver; none of this is implemented:

  • DecodeColorBuffer rejects DCC on any multisampled target (DCC over a multisampled color target is unsupported). Accepting MODE 5 alone would stop there.
  • DecodeColorMetadataPass only models CB passes over single-sample targets, plus the CB resolve. Multisampled texels live only in the host image.
  • The clear that preceded the pass exists only in the guest's CMASK, FMASK and DCC metadata. Someone has to apply it to the host MSAA image: at the FMASK decompress, or at whatever reads the target next (a resolve or a DCC decompress). What the console's FMASK decompress does to CMASK fast clears and DCC keys of a multisampled target is not measured here.

Workaround. With quality=0 (Low, which renders without MSAA) in Ruffle's /data/ruffle/settings.txt, the player starts and runs. It presented 1,800 frames before I closed it. With quality=2, the default, it stops as above.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5818941706 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4685). Originally posted by [Recapi](https://github.com/Recapi) on 2026-10-12T18:59:16Z. --- Ruffle Flash (PPSA68091, catalog 1.2.0) gets past start-up with #4593 (`--linux-fixed-base 0x400000`, #4013). Its game library UI runs. When it starts the Flash player at its default quality (High, 4x MSAA), the first CB pass over the player's multisampled color target throws: ``` [videoout] presentation failed: AGC graphics: only normal color rendering with copy ROP is supported (CB_COLOR_CONTROL 0x00cc0050, mode FMASK decompress) ``` Setup: Linux (Ubuntu, GCC, Release), NVIDIA RTX 2080 SUPER, `main` 1acfa7f plus #4593. The catalog build has `sce_module/libc.prx` unwrapped. The player renders through wgpu on the title's bundled Mesa RADV (`PlayStation 5 GPU (RADV NAVI21)`, Mesa 26.2.0). **Register state at the pass**, captured with a temporary print in `DecodeColorMetadataPass`, not part of any PR: | Register | Value | Decoded | |---|---|---| | `CB_COLOR_CONTROL` (0x202) | `0x00cc0050` | MODE 5 (FMASK decompress), ROP3 0xcc | | `PA_SC_AA_CONFIG` (0x2f8) | `0x00000000` | the pass rasterizes single-sampled | | `CB_TARGET_MASK` / `CB_SHADER_MASK` | `0xf` / `0xf` | slot 0 only | | `DB_DEPTH_CONTROL` (0x200), `DB_RENDER_CONTROL` (0x0) | `0x00700770`, `0` | no depth or stencil work | | viewport, scissors | 960±960, 540±540; `0,0`–`1920,1080` | covers the whole target | | `CB_COLOR0_INFO` (0x31c) | `0x1002e028` | 8_8_8_8 UNORM, FAST_CLEAR (bit 13), COMPRESSION (bit 14), BLEND_CLAMP, DCC_ENABLE (bit 28) | | `CB_COLOR0_ATTRIB` (0x31d) | `0x00012000` | 4 samples, 4 fragments | | `CB_COLOR0_BASE` / `CMASK` / `FMASK` / `DCC_BASE` | `0x40023a40` / `0x40046000` / `0x40043880` / `0x40046060` | | **What happens before the pass.** The player loaded an empty SWF (no games in the library yet, `SWF: 0x0 @ 0 fps`). So before the pass the target was only cleared, through its metadata, and no draw went through `DecodeColorBuffer` for it. The FMASK decompress is the first CB operation on the target. **What `main` would need**, from reading the AGC driver; none of this is implemented: - `DecodeColorBuffer` rejects DCC on any multisampled target (`DCC over a multisampled color target is unsupported`). Accepting MODE 5 alone would stop there. - `DecodeColorMetadataPass` only models CB passes over single-sample targets, plus the CB resolve. Multisampled texels live only in the host image. - The clear that preceded the pass exists only in the guest's CMASK, FMASK and DCC metadata. Someone has to apply it to the host MSAA image: at the FMASK decompress, or at whatever reads the target next (a resolve or a DCC decompress). What the console's FMASK decompress does to CMASK fast clears and DCC keys of a multisampled target is not measured here. **Workaround.** With `quality=0` (Low, which renders without MSAA) in Ruffle's `/data/ruffle/settings.txt`, the player starts and runs. It presented 1,800 frames before I closed it. With `quality=2`, the default, it stops as above.
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
boykopovar/AnyPS5#4685
No description provided.