Repository navigation
Cyberpunk 2077 (PPSA04029): draws refused for PA_CL_CLIP_CNTL CLIP_DISABLE (register 0x204 = 0x00090000) once #6218 accepts the packed storage format #6806
Description
Title: Cyberpunk 2077 (PPSA04029 v02.120.000, EU disc, owned). Converted from the dump's eboot.bin with relinker --registry built from the same tree, no --to-intel. Follows #3308, #4634 and #6119. Opened at harry-z-kang's request in #6119. On bare main the title stops at the storage format of #6119 first, so this stop is reached only with #6218 applied. On main 5d9dcc4 with #6218 alone, the intermittent watchdog of #4634 came first, so the later runs on that tree also carry #6321.
Host: Linux (kernel 7.2.5), GCC 16.2.1, RTX 3090, NVIDIA 610.57.04, selected with ANYPS5_GPU=3090.
Build: Release, -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON (what build.yml's linux job uses). PRs cherry-picked onto main without conflicts, libs rebuilt for every tree, no probes. PR heads: #6218 at 8322164 and 628767b on d92a8da (the runs of #6119's comparison) and at 1057f47 (current, rebased) on 5d9dcc4; #6321 at a52b723; #6572 at 3e28c99.
Launch: APS5_TRACE_DISPATCH_IO=1 APS5_TRACE_SUMMARY_EVERY=30 APS5_TRACE_DRAWS=1 ANYPS5_GPU=3090 timeout 1500 ./app.elf inside gamescope --backend headless -W 2304 -H 1296 -r 60, one launch at a time. Times are seconds from launch: in warm 1 and warm 2 below, launch to exit measured by the wrapper script (no per-line times; warm 1 also ran without the summary and draw switches); in every other run, added to each log line by the wrapper script. A warm run reuses the shader cache of the run before it.
sce_module/: as in #3308.
The stop
With #6218 the title creates its swapchain, dispatches, draws and presents (the counts for d92a8da are in #6119), and then a draw is refused. Log tail on 5d9dcc4 + #6218 + #6321, warm, the four device lines of the last draw, the [dispatch-io] header lines of two host-side shaders (0x5f9d95d06300, 0x5f9d95d04000) and [dispatch-io] body lines left out:
T+282 [draw] target 0x1cb4420000 mask 0xf ok
...
T+282 [dispatch-io] shader 0x1aa4fd6900
T+282 [src/Texture.cpp:750 Texture] Texture address=0x1d19d10000 2560x1440 mips=1 viewed from storage image (vk=37)
T+282 [src/Texture.cpp:1113 StorageTexture] StorageTexture address=0x1d1ca60000 2560x1440 mips=1 mip=0 layers=0 base=0 dim=1 tile=7 format=56 vk=37
T+282 [dispatch-io] shader 0x1aa4f83e00
T+282 [src/Texture.cpp:1113 StorageTexture] StorageTexture address=0x1ce8290000 256x128 mips=9 mip=0 layers=0 base=0 dim=1 tile=2 format=64 vk=103
T+282 [gpu] driver failure: unsupported PA_CL_CLIP_CNTL flags is unsupported (register 0x204 = 0x00090000)
T+282 terminate called after throwing an instance of 'std::runtime_error'
T+282 what(): unsupported PA_CL_CLIP_CNTL flags is unsupported (register 0x204 = 0x00090000)
The d92a8da runs end at the same place: cold 3 and cold 4 after shader 0x1aa4f83e00 and the same 256x128 format-64 storage texture, warm 1 and warm 2 right after shader 0x1aa4fd6900. The title's own exit follows the terminate. Every run:
| tree | run | ends with | at | completed draws |
|---|---|---|---|---|
| d92a8da + #6218 8322164 | warm 1 | refusal | 310 s | not counted |
| d92a8da + #6218 8322164 | warm 2 | refusal | 351 s | 1,449 |
| d92a8da + #6218 8322164 | cold 3 | refusal | 524 s | 1,550 |
| d92a8da + #6218 628767b | cold 4 | refusal | 514 s | 1,497 |
| 5d9dcc4 + #6218 | warm | !!! EngineWatchdog timeout! (#4634) |
456 s | 1,661 |
| 5d9dcc4 + #6218 + #6321 | warm | refusal | 282 s | 585 |
The 5d9dcc4 + #6218 + #6321 run logs [gpu] driver failure: before the terminate, warm 2, cold 3 and cold 4 log [videoout] presentation failed: with the same text instead, and warm 1 logs both.
Where it comes from
Line numbers are on main 5d9dcc4; on main 82ddae7 today the same code is at State.cpp:160, :1060 and :1689, PacketExecution.cpp:363 and Lifecycle.cpp:39, with ClipControlMask unchanged. ClipControlMask (State.cpp:160) accepts bits 19, 24, 26 and 27 of PA_CL_CLIP_CNTL; DecodeState checks it with zero (:1057) and the draw precheck DrawRejection with nonzero (:1685). Packets/PacketExecution.cpp:361 throws the precheck's reason as a runtime_error, which fails the queue worker (Execution/src/Driver/Lifecycle.cpp:37, [gpu] driver failure:) and the presenter (VideoOutDriver.cpp:715, [videoout] presentation failed:), and the presenter terminates. 0x00090000 is bit 19 (DX_CLIP_SPACE_DEF, accepted) and bit 16, CLIP_DISABLE in AMD's gc_10_3_0_sh_mask.h (PA_CL_CLIP_CNTL__CLIP_DISABLE__SHIFT 0x10). #678 (merged 2026-10-05) accepted bit 24 and listed CLIP_DISABLE among the bits it leaves rejected. State.cpp is unchanged in that respect from d92a8da to 5d9dcc4, and neither #6218 nor #6321 touches it. No other issue mentions 0x00090000.
With #6572
#6572 (notaxeltv) adds bit 16 to ClipControlMask and to depthClamp, with DepthClipTests covering 0x00090000 and 0x0c090000 (UFC 5, PPSA03541, sets the latter). coltken95 suggested a title run with it in #6119.
| tree | run | ends with | at | completed draws |
|---|---|---|---|---|
| 5d9dcc4 + #6218 + #6572 | cold | !!! EngineWatchdog timeout! (#4634) |
431 s | 488 |
| 5d9dcc4 + #6218 + #6572 | warm | !!! EngineWatchdog timeout! (#4634) |
488 s | 1,291 |
| 5d9dcc4 + #6218 + #6321 + #6572 | warm | the wrapper's 1500 s limit, no throw | 1,502 s | 33,138 |
| 5d9dcc4 + #6218 + #6321 + #6572 | cold | !!! EngineWatchdog timeout! (#4634), 0 dispatches |
150 s | 0 |
| 5d9dcc4 + #6218 + #6321 + #6572 | warm, cache of the cold run | the wrapper's 1500 s limit, no throw | 1,502 s | 24,917 |
Without #6321 the watchdog came before the refusal's point, so those two runs say nothing about #6572. The cold run with #6321 and #6572 hit the early form of the #4634 watchdog (no dispatch yet, as in the 139 s runs there). Both runs that got past it went to the limit with no 0x204 line. They passed shader 0x1aa4f83e00 (507 and 389 dispatches of it) and the 256x128 format-64 storage texture (twice in each), with 99,763 and 75,178 dispatches and 773 and 536 presents. Presents per summary interval were 194, 78, 8, 12 in the first run and 86, 70, 7, 3 in the second, then 10 to 13 per 30 s to the end (typical frame about 2.4 s and 2.9 s), with frames of 63 and 107 s in the first run and 132 and 121 s in the second. A headless run does not show what was on screen.
Tests on Linux
On 5d9dcc4 + #6218 + #6321 + #6572, RTX 3090: ctest -R 'agc_driver_graphics|packed16|agc_.*(texture|image|storage|unorm|format)|guest_memory' passes 87/87 in 34 s. The set includes agc_driver_graphics (the DepthClipTests #6572 extends), the four packed16 tests (packed16_storage_133/134/136 and packed16_load) and guest_memory, which #6321 extends.
Seen, not stops
In every run on 5d9dcc4 that dispatched (the always-pass line is absent from the 431 s cold run with #6218 + #6572; the cold run that stopped at 150 s has only the first two): 79 s_swappc_b64 deferrals, 4 unsupported registered shader type 8, one [gpu] always-pass depth/stencil state is rendered without a depth target (DB_DEPTH_CONTROL=0x00000062), one [gpu] DCC keys of mipmapped color targets are ignored, 8 storage image ...: guest memory changed while GPU results were pending and 4 memory no longer registered; no not implemented line.
AI-assisted: yes (Claude Code, Claude Fable 5.1 and Claude Opus 5.5), operating under my supervision; I am accountable for this issue and will respond to review.
Activity
plokmklo commentedon Oct 18, 2026
The refusal came from the draw precheck:
ClipControlMaskinGraphics/src/State.cppwhitelisted only bits 19, 24, 26 and 27 ofPA_CL_CLIP_CNTL, and per AMD's GFX10.3 register header (PA_CL_CLIP_CNTL__CLIP_DISABLE__SHIFT 0x10, matching Mesa'sgfx103.json) the missing bit 16 isCLIP_DISABLE, so0x204 = 0x00090000was thrown as "unsupported PA_CL_CLIP_CNTL flags" by bothDecodeStateandDrawRejection.A fix is on
https://github.com/plokmklo/AnyPS5/tree/contrib/6806-pa-cl-clip(commit1ffac0680): the bit releases the console's primitive clipper, and on the open drivers radeonsi sets it only for shaders that produce window-space positions — a state that also switches the viewport transform off, which this driver already rejects atPA_CL_VTE_CNTL(it requires 0x43f) — so every draw this driver accepts carries homogeneous clip-space positions and the bit only releases frustum clipping. Vulkan cannot waive viewport clipping (x/y stay clipped, guard band aside), so the fix draws the bit like it is clear:ClipControlMasknow accepts bit 16, no pipeline state changes, and z continues to follow the existingZCLIP_NEAR/FAR_DISABLEmapping.DepthClipTestsnow decodes0x00090000,0x04090000and0x0c090000, keeps the precheck verdict and decoded state unchanged by the bit, and still refuses every other bit. The residual gap (user clip planes with the bit set, near/far behaviour) is recorded indocs/dev/debt/libSceAgcDriver.md.What still needs validation: a Cyberpunk run past this stop would confirm the register-level reading; note open PR #6572 also touches this register (it maps the bit into
depthClampdifferently), so the two approaches need reconciling before either lands.snoozedDev commentedon Oct 18, 2026
Ran the title with
contrib/6806-pa-cl-clip(1ffac06) and, on the same base, with #6572 (fd301cc).Base:
mainccb0c09 + #6218 (50642a5) + #6321 (a52b723), the report's stack on today'smain(#6218 is unmerged, so baremainstops at #6119's storage format before this point, and on 5d9dcc4 without #6321 the #4634 watchdog came first). Each fix was cherry-picked on top of the base without conflicts,libsrebuilt per tree. Host, build and launch as in the report (RTX 3090, NVIDIA 610.57.04, Release,-DANYPS5_ENABLE_SPIRV_TOOLS=ON,timeout 1500inside headless gamescope, summary and draw tracing on, times are seconds from launch).ClipControlMaskis stillState.cpp:160on ccb0c09, its checksDecodeState:1124andDrawRejection:1797; onmain81cb863 today the same mask, still without bit 16, is at:181and the checks at:1152and:1825. A warm run reuses the shader cache of the run before it.!!! EngineWatchdog timeout!(#4634), before the first dispatchunsupported PA_CL_CLIP_CNTL flags is unsupported (register 0x204 = 0x00090000)With 1ffac06 the refusal is gone: no
0x204line in either log, and both runs went past the point where the base refused (the warm base run ended after the[dispatch-io]header of shader 0x1aa4f83e00 and before the 256x128 format-64 storage texture; with the fix that shader was dispatched 643 (warm) and 454 (cold) times and that texture created twice in each run) and on to the limit with no further throw and no watchdog. Presents per summary interval: warm 259 in the first 84 s after the first present (typical frame 104 ms), then 97 and 8, then 13 to 17 per 30 s (typical frame 1.8 to 2.4 s), with single frames of 54, 81 and 22 s; cold 35, 100, 8, then 12 to 13 per 30 s (typical frame 2.4 to 2.6 s), with frames of 105, 91 and 23 s. Screenshots from the headless gamescope show the title's "This game is a work of fiction" disclaimer at 529 s (warm) and 707 s (cold), and at 1,094 s (warm) a letterboxed cinematic frame with a subtitle line and a "press ○ to continue" prompt.With #6572 on the same base, warm, the run went the same way: no
0x204line, shader 0x1aa4f83e00 dispatched 594 times, the format-64 texture created twice, to the limit with no throw; presents 273, 96, 8, then 14 to 15 per 30 s (typical frame 2.1 to 2.2 s), frames of 54, 70 and 25 s. So the title does not tell the two readings apart: both accept the draw, and they differ only in whether bit 16 also clamps z, which these frames do not resolve. 0x00090000 was the onlyPA_CL_CLIP_CNTLvalue refused on the base, and no value was refused with either fix.Tests on Linux, RTX 3090:
ctest -R 'agc_driver_graphics|packed16|agc_.*(texture|image|storage|unorm|format)|guest_memory'passes 96/96 on base + 1ffac06 (17 s) and 96/96 on base + #6572 (15 s); the set includesagc_driver_graphicswith theDepthClipTestsboth branches extend.Seen, not stops, in the runs that dispatched: 79
s_swappc_b64deferrals, 4unsupported registered shader type 8, onealways-pass depth/stencil state is rendered without a depth target, oneDCC keys of mipmapped color targets are ignored, 8guest memory changed while GPU results were pending, 4memory no longer registered; nonot implementedline.AI-assisted: yes (Claude Code, Claude Fable 5.1 and Claude Opus 5.5), operating under my supervision; I am accountable for this comment and will respond to review.
klosixgaming-arch commentedon Oct 19, 2026
Tested on Windows 11, RTX 5090:
Tested with \CLIP_DISABLE\ (bit 16, \
johandavidcm commentedon Oct 21, 2026
A second title confirms #8046.
Yakuza 0 Director's Cut (PPSA31327, #6722) stopped on the same refusal,
PA_CL_CLIP_CNTL=0x00090000, before its menus. Until now I carried #6572 locally to get past it.On
main80565c5, which has #8046 and not #6572, the title no longer stops there. Seven boots of 100-120 s each ran to the end with no abort. That was on Windows 11 with an RTX 4070 (NVIDIA 617.42).snoozedDev commentedon Oct 22, 2026
With #8046 on
mainthe title passes this stop.Tree:
main0def01b (has #8046, d686bb0: bit 16 inClipControlMask,State.cpp:229, checks:1371and:2105; onmain9e568a3 today the mask and the first check are at the same lines and the second check at:2113) + #6218 (4d26b03) + #6321 as the refresh posted on its thread (0e448213e, applied withgit am, no conflicts). #6218 is still unmerged, so baremainstops at #6119's storage format before this point (Texture.cpp:1253on 0def01b); #6321 is for the #4634 watchdog. Control: the same tree with #8046's one mask line reverted (bit 16 out ofClipControlMask),libsrebuilt. Host, build and launch as in the report (RTX 3090, NVIDIA 610.57.04, GCC 16.2.1, Release,-DANYPS5_ENABLE_SPIRV_TOOLS=ON,timeout 1500inside headless gamescope, summary and draw tracing on, times are seconds from launch). The warm run reuses the cold run's shader cache; the control reuses the warm run's.main+ #6218 + #6321main+ #6218 + #6321unsupported PA_CL_CLIP_CNTL flags is unsupported (register 0x204 = 0x00090000)No
0x204line in either tree run, and no watchdog; both went far past the control's refusal point (14,914 dispatches and 562 presents at 204 s, against the totals in the table). Presents per summary interval, cold: first present at 123 s, 68 and 168 in the first two intervals (128 s and 130 s, typical frame 54 and 129 ms), one interval of 8, then 62 to 74 per 30 s (typical frame 404 to 422 ms,Driver.Packet.memory_waitthe largest leaf phase) and one of 65 (typical frame 196 ms), and from about 876 s, 1,685 and then 1,788 to 1,799 per 30 s (typical frame 16.7 ms) to the limit; single frames of 120, 106 and 27 s. Warm: first present at 19 s, 522 in the first 30 s (typical frame 55 ms), then 23, 192 and 8 (62 s, 107 s and 31 s intervals), then 58 to 73 per 30 s (typical frame 413 to 431 ms), and from about 672 s, 800 and then 952 to 1,799 per 30 s (typical frame 16.7 ms, one interval at 32 ms; six intervals at 952 to 1,725, the rest 1,793 to 1,799) to the limit; single frames of 61, 81 and 22 s. Screenshots from the headless gamescope (warm run) show the CD PROJEKT RED logo at 72 s, a letterboxed intro cinematic frame with a subtitle line and a "press ○ to continue" prompt at 605 s, and the title screen with its "press ✕ to continue" prompt at 1,153 s. The title waits for input there; the run gives none, so no further stop was reached within the limit.Tests on Linux, RTX 3090:
ctest -R 'agc_driver_graphics|packed16|agc_.*(texture|image|storage|unorm|format)|guest_memory'passes 123/123 on the tree (55 s).Seen, not stops, in all three runs: 79
s_swappc_b64deferrals, 4unsupported registered shader type 8, onealways-pass depth/stencil state is rendered without a depth target, oneDCC keys of mipmapped color targets are ignored, 8guest memory changed while GPU results were pending, 4memory no longer registered; nonot implementedline.From this title's side #8046 resolves the stop reported here. On this host
main+ #6218 + #6321 runs the title to its title screen; baremainstill stops at #6119 until #6218 lands.AI-assisted: yes (Claude Code, Claude Fable 5.1 and Claude Opus 5.5), operating under my supervision; I am accountable for this comment and will respond to review.