fix(agc): write a replace blend into a packed color target without blending #7243

Merged
gjonn merged 1 commit from upstream-pr/7243 into main 2026-11-01 13:06:57 +00:00
gjonn commented 2026-10-17 18:54:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-17T18:54:37Z.


What

A packed color target (ColorExportPacking other than None: the 10_11_11 unorm target and, since #7207, the 11_11_10 float target) renders through an R32_UINT attachment, which cannot blend, so DecodeState refused any enabled blend with blending into a 10_11_11 unorm color target is unsupported (or ... an 11_11_10 float color target ...).

A blend whose color equation is ONE * source + ZERO * destination (CB_BLEND_CONTROL with COLOR_SRCBLEND = ONE, COLOR_DESTBLEND = ZERO, COLOR_COMB_FCN = ADD) writes the source color unchanged, and a packed target has no alpha channel for the alpha equation to affect, so such a draw is now decoded with blending disabled. Every other blend into a packed target is still refused.

On PPSA01317 a draw enables CB_BLEND_CONTROL 0x60010001 on a packed target during boot and the title aborts with the refusal above; with this change it gets past it on main.

unorm10_11_11TargetTests (agc_driver_graphics) now decodes two replace blends (0x40010001, and 0x60050001 whose alpha equation differs) into a 10_11_11 unorm target and requires blending to be disabled with the packing kept, and still requires an additive blend (0x40010101) and a SRC_ALPHA blend (0x40010005) to be refused. float11_11_10TargetTests likewise decodes three replace blends (0x40010001, 0x60010001 as PPSA01317 sets it, and 0x60050001) into an 11_11_10 float target and requires blending to be disabled with the packing and the reversed component mapping kept, and still requires 0x60010101 and 0x40010005 to be refused. On main the test fails with blending into a 10_11_11 unorm color target is unsupported; it passes with the change.

The check sits on the shared packed-target path, so one line covers both packings. Rebased onto main after #7207 merged.

Tested

Windows 11, MinGW GCC Release build with BUILD_TESTING=ON.

  • agc_driver_graphics fails on main (with only the test applied) and passes with the change.
  • Every ctest registered on agc_shader_memory_tests, agc_shader_device_profile_tests, agc_driver_graphics_tests, agc_driver_packed_float_color_target_tests and agc_driver_packed_unorm_color_target_tests (26 tests) passes.
  • python tools/check_conventions.py --base origin/main passes; tools/check_test_registration.py reports no unregistered tests.
  • PPSA01317: the boot abort no longer occurs and the title continues past it.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: PPSA01317 #4697
  • GPUs tested: NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92, Windows 11
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4902990725 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7243). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-17T18:54:37Z. --- ### What A packed color target (`ColorExportPacking` other than `None`: the 10_11_11 unorm target and, since #7207, the 11_11_10 float target) renders through an `R32_UINT` attachment, which cannot blend, so `DecodeState` refused any enabled blend with `blending into a 10_11_11 unorm color target is unsupported` (or `... an 11_11_10 float color target ...`). A blend whose color equation is `ONE * source + ZERO * destination` (`CB_BLEND_CONTROL` with `COLOR_SRCBLEND = ONE`, `COLOR_DESTBLEND = ZERO`, `COLOR_COMB_FCN = ADD`) writes the source color unchanged, and a packed target has no alpha channel for the alpha equation to affect, so such a draw is now decoded with blending disabled. Every other blend into a packed target is still refused. On PPSA01317 a draw enables `CB_BLEND_CONTROL 0x60010001` on a packed target during boot and the title aborts with the refusal above; with this change it gets past it on `main`. `unorm10_11_11TargetTests` (`agc_driver_graphics`) now decodes two replace blends (`0x40010001`, and `0x60050001` whose alpha equation differs) into a 10_11_11 unorm target and requires blending to be disabled with the packing kept, and still requires an additive blend (`0x40010101`) and a `SRC_ALPHA` blend (`0x40010005`) to be refused. `float11_11_10TargetTests` likewise decodes three replace blends (`0x40010001`, `0x60010001` as PPSA01317 sets it, and `0x60050001`) into an 11_11_10 float target and requires blending to be disabled with the packing and the reversed component mapping kept, and still requires `0x60010101` and `0x40010005` to be refused. On `main` the test fails with `blending into a 10_11_11 unorm color target is unsupported`; it passes with the change. The check sits on the shared packed-target path, so one line covers both packings. Rebased onto `main` after #7207 merged. ### Tested Windows 11, MinGW GCC Release build with `BUILD_TESTING=ON`. - `agc_driver_graphics` fails on `main` (with only the test applied) and passes with the change. - Every ctest registered on `agc_shader_memory_tests`, `agc_shader_device_profile_tests`, `agc_driver_graphics_tests`, `agc_driver_packed_float_color_target_tests` and `agc_driver_packed_unorm_color_target_tests` (26 tests) passes. - `python tools/check_conventions.py --base origin/main` passes; `tools/check_test_registration.py` reports no unregistered tests. - PPSA01317: the boot abort no longer occurs and the title continues past it. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: PPSA01317 #4697 - [x] GPUs tested: NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92, Windows 11 - [x] AI-assisted: yes
akkadbakkad89 commented 2026-10-17 20:05:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-17T20:05:51Z.


Independent hardware run, head b7fa91320e, Windows 11, MinGW (WinLibs GCC 15.2.0), Release: agc_driver_graphics (incl. the new replace-blend packed-target case), agc_shader_memory, agc_shader_device_profile all pass on NVIDIA RTX 3070 (driver 617.42); agc_driver_graphics also passes on Intel UHD 630 (ANYPS5_GPU=UHD, igvk64).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6240135231 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7243#issuecomment-6240135231). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-17T20:05:51Z. --- Independent hardware run, head `b7fa91320e`, Windows 11, MinGW (WinLibs GCC 15.2.0), Release: `agc_driver_graphics` (incl. the new replace-blend packed-target case), `agc_shader_memory`, `agc_shader_device_profile` all pass on NVIDIA RTX 3070 (driver 617.42); `agc_driver_graphics` also passes on Intel UHD 630 (`ANYPS5_GPU=UHD`, igvk64).
oneandonlydean commented 2026-10-17 23:09:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T23:09:30Z.


#7207 has merged, and this PR builds on the same code. Could you rebase onto current main? We will run full CI on the new head from there.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6242867438 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7243#issuecomment-6242867438). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T23:09:30Z. --- #7207 has merged, and this PR builds on the same code. Could you rebase onto current main? We will run full CI on the new head from there.
gjonn commented 2026-10-17 23:38:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-17T23:38:13Z.


Rebased onto main 5de7a46e0 after #7207. The replace rule (ONE * src + ZERO * dst drawn with blending disabled) now covers 11_11_10 float targets too: float11_11_10TargetTests decodes 0x40010001, 0x60010001 and 0x60050001 into an 11_11_10 float target without blending (packing and component mapping kept) and still refuses 0x60010101 and 0x40010005. agc_driver_graphics, agc_driver_packed_float_color_target, agc_driver_packed_unorm_color_target and the other ctests on those executables (26) pass; check_conventions.py --base origin/main and check_test_registration.py are clean.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243180146 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7243#issuecomment-6243180146). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-17T23:38:13Z. --- Rebased onto main 5de7a46e0 after #7207. The replace rule (ONE * src + ZERO * dst drawn with blending disabled) now covers 11_11_10 float targets too: `float11_11_10TargetTests` decodes `0x40010001`, `0x60010001` and `0x60050001` into an 11_11_10 float target without blending (packing and component mapping kept) and still refuses `0x60010101` and `0x40010005`. `agc_driver_graphics`, `agc_driver_packed_float_color_target`, `agc_driver_packed_unorm_color_target` and the other ctests on those executables (26) pass; `check_conventions.py --base origin/main` and `check_test_registration.py` are clean. AI-assisted: yes
frankea commented 2026-10-18 02:53:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-18T02:53:51Z.


RTX 4090 data point on PPSA01317, the title this PR lists under Unblocks. Short version: with the PR, the blending into an 11_11_10 float color target is unsupported abort is gone on this GPU too, 3 of 3 runs, and the next stop is the dynamic-mip storage image that #7238 covers. On current main itself the title no longer reaches that draw: #7323 (merged today) makes its PS VR2 probe succeed, and it aborts 5 s in on sceHmd2ReprojectionQueryBufferSizeAlign not implemented, so the A/B below is on the last main base that gets to the blend.

Setup. Gran Turismo 7 PPSA01317 01.000.001 (base package), Windows 11 (26200), RTX 4090 (NVIDIA 616.92), AMD Ryzen 7 5800X, MinGW-w64 GCC 15.2.0 r7 (UCRT), Release libs target only (no tests built). app.exe is the relink from main 31cbb55d7 (--windows --registry --module-dir .); only libs/ is swapped between runs. Two trees:

  • A, the PR on current main: main b39d90bf1 + #7137 2aa6bfca6 + #7243 da158d61f (both merge clean, 9936fd9be). #7175 is left out: it still conflicts with main (as a cherry-pick only in docs/dev/debt/libSceAgcDriver.md).
  • B, the PR on the stack that reaches the blend: main e1041f6a5 + #7137 2aa6bfca6 + #7207 ec28b6be8 + #7175 555b7e824 + #5958 87a9b8d28 (my 10/17 set from D4697) + #7243 da158d61f cherry-picked (f76397990; the only conflict is in tests/Graphics.cpp, taken from the PR, not compiled here). The same set without #7243 is the control.

Both sets carry the libSceSsl.prx from #7319 (1f267559e) in place of the stock one, because the title calls sceSslConnect right after its save-data mount and the stock export throws there, before any 11_11_10 draw. No controller, no input, nobody at the keyboard; one-shot interactive task per run, 300 s cap, box otherwise idle.

Result on B (the A/B that tests this PR). Without #7243, 3 of 3 runs abort on AGC graphics: blending into an 11_11_10 float color target is unsupported 27 to 45 s after launch (10/17 evening, same libs set otherwise). With #7243, 3 of 3 runs get past it: the "Sony Interactive Entertainment presents" splash is drawn, then the black loading screen with the GT spinner in the corner, title-bar counter at 50 to 60 FPS (59.94 FPS, 445 to 500 frames presented by the time of the last capture), save data mounted (mount3 ... dir=DRFILEIV ... -> 0x809f0008), three sceNetResolverStartNtoa -> host DNS lookup failed, and then, identically every time:

[gpu] driver failure: compute shader 0x1258d58300: runtime storage image mip capacity exceeded
[videoout] presentation failed: compute shader 0x1258d58300: runtime storage image mip capacity exceeded
terminate called after throwing an instance of 'std::runtime_error'
  what():  compute shader 0x1258d58300: runtime storage image mip capacity exceeded
FATAL: abort() (SIGABRT) on thread 20456

That is the ResourceMaterializer.cpp reject that #7238 raises the slot count for, and gjonn describes the same boot abort on PPSA01317 there; this PR plus #7238 is the next combination to try here. Nothing else new appears in between: no partial writes of an 11_11_10 float color target, no color export format refusal, no unsupported primitive, no device loss.

libs run shader cache exit after stop
B without #7243 (10/17, 3 runs) 1 / 2 / 3 warm 45 s / 27 s / 27 s blending into an 11_11_10 float color target is unsupported
B with #7243 1 5 misses 53 s compute shader 0x1258d58300: runtime storage image mip capacity exceeded
B with #7243 2 warm 33 s same
B with #7243 3 warm 32 s same
A (main b39d90bf1 + #7137 + #7243) 1 / 2 / 3 not reached 8 s / 5 s / 5 s sceHmd2ReprojectionQueryBufferSizeAlign not implemented

Result on A, for the record. On current main the title dies in its module initialisation, on the main thread, before the first draw: libSceHmd2.prx+0x1b70 called from app.exe+0x952eff under libSceSysmodule.prx+0x347e. On the 10/17 bases sceHmd2Initialize returned SCE_HMD2_ERROR_UNSUPPORTED_FEATURE and the title skipped its VR path; since #7323 sceHmd2Initialize and sceHmd2Open succeed and the title goes on to query the reprojection buffer sizes, which are still NotImplemented_nid_no_patch. That is not this PR's problem, but anyone retesting PPSA01317 on main after today will hit it first. I will note it on D4697.

stderr of run B-3 (warm, box idle) from the second 10 s summary to the abort, per-shader ShaderRegistry lines removed
[log] 10.3 s: 177 lines (5 stdout, 172 stderr), 25.0 KiB written, 0 repeats coalesced; callers spent 0.31 ms queueing and formatting (0.003% of one thread), logger thread 65.69 ms, queue peak 2.4 KiB
[SAVEDATA:native] mount3 user=268435456 dir=DRFILEIV mode=0x1 blocks=673 -> 0x809f0008 point= status=0
[SAVEDATA:native] getMemory2 user=268435456 slot=0 -> 0x00000000
[shader-disk-cache] (10 s): 111 hits, 0 misses, 0 writes (0.0 MiB), 0 load failures, 0 write failures; resource plans: 108 hits, 0 misses, 0 writes, 0 load failures; 11.8 MiB read in 24.3 ms
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[gpu] driver failure: compute shader 0x1258d58300: runtime storage image mip capacity exceeded
[videoout] presentation failed: compute shader 0x1258d58300: runtime storage image mip capacity exceeded
terminate called after throwing an instance of 'std::runtime_error'
  what():  compute shader 0x1258d58300: runtime storage image mip capacity exceeded
FATAL: abort() (SIGABRT) on thread 20456
    #0 0x00007fffa1ff2bd8 libc.prx+0x12bd8
    #1 0x00007fffa20c5af1 libc.prx+0xe5af1
    #2 0x00000000d44ef910
  stack return address candidates:
    [rsp+0x8] 0x00007fffa1ff2df5 libc.prx+0x12df5
    [rsp+0x38] 0x00007fffd0d62139 ucrtbase.dll+0xc2139
    [rsp+0xb8] 0x00007fffd0d45261 ucrtbase.dll+0xa5261
    [rsp+0xe8] 0x00007fffa2044056 libc.prx+0x64056
    [rsp+0x120] 0x00007fffd0d13de0 ucrtbase.dll+0x73de0
    [rsp+0x138] 0x00007fffa203f0db libc.prx+0x5f0db
    [rsp+0x168] 0x00007fffa203f100 libc.prx+0x5f100
    [rsp+0x198] 0x00007fffa204a039 libc.prx+0x6a039
    [rsp+0x1b8] 0x00007fffd0d13de0 ucrtbase.dll+0x73de0
    [rsp+0x1c8] 0x00007fffa27de76e libSceVideoOut.prx+0x3e76e
    [rsp+0x2b0] 0x00007fffa27d0101 libSceVideoOut.prx+0x30101
    [rsp+0x538] 0x00007fffa27ae422 libSceVideoOut.prx+0xe422
    [rsp+0x588] 0x00007fffa294d4cf libstdc++-6.dll+0x13d4cf
    [rsp+0x5c8] 0x00007fffb80a9f6a libwinpthread-1.dll+0x9f6a
    [rsp+0x5d8] 0x00007fffb80a8b31 libwinpthread-1.dll+0x8b31
    [rsp+0x618] 0x00007fffd0cccd30 ucrtbase.dll+0x2cd30
    [rsp+0x648] 0x00007fffd2b2dda7 KERNEL32.DLL+0x2dda7
    [rsp+0x678] 0x00007fffd39bee4c ntdll.dll+0x7ee4c

The abort block of run A-3 (main b39d90bf1 + #7137 + #7243), for comparison:

[libc] unhandled exception 'St13runtime_error' thrown from 00007fff70cce924
terminate called after throwing an instance of 'std::runtime_error'
  what():  sceHmd2ReprojectionQueryBufferSizeAlign not implemented
FATAL: abort() (SIGABRT) on thread 3808
    #0 0x00007fff70c11b18 libc.prx+0x11b18
    #1 0x00007fff70ce9b31 libc.prx+0xe9b31
    #2 0x000000000060f750
  stack return address candidates:
    ...
    [rsp+0x328] 0x00007fff647a1b70 libSceHmd2.prx+0x1b70
    [rsp+0x358] 0x0000000140952eff app.exe+0x952eff
    [rsp+0x428] 0x000000014094e714 app.exe+0x94e714
    [rsp+0x548] 0x0000000140bde714 app.exe+0xbde714
    [rsp+0x588] 0x0000000140c54a0f app.exe+0xc54a0f
    [rsp+0x5b8] 0x0000000140c54b87 app.exe+0xc54b87
    [rsp+0x608] 0x0000000140c54623 app.exe+0xc54623
    [rsp+0x668] 0x00007fff9840347e libSceSysmodule.prx+0x347e
    [rsp+0x6b8] 0x000000014092b706 app.exe+0x92b706
    [rsp+0x6e8] 0x000000014092bf61 app.exe+0x92bf61

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244924007 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7243#issuecomment-6244924007). Originally posted by [frankea](https://github.com/frankea) on 2026-10-18T02:53:51Z. --- RTX 4090 data point on PPSA01317, the title this PR lists under Unblocks. Short version: with the PR, the `blending into an 11_11_10 float color target is unsupported` abort is gone on this GPU too, 3 of 3 runs, and the next stop is the dynamic-mip storage image that #7238 covers. On current `main` itself the title no longer reaches that draw: #7323 (merged today) makes its PS VR2 probe succeed, and it aborts 5 s in on `sceHmd2ReprojectionQueryBufferSizeAlign not implemented`, so the A/B below is on the last `main` base that gets to the blend. **Setup.** Gran Turismo 7 PPSA01317 **01.000.001** (base package), Windows 11 (26200), RTX 4090 (NVIDIA 616.92), AMD Ryzen 7 5800X, MinGW-w64 GCC 15.2.0 r7 (UCRT), Release `libs` target only (no tests built). `app.exe` is the relink from `main` 31cbb55d7 (`--windows --registry --module-dir .`); only `libs/` is swapped between runs. Two trees: - **A, the PR on current `main`:** `main` b39d90bf1 + #7137 2aa6bfca6 + #7243 da158d61f (both merge clean, 9936fd9be). #7175 is left out: it still conflicts with `main` (as a cherry-pick only in `docs/dev/debt/libSceAgcDriver.md`). - **B, the PR on the stack that reaches the blend:** `main` e1041f6a5 + #7137 2aa6bfca6 + #7207 ec28b6be8 + #7175 555b7e824 + #5958 87a9b8d28 (my 10/17 set from D4697) + #7243 da158d61f cherry-picked (f76397990; the only conflict is in `tests/Graphics.cpp`, taken from the PR, not compiled here). The same set without #7243 is the control. Both sets carry the `libSceSsl.prx` from #7319 (1f267559e) in place of the stock one, because the title calls `sceSslConnect` right after its save-data mount and the stock export throws there, before any 11_11_10 draw. No controller, no input, nobody at the keyboard; one-shot interactive task per run, 300 s cap, box otherwise idle. **Result on B (the A/B that tests this PR).** Without #7243, 3 of 3 runs abort on `AGC graphics: blending into an 11_11_10 float color target is unsupported` 27 to 45 s after launch (10/17 evening, same `libs` set otherwise). With #7243, 3 of 3 runs get past it: the "Sony Interactive Entertainment presents" splash is drawn, then the black loading screen with the GT spinner in the corner, title-bar counter at 50 to 60 FPS (59.94 FPS, 445 to 500 frames presented by the time of the last capture), save data mounted (`mount3 ... dir=DRFILEIV ... -> 0x809f0008`), three `sceNetResolverStartNtoa -> host DNS lookup failed`, and then, identically every time: ``` [gpu] driver failure: compute shader 0x1258d58300: runtime storage image mip capacity exceeded [videoout] presentation failed: compute shader 0x1258d58300: runtime storage image mip capacity exceeded terminate called after throwing an instance of 'std::runtime_error' what(): compute shader 0x1258d58300: runtime storage image mip capacity exceeded FATAL: abort() (SIGABRT) on thread 20456 ``` That is the `ResourceMaterializer.cpp` reject that #7238 raises the slot count for, and gjonn describes the same boot abort on PPSA01317 there; this PR plus #7238 is the next combination to try here. Nothing else new appears in between: no `partial writes of an 11_11_10 float color target`, no `color export format` refusal, no unsupported primitive, no device loss. | libs | run | shader cache | exit after | stop | |---|---|---|---|---| | B without #7243 (10/17, 3 runs) | 1 / 2 / 3 | warm | 45 s / 27 s / 27 s | `blending into an 11_11_10 float color target is unsupported` | | B with #7243 | 1 | 5 misses | 53 s | `compute shader 0x1258d58300: runtime storage image mip capacity exceeded` | | B with #7243 | 2 | warm | 33 s | same | | B with #7243 | 3 | warm | 32 s | same | | A (`main` b39d90bf1 + #7137 + #7243) | 1 / 2 / 3 | not reached | 8 s / 5 s / 5 s | `sceHmd2ReprojectionQueryBufferSizeAlign not implemented` | **Result on A, for the record.** On current `main` the title dies in its module initialisation, on the main thread, before the first draw: `libSceHmd2.prx+0x1b70` called from `app.exe+0x952eff` under `libSceSysmodule.prx+0x347e`. On the 10/17 bases `sceHmd2Initialize` returned `SCE_HMD2_ERROR_UNSUPPORTED_FEATURE` and the title skipped its VR path; since #7323 `sceHmd2Initialize` and `sceHmd2Open` succeed and the title goes on to query the reprojection buffer sizes, which are still `NotImplemented_nid_no_patch`. That is not this PR's problem, but anyone retesting PPSA01317 on `main` after today will hit it first. I will note it on D4697. <details><summary>stderr of run B-3 (warm, box idle) from the second 10 s summary to the abort, per-shader <code>ShaderRegistry</code> lines removed</summary> ```text [log] 10.3 s: 177 lines (5 stdout, 172 stderr), 25.0 KiB written, 0 repeats coalesced; callers spent 0.31 ms queueing and formatting (0.003% of one thread), logger thread 65.69 ms, queue peak 2.4 KiB [SAVEDATA:native] mount3 user=268435456 dir=DRFILEIV mode=0x1 blocks=673 -> 0x809f0008 point= status=0 [SAVEDATA:native] getMemory2 user=268435456 slot=0 -> 0x00000000 [shader-disk-cache] (10 s): 111 hits, 0 misses, 0 writes (0.0 MiB), 0 load failures, 0 write failures; resource plans: 108 hits, 0 misses, 0 writes, 0 load failures; 11.8 MiB read in 24.3 ms [SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed [SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed [SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed [gpu] driver failure: compute shader 0x1258d58300: runtime storage image mip capacity exceeded [videoout] presentation failed: compute shader 0x1258d58300: runtime storage image mip capacity exceeded terminate called after throwing an instance of 'std::runtime_error' what(): compute shader 0x1258d58300: runtime storage image mip capacity exceeded FATAL: abort() (SIGABRT) on thread 20456 #0 0x00007fffa1ff2bd8 libc.prx+0x12bd8 #1 0x00007fffa20c5af1 libc.prx+0xe5af1 #2 0x00000000d44ef910 stack return address candidates: [rsp+0x8] 0x00007fffa1ff2df5 libc.prx+0x12df5 [rsp+0x38] 0x00007fffd0d62139 ucrtbase.dll+0xc2139 [rsp+0xb8] 0x00007fffd0d45261 ucrtbase.dll+0xa5261 [rsp+0xe8] 0x00007fffa2044056 libc.prx+0x64056 [rsp+0x120] 0x00007fffd0d13de0 ucrtbase.dll+0x73de0 [rsp+0x138] 0x00007fffa203f0db libc.prx+0x5f0db [rsp+0x168] 0x00007fffa203f100 libc.prx+0x5f100 [rsp+0x198] 0x00007fffa204a039 libc.prx+0x6a039 [rsp+0x1b8] 0x00007fffd0d13de0 ucrtbase.dll+0x73de0 [rsp+0x1c8] 0x00007fffa27de76e libSceVideoOut.prx+0x3e76e [rsp+0x2b0] 0x00007fffa27d0101 libSceVideoOut.prx+0x30101 [rsp+0x538] 0x00007fffa27ae422 libSceVideoOut.prx+0xe422 [rsp+0x588] 0x00007fffa294d4cf libstdc++-6.dll+0x13d4cf [rsp+0x5c8] 0x00007fffb80a9f6a libwinpthread-1.dll+0x9f6a [rsp+0x5d8] 0x00007fffb80a8b31 libwinpthread-1.dll+0x8b31 [rsp+0x618] 0x00007fffd0cccd30 ucrtbase.dll+0x2cd30 [rsp+0x648] 0x00007fffd2b2dda7 KERNEL32.DLL+0x2dda7 [rsp+0x678] 0x00007fffd39bee4c ntdll.dll+0x7ee4c ``` The abort block of run A-3 (`main` b39d90bf1 + #7137 + #7243), for comparison: ```text [libc] unhandled exception 'St13runtime_error' thrown from 00007fff70cce924 terminate called after throwing an instance of 'std::runtime_error' what(): sceHmd2ReprojectionQueryBufferSizeAlign not implemented FATAL: abort() (SIGABRT) on thread 3808 #0 0x00007fff70c11b18 libc.prx+0x11b18 #1 0x00007fff70ce9b31 libc.prx+0xe9b31 #2 0x000000000060f750 stack return address candidates: ... [rsp+0x328] 0x00007fff647a1b70 libSceHmd2.prx+0x1b70 [rsp+0x358] 0x0000000140952eff app.exe+0x952eff [rsp+0x428] 0x000000014094e714 app.exe+0x94e714 [rsp+0x548] 0x0000000140bde714 app.exe+0xbde714 [rsp+0x588] 0x0000000140c54a0f app.exe+0xc54a0f [rsp+0x5b8] 0x0000000140c54b87 app.exe+0xc54b87 [rsp+0x608] 0x0000000140c54623 app.exe+0xc54623 [rsp+0x668] 0x00007fff9840347e libSceSysmodule.prx+0x347e [rsp+0x6b8] 0x000000014092b706 app.exe+0x92b706 [rsp+0x6e8] 0x000000014092bf61 app.exe+0x92bf61 ``` </details> AI-assisted: yes (Claude Code)
frankea commented 2026-10-18 22:50:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-18T22:50:52Z.


RTX 4090 data point on PPSA01317 for the blend this PR leaves refused. After today's chain on D4697 (this PR + #7254 / #7256 + #5958 + #6815 + #7550 on main 48d61f53b) the title's next stop is blending into an 11_11_10 float color target is unsupported, and a local print at that Require shows which equation it is, 3 of 3 runs, always the same:

[blend] slot 0 into 11_11_10 float target: CB_BLEND0_CONTROL 0x65040504 CB_COLOR_INFO 0x0004171c agc color src=4 dst=5 op=0 alpha src=4 dst=5 op=0 separateAlpha=1 enable=1; vk color 6/7/0 alpha 6/7/0 writeMask=0xf exportedMask=0xf mapping=0xc6

That is COLOR_SRCBLEND = SRC_ALPHA, COLOR_DESTBLEND = ONE_MINUS_SRC_ALPHA, COLOR_COMB_FCN = ADD, with SEPARATE_ALPHA_BLEND set and the alpha equation identical (SRC_ALPHA, ONE_MINUS_SRC_ALPHA, ADD); in Vulkan terms VK_BLEND_FACTOR_SRC_ALPHA / VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA / VK_BLEND_OP_ADD on both. Full colour write mask, all four components exported, the reversed component mapping 0xc6 this target carries, CB_COLOR_INFO 0x0004171c. A plain source-over alpha blend, so unlike the 0x60010001 replace this PR decodes it needs the destination texel and cannot be turned into a write; the R32_UINT attachment the packed path renders through cannot blend it in fixed function. The two ways I can see are a real VK_FORMAT_B10G11R11_UFLOAT_PACK32 attachment for draws that blend into such a target (the format is blendable on this GPU, but the packing and ROUND_MODE handling that made #7207 choose a uint attachment would have to be re-checked there), or blending in the fragment shader with a destination read; which one fits the driver's design is yours to call, this is only the measurement.

Setup. Gran Turismo 7 PPSA01317 01.000.001 (base package), Windows 11 (26200), RTX 4090 (NVIDIA 616.92), AMD Ryzen 7 5800X, MinGW-w64 GCC 15.2.0 r7 (UCRT), Release libs target only. app.exe is the relink from main 31cbb55d7 (--windows --registry --module-dir .); only libs/ is swapped. Tree: main 48d61f53b (2026-10-18) + #7256 (with #7254) + #7243 da158d61f + #5958 + #6815 d513fb987 + #7550 de6d94daf (the fieldCount<ImageResource>() assertion set to 40, since #5958 and #7550 each add a field), plus four local environment-gated lines, none of which changes a result: the print above, placed right before the Require(!state.blendEnable, ...) in DecodeState (State.cpp, after this PR's replace-blend fold), a bypass that makes sceHmd2Initialize answer 0x81110016 again (current main aborts 5 to 12 s in on sceHmd2ReprojectionQueryBufferSizeAlign not implemented, the #7323 regression), a print of sceSslConnect's return, and a display-buffer print that was off here. No controller, no input, one-shot interactive task per run, 420 s cap, box otherwise idle.

Runs. The print fires once per run, immediately before the refusal, and no other blend into a packed target is reported before it (the 0x60010001 replace this PR folds does not reach the print, since the fold clears blendEnable first).

run shader cache / pipeline journal exit after blend at the refusal stop
1 warm / 757 pipelines 52 s CB_BLEND0_CONTROL 0x65040504 (SRC_ALPHA, ONE_MINUS_SRC_ALPHA, ADD, colour and alpha) blending into an 11_11_10 float color target is unsupported
2 warm / 757 49 s same same
3 warm / 757 49 s same same

Screen: the "Sony Interactive Entertainment presents" splash, then a black window, title-bar counter about 1,325 frames and 12 FPS at the abort. Nothing gets further; the equation above is the only thing between this tree and whatever comes next on this box.

One note on timing, since it affects anyone measuring this title: the same tree took 188 s and more than 300 s to reach this draw in earlier runs today. That was host pipeline compilation, not the title: the pipeline-journal the runtime loads at start grew from 0 to 321, 519, 673 and 757 pipelines over those runs, and once it held 757 the draw is reached in about 50 s every time. During the long runs the process used close to three cores with no socket activity.

stderr of run 3 (warm, box idle) from the save-data mount to the abort, the per-shader ShaderRegistry lines, the sceKernelOpen misses and the cache and texture bookkeeping removed, the [shadow] lines collapsed, the [log] lines shortened
[SAVEDATA:native] mount3 user=268435456 dir=DRFILEIV mode=0x1 blocks=673 -> 0x809f0008 point= status=0
[SAVEDATA:native] getMemory2 user=268435456 slot=0 -> 0x00000000
[ssl] sceSslConnect(3) -> 0x8095f013
[ssl] sceSslConnect(3) -> 0x8095f013
[ssl] sceSslConnect(3) -> 0x8095f013
[ssl] sceSslConnect(3) -> 0x8095f00c
[ssl] sceSslConnect(6) -> 0x8095f013
[ssl] sceSslConnect(7) -> 0x8095f013
[ssl] sceSslConnect(7) -> 0x8095f013
[ssl] sceSslConnect(6) -> 0x8095f013
[ssl] sceSslConnect(7) -> 0x8095f013
[ssl] sceSslConnect(6) -> 0x8095f013
[ssl] sceSslConnect(7) -> 0x8095f00c
[ssl] sceSslConnect(6) -> 0x8095f00c
[ssl] sceSslConnect(10) -> 0x8095f013
[ssl] sceSslConnect(11) -> 0x8095f013
[ssl] sceSslConnect(10) -> 0x8095f013
[ssl] sceSslConnect(10) -> 0x8095f013
[ssl] sceSslConnect(11) -> 0x8095f013
[ssl] sceSslConnect(11) -> 0x8095f013
[ssl] sceSslConnect(10) -> 0x8095f00c
[ssl] sceSslConnect(11) -> 0x8095f00c
[ssl] sceSslConnect(14) -> 0x8095f013
[ssl] sceSslConnect(14) -> 0x8095f013
[ssl] sceSslConnect(14) -> 0x8095f00c
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[ssl] sceSslConnect(17) -> 0x8095f013
[ssl] sceSslConnect(17) -> 0x8095f013
[ssl] sceSslConnect(17) -> 0x8095f00c
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[gpu] texture 0x123fe90000 (format 22) has mixed DCC keys at 0x1240610000; its texels are read as stored
[gpu] texture 0x1210c10000 (format 22) has mixed DCC keys at 0x1213460000; its texels are read as stored
[... [shadow] seed lines ...]
[log] 10.0 s: 889 lines (497 stdout, 392 stderr) ...
[... [shadow] seed lines ...]
[gpu] texture 0x1238d00000 (format 22) has mixed DCC keys at 0x1238da0000; its texels are read as stored
[... [shadow] seed lines ...]
[log] 10.3 s: 5833 lines (5833 stdout, 0 stderr) ...
[... [shadow] seed lines ...]
[gpu] texture 0x123f6b0000 (format 22) has mixed DCC keys at 0x123f770000; its texels are read as stored
[... [shadow] seed lines ...]
[gpu] texture 0x123f710000 (format 22) has mixed DCC keys at 0x123f7d0000; its texels are read as stored
[blend] slot 0 into 11_11_10 float target: CB_BLEND0_CONTROL 0x65040504 CB_COLOR_INFO 0x0004171c agc color src=4 dst=5 op=0 alpha src=4 dst=5 op=0 separateAlpha=1 enable=1; vk color 6/7/0 alpha 6/7/0 writeMask=0xf exportedMask=0xf mapping=0xc6
[gpu] driver failure: AGC graphics: blending into an 11_11_10 float color target is unsupported
[videoout] presentation failed: AGC graphics: blending into an 11_11_10 float color target is unsupported
terminate called after throwing an instance of 'std::runtime_error'
  what():  AGC graphics: blending into an 11_11_10 float color target is unsupported
FATAL: abort() (SIGABRT) on thread 8340

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256155054 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7243#issuecomment-6256155054). Originally posted by [frankea](https://github.com/frankea) on 2026-10-18T22:50:52Z. --- RTX 4090 data point on PPSA01317 for the blend this PR leaves refused. After today's chain on D4697 (this PR + #7254 / #7256 + #5958 + #6815 + #7550 on `main` 48d61f53b) the title's next stop is `blending into an 11_11_10 float color target is unsupported`, and a local print at that `Require` shows which equation it is, 3 of 3 runs, always the same: ``` [blend] slot 0 into 11_11_10 float target: CB_BLEND0_CONTROL 0x65040504 CB_COLOR_INFO 0x0004171c agc color src=4 dst=5 op=0 alpha src=4 dst=5 op=0 separateAlpha=1 enable=1; vk color 6/7/0 alpha 6/7/0 writeMask=0xf exportedMask=0xf mapping=0xc6 ``` That is `COLOR_SRCBLEND = SRC_ALPHA`, `COLOR_DESTBLEND = ONE_MINUS_SRC_ALPHA`, `COLOR_COMB_FCN = ADD`, with `SEPARATE_ALPHA_BLEND` set and the alpha equation identical (`SRC_ALPHA`, `ONE_MINUS_SRC_ALPHA`, `ADD`); in Vulkan terms `VK_BLEND_FACTOR_SRC_ALPHA` / `VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA` / `VK_BLEND_OP_ADD` on both. Full colour write mask, all four components exported, the reversed component mapping `0xc6` this target carries, `CB_COLOR_INFO 0x0004171c`. A plain source-over alpha blend, so unlike the `0x60010001` replace this PR decodes it needs the destination texel and cannot be turned into a write; the `R32_UINT` attachment the packed path renders through cannot blend it in fixed function. The two ways I can see are a real `VK_FORMAT_B10G11R11_UFLOAT_PACK32` attachment for draws that blend into such a target (the format is blendable on this GPU, but the packing and `ROUND_MODE` handling that made #7207 choose a uint attachment would have to be re-checked there), or blending in the fragment shader with a destination read; which one fits the driver's design is yours to call, this is only the measurement. **Setup.** Gran Turismo 7 PPSA01317 **01.000.001** (base package), Windows 11 (26200), RTX 4090 (NVIDIA 616.92), AMD Ryzen 7 5800X, MinGW-w64 GCC 15.2.0 r7 (UCRT), Release `libs` target only. `app.exe` is the relink from `main` 31cbb55d7 (`--windows --registry --module-dir .`); only `libs/` is swapped. Tree: `main` 48d61f53b (2026-10-18) + #7256 (with #7254) + #7243 da158d61f + #5958 + #6815 d513fb987 + #7550 de6d94daf (the `fieldCount<ImageResource>()` assertion set to 40, since #5958 and #7550 each add a field), plus four local environment-gated lines, none of which changes a result: the print above, placed right before the `Require(!state.blendEnable, ...)` in `DecodeState` (`State.cpp`, after this PR's replace-blend fold), a bypass that makes `sceHmd2Initialize` answer `0x81110016` again (current `main` aborts 5 to 12 s in on `sceHmd2ReprojectionQueryBufferSizeAlign not implemented`, the #7323 regression), a print of `sceSslConnect`'s return, and a display-buffer print that was off here. No controller, no input, one-shot interactive task per run, 420 s cap, box otherwise idle. **Runs.** The print fires once per run, immediately before the refusal, and no other blend into a packed target is reported before it (the `0x60010001` replace this PR folds does not reach the print, since the fold clears `blendEnable` first). | run | shader cache / pipeline journal | exit after | blend at the refusal | stop | |---|---|---|---|---| | 1 | warm / 757 pipelines | 52 s | `CB_BLEND0_CONTROL 0x65040504` (SRC_ALPHA, ONE_MINUS_SRC_ALPHA, ADD, colour and alpha) | `blending into an 11_11_10 float color target is unsupported` | | 2 | warm / 757 | 49 s | same | same | | 3 | warm / 757 | 49 s | same | same | Screen: the "Sony Interactive Entertainment presents" splash, then a black window, title-bar counter about 1,325 frames and 12 FPS at the abort. Nothing gets further; the equation above is the only thing between this tree and whatever comes next on this box. One note on timing, since it affects anyone measuring this title: the same tree took 188 s and more than 300 s to reach this draw in earlier runs today. That was host pipeline compilation, not the title: the `pipeline-journal` the runtime loads at start grew from 0 to 321, 519, 673 and 757 pipelines over those runs, and once it held 757 the draw is reached in about 50 s every time. During the long runs the process used close to three cores with no socket activity. <details><summary>stderr of run 3 (warm, box idle) from the save-data mount to the abort, the per-shader <code>ShaderRegistry</code> lines, the <code>sceKernelOpen</code> misses and the cache and texture bookkeeping removed, the <code>[shadow]</code> lines collapsed, the <code>[log]</code> lines shortened</summary> ```text [SAVEDATA:native] mount3 user=268435456 dir=DRFILEIV mode=0x1 blocks=673 -> 0x809f0008 point= status=0 [SAVEDATA:native] getMemory2 user=268435456 slot=0 -> 0x00000000 [ssl] sceSslConnect(3) -> 0x8095f013 [ssl] sceSslConnect(3) -> 0x8095f013 [ssl] sceSslConnect(3) -> 0x8095f013 [ssl] sceSslConnect(3) -> 0x8095f00c [ssl] sceSslConnect(6) -> 0x8095f013 [ssl] sceSslConnect(7) -> 0x8095f013 [ssl] sceSslConnect(7) -> 0x8095f013 [ssl] sceSslConnect(6) -> 0x8095f013 [ssl] sceSslConnect(7) -> 0x8095f013 [ssl] sceSslConnect(6) -> 0x8095f013 [ssl] sceSslConnect(7) -> 0x8095f00c [ssl] sceSslConnect(6) -> 0x8095f00c [ssl] sceSslConnect(10) -> 0x8095f013 [ssl] sceSslConnect(11) -> 0x8095f013 [ssl] sceSslConnect(10) -> 0x8095f013 [ssl] sceSslConnect(10) -> 0x8095f013 [ssl] sceSslConnect(11) -> 0x8095f013 [ssl] sceSslConnect(11) -> 0x8095f013 [ssl] sceSslConnect(10) -> 0x8095f00c [ssl] sceSslConnect(11) -> 0x8095f00c [ssl] sceSslConnect(14) -> 0x8095f013 [ssl] sceSslConnect(14) -> 0x8095f013 [ssl] sceSslConnect(14) -> 0x8095f00c [SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed [ssl] sceSslConnect(17) -> 0x8095f013 [ssl] sceSslConnect(17) -> 0x8095f013 [ssl] sceSslConnect(17) -> 0x8095f00c [SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed [SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed [gpu] texture 0x123fe90000 (format 22) has mixed DCC keys at 0x1240610000; its texels are read as stored [gpu] texture 0x1210c10000 (format 22) has mixed DCC keys at 0x1213460000; its texels are read as stored [... [shadow] seed lines ...] [log] 10.0 s: 889 lines (497 stdout, 392 stderr) ... [... [shadow] seed lines ...] [gpu] texture 0x1238d00000 (format 22) has mixed DCC keys at 0x1238da0000; its texels are read as stored [... [shadow] seed lines ...] [log] 10.3 s: 5833 lines (5833 stdout, 0 stderr) ... [... [shadow] seed lines ...] [gpu] texture 0x123f6b0000 (format 22) has mixed DCC keys at 0x123f770000; its texels are read as stored [... [shadow] seed lines ...] [gpu] texture 0x123f710000 (format 22) has mixed DCC keys at 0x123f7d0000; its texels are read as stored [blend] slot 0 into 11_11_10 float target: CB_BLEND0_CONTROL 0x65040504 CB_COLOR_INFO 0x0004171c agc color src=4 dst=5 op=0 alpha src=4 dst=5 op=0 separateAlpha=1 enable=1; vk color 6/7/0 alpha 6/7/0 writeMask=0xf exportedMask=0xf mapping=0xc6 [gpu] driver failure: AGC graphics: blending into an 11_11_10 float color target is unsupported [videoout] presentation failed: AGC graphics: blending into an 11_11_10 float color target is unsupported terminate called after throwing an instance of 'std::runtime_error' what(): AGC graphics: blending into an 11_11_10 float color target is unsupported FATAL: abort() (SIGABRT) on thread 8340 ``` </details> AI-assisted: yes (Claude Code)
janzezno commented 2026-10-20 21:25:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by janzezno on 2026-10-20T21:25:11Z.


Linux run on AMD; the Tested section covers Windows only.

Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release, BUILD_TESTING=ON.
main ca74ef217; PR head da158d61f applied on top.

  • ctest --test-dir build -R '^agc_driver_graphics$' --repeat until-fail:3: 1 of 1 pass, 3 repeats, as on main. These tests do not open a Vulkan device.
  • Full suite, ctest -j12: no new failures. The three that fail also fail on main on this machine: agc_driver_guest_memory_lifetime (#7849), agc_driver_image_array_window_past_layer_limit (#8361) and agc_driver_tessellation (Mesa, #5444).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6301819694 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7243#issuecomment-6301819694). Originally posted by [janzezno](https://github.com/janzezno) on 2026-10-20T21:25:11Z. --- Linux run on AMD; the Tested section covers Windows only. Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release, `BUILD_TESTING=ON`. `main` `ca74ef217`; PR head `da158d61f` applied on top. - `ctest --test-dir build -R '^agc_driver_graphics$' --repeat until-fail:3`: 1 of 1 pass, 3 repeats, as on `main`. These tests do not open a Vulkan device. - Full suite, `ctest -j12`: no new failures. The three that fail also fail on `main` on this machine: `agc_driver_guest_memory_lifetime` (#7849), `agc_driver_image_array_window_past_layer_limit` (#8361) and `agc_driver_tessellation` (Mesa, #5444).
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!7243
No description provided.