fix(shader): drop vector stores through TYPE 2/3 and FORMAT 0 buffer V#s as measured #10831
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10831"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by cgrd on 2026-10-25T03:24:01Z.
What
A buffer V# with TYPE (word 3 bits 30-31) not 0 throws
buffer descriptor uses an unsupported typefor any access. Puyo Puyo Tetris 2's fill kernel stores through an image T# left in its buffer slot (02100b00 c3c00000 010dc1df 91b00fac, TYPE 2, FORMAT 0), so it stops right after the window opens (#3709).Measured on a PS5 (CFI-1115B, fw 12.20) with a native test app, one TYPE 0 control per launch:
buffer_store_dwordandbuffer_store_format_xwrite nothing and don't fault, also with that exact V# and its unmapped base.Now a buffer a PS5 shader only stores to through TYPE 2/3, and vector accesses through TYPE 0 FORMAT 0, bind as a null V#. TYPE 1, TYPE 2/3 loads and atomics,
tbuffer_*, scalar loads, FORMAT above 77, GCN shaders and run-time-loaded V#s still throw (debt entry inshader.md). For #6412/#7689: those loads don't fault on the console.Tested
Linux, RX 9070 XT.
main52a8bed576vs this PR 052f7aa4cb.The existing 4 tests pass on
mainand here, with the layer loaded in both (7 insertions each) and 0 VUIDs. The newDisabledDescriptorscase passes here and fails onmainwithbuffer specialization has an unsupported format.Puyo Puyo Tetris 2 (PPSA01937):
mainstops at the V# above; this PR gets past it tosceRemoteplayInitialize: invalid argument(null heap, separate PR). With that fix too it boots, reaches the title at 10 s and plays a Solo Versus match at 59.9 FPS.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)sceRemoteplayInitializenull heap fix)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T03:36:38Z.
Review: CHANGES_REQUESTED
I rechecked this exact head and compared the patch with the earlier PR #10827. The diffs are byte-for-byte identical, so the outstanding scope concern from the earlier review still applies here.
The PS5 evidence covers
buffer_store_dwordandbuffer_store_format_x. IndisabledBufferDescriptor(), every TYPE 2/3 descriptor up through FORMAT32_32_32_32Float can be disabled when!buffer.read;disabledBufferAccesses()excludes typed, scalar, atomic, image-alias and runtime-loaded descriptor accesses, but does not constrain vector store width or component count. Thus unmeasured multi-dword vector stores are also nulled, while the debt entry explicitly says those are assumed rather than measured.Please either restrict the change to the exact measured instruction/format forms and leave the other vector stores throwing, or add console measurements plus regression cases for the wider forms. The reported focused GPU test does not cover those unmeasured widths. This request is about the behavior scope; the policy checks pass, while the current head has no hosted product build/test run.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T04:27:44Z.
Review: CHANGES_REQUESTED
Reviewed exact head 951e9328671b7d21e04114c16baf966876375ce4. The complete patch is byte-for-byte identical to the patch in your closed PR #10827, so this currently republishes the same work as a second PR. Please reopen/update #10827 or explain the distinct reason for replacing it, rather than leaving duplicate PRs in the queue. The earlier scope concern also remains: disabledBufferAccesses does not limit TYPE 2/3 vector stores to the measured one-dword buffer_store_dword and buffer_store_format_x forms. It nulls any non-typed, non-scalar, non-atomic vector-write descriptor up through FORMAT32_32_32_32Float; the debt entry explicitly says multi-dword behavior is assumed. Please constrain the behavior to measured store forms or add PS5 evidence and regression cases for the broader formats and widths. Diff-check and conventions pass; hosted conventions and labels pass. The reported Linux/Vulkan and title checks are author-reported; this runner has no GPU-backed test binary/device available, so I could not rerun them locally.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T04:59:15Z.
Review: CHANGES_REQUESTED
Requesting the same behavior-scope correction on the current open PR; its tree has not changed from the previous reviewed implementation.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-26T22:42:05Z.
Review: CHANGES_REQUESTED
Thanks for the measurements. Three things to fix:
agc_driver_failed_capture_dumpnow fails on this head.FailedCaptureDump.cpp:91builds its trigger from a TYPE 2 V# (0xa1b00fac) and requires the dispatch to throwunsupported type(line 104); with this change that dispatch no longer throws. It was reproduced by @tablefrogpillow, @wachi35676 and @TechLevelZero on RADV, NVIDIA, AMD on Windows and lavapipe. Move that fixture to a descriptor that still throws (a TYPE 1 V#, e.g.0x61b00fac, was reported to make it pass) in this PR.disabledBufferDescriptor()(ResourceMaterializer.cpp:1498-1503) nulls every TYPE 2/3 vector write up toFormat32_32_32_32Float, but the PS5 measurements cover only one-dwordbuffer_store_dwordandbuffer_store_format_x, and the debt entry says multi-dword stores are assumed. Either restrict to the measured forms (MemoryInfo::dataDwords/componentCount== 1 indisabledBufferAccesses, others keep throwing, with a test that they do) or add measurements for the wider forms.