Repository navigation
fix(agc): treat type-0 texture descriptors as null - #4779
Conversation
|
Windows test (MinGW GCC 15.2, Release, Windows 10, RTX 4080 SUPER). Built in a batch with five other open GPU PRs cherry-picked onto main
Not tested: no game run; the batch was not rebuilt per PR, so a failure would have needed a bisect (there was none besides the flake). AI-assisted (Claude Code). |
|
Two things before merging:
|
|
Thanks. The title is High on Life (PPSA15388), documented in #4139; its current-main failure is the rejected descriptor/shader-draw path. The gameplay result in that issue used a local experiment that null-bound both the TYPE=0 slot and the separate cube-through-2D case. This PR changes only the TYPE=0 handling, and I do not have an isolated run of this exact PR head that gets the title past the failure. The gfx1036 measurement is not a console measurement, so I will keep that limitation explicit and will not claim this PR alone gets High on Life to gameplay. |
|
A second title with TYPE=0 image descriptors: Demon's Souls (PPSA01341 v1.07), Windows 11, RTX 4070 (driver 596.21), MinGW GCC 15.2 Release.
If it helps, I can open the recompiler half as a follow-up that depends on this PR. AI-assisted: yes |
|
Thanks, this separates the two layers clearly: this PR handles runtime binding, while |
|
I opened the recompiler-side follow-up as PR #5473, depending on this PR. It adds a regression for an image descriptor with TYPE=0 and a nonzero base. The focused Linux test passes with the change and fails on the previous predicate with |
- skip pure PM4 NOP packets in the Metal packet loop (upstream PR boykopovar#5481) - note the dispatch registers after direct and indirect Metal dispatch so COPY_DATA from a shader register works there (upstream PR boykopovar#5477) - NullImageDescriptor delegates to IsNullTextureResource (upstream PR boykopovar#4779) - tests: pm4 compute replay reads the dispatch initiator and group counts back through COPY_DATA; metal utility tests cover a type-0 image descriptor Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj
* perf(agc): fast-skip pure PM4 NOP packets during queue execution (cherry picked from commit 139bf04) Ported from upstream PR boykopovar#5481 * fix(agc): copy a shader, context or user config register to memory with COPY_DATA A dispatch now leaves its initiator and, for DISPATCH_DIRECT, its group counts in the shader registers, where the CP puts them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 5e36c08) Ported from upstream PR boykopovar#5477 * fix(agc): accept reported vertex stage state (cherry picked from commit 632331d) Ported from upstream PR boykopovar#4341 * fix(agc): initialize stencil control and reference masks (cherry picked from commit 85e0d98bba896002539365bb29a7a39a8e43f501) (cherry picked from commit 13dca48) Ported from upstream PR boykopovar#5347 * fix(agc): accept inactive vertex point size on non-point draws (cherry picked from commit d4b59ce) Ported from upstream PR boykopovar#4715 * fix(agc): treat type-0 texture descriptors as null (cherry picked from commit 7e1e1ce) Ported from upstream PR boykopovar#4779 * fix(agc): fall back out-of-range sceAgcInit versions to table 13 Pointer-shaped NID kW3GLb7QfPg calls from public homebrew succeed on console; returning an error left those titles failing init after boykopovar#4835. (cherry picked from commit 939f784) Ported from upstream PR boykopovar#5163 (debt-doc hunk dropped: file absent on main) * fix(agc): clamp sceAgcInit versions above 13 inline (cherry picked from commit 0cc5102) Ported from upstream PR boykopovar#5163 (second commit) * metal: adapt the shared AGC driver slice to the Metal execution loop - skip pure PM4 NOP packets in the Metal packet loop (upstream PR boykopovar#5481) - note the dispatch registers after direct and indirect Metal dispatch so COPY_DATA from a shader register works there (upstream PR boykopovar#5477) - NullImageDescriptor delegates to IsNullTextureResource (upstream PR boykopovar#4779) - tests: pm4 compute replay reads the dispatch initiator and group counts back through COPY_DATA; metal utility tests cover a type-0 image descriptor Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj --------- Co-authored-by: Kikoarl <7354010+Kikoarl@users.noreply.github.com> Co-authored-by: LeandroLP23 <leandroplacidi@gmail.com> Co-authored-by: MarcZX100 <marczxrr@gmail.com> Co-authored-by: MathiasDevelopes <25400788+MathiasDevelopes@users.noreply.github.com> Co-authored-by: lorkydey <57268822+Lorkydey@users.noreply.github.com> Co-authored-by: mazen <mazenshaar@hotmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
7e1e1ce to
58b2245
Compare
|
Checked the shared Added on top, per @oneandonlydean's request: a |
A static, read-only image slot whose T# has TYPE 1 is now bound as a null image, like TYPE 0 since boykopovar#5473 and boykopovar#4779. On gfx1010, image_sample_lz, image_sample_b, image_load and image_get_resinfo through a format-22 TYPE 1 T# return zeros without a fault, and gfx1035 reads it as zeros too. Written, atomic and table slots still throw, and the reserved types 2-7 stay refused. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
What
Treat an AMD texture descriptor with
TYPE=0as a null image, even when its base address is nonzero. This lets guest shaders bind stale S#+V# words in image slots without trying to decode them as a real texture. The scope is the observed TYPE=0 case from issue #4139; this PR does not implement cube T# reads through 2D accesses.The null predicate is shared across image precollection, binding resolution, refresh, revalidation and surface presync so each path classifies the same descriptor consistently. Regression coverage includes zero-base descriptors, TYPE=0 with a nonzero base, and a valid nonzero-base descriptor.
Evidence and limits
The issue reports S#+V# words in image slots in High on Life, including repeated TYPE=0 substitutions. An issue contributor measured TYPE=0 behavior on gfx1036 RDNA2: image sample/load/resinfo returned zero, including the reported nonzero unmapped bases, without a GPU fault. This is gfx1036 evidence; PS5 gfx1013 behavior was not measured.
Tested
agc_driver_graphicspassed (1/1) on currentmainbase584cc4c5716b02210ca031593d1a6b0b4ce049cb.python3 tools/check_conventions.py --base upstream/mainpassed.git diff --check upstream/main...HEADpassed.Checklist
main; no open PR implements TYPE=0 null descriptor handlingNotImplemented_nid_no_patch