Repository navigation
fix(agc): keep texture images inside their extent's mip chain - #6280
fdfawef324 wants to merge 6 commits into
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
26 November downstream status: #7085 is updated to f20354c93ad3, preserving @fdfawef324's #6280 remains draft/conflicting and the physical-chain prerequisite for Sonic PPSA99902/#4443. #22724 is open/conflicting and remains agreed to go before #7085. Its maintainer rebase request is still for the branch author; this adapted downstream result does not qualify unchanged #6280 or current main. The historical minimal-stack title result keeps its original pins. The new RTX 4080 SAROS report on #7085 needs a retest of this ordinary-clear correction; no local Sonic/SAROS/FPS claim or new shader-memory/cache executable result. AI-assisted: yes (Codex). |
…n their extent allows) at 5fb9380 FormatVersion 44 (main + boykopovar#6280 = 37, ours 43).
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — comments
The inspected mip-chain capping and resinfo paths appear consistent, but this review is incomplete because most changed files were not read.
What I ran
Reviewed prepared diff for head 0e1f2ab53b596a4d33ec8426097bda2c05b82068 and inspected targeted source ranges with repo_read.py. No build or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff inspection | passed | Prepared diff reviewed |
| Build and tests | not run | No commands executed |
| Full changed-file review | not run | Most changed files unread |
Findings
Blocking
None identified in the inspected portions.
Non-blocking
None.
Not verified
This review did not read every changed file, so it cannot support approval. Files read: review/description.md, review/commits.md, review/manifest.json, review/diff.patch, core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp (lines 418–480), and core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp (lines 2070–2115). The changed core/libs/prx/libSceAgcDriver/tests/Graphics.cpp was excluded from the review bundle as too large; its changed line is visible in the diff. Most other changed files listed in the manifest were not read. review/files.json was not available through the reader. Author-reported builds, tests, and device checks were not independently verified.
To get this to a good state
Complete the review of the remaining changed files and run the relevant checks before making a formal approval decision.
|
More data for this from Uncharted: Legacy of Thieves Collection (PPSA05684) on Windows 11, NVIDIA, WinLibs GCC 15.2 UCRT, Release, driver built from
AI-assisted: yes. |
|
Rebased onto current
Results on Windows 11 Pro, i9-14900K, RTX 5080, NVIDIA 621.14, with
Demon's Souls PPSA01341, same
|
|
Uncharted: Legacy of Thieves Collection (PPSA05684) loses the device on NVIDIA with a write just past a packed image block, and the images it creates past their mip chain look like the cause. Windows 11, RTX 4080 (driver 621.01),
I have not run this PR on the title, so this does not show that it removes the loss. AI-assisted: yes. |
|
We hit this PR's conflict with
We did not start on commits 2–6 (the recompiler resinfo side); Once a rebase lands we can run |
|
@akkadbakkad89, our adapted downstream #7085 may help with the rebase: published This qualifies the adapted consumer, not unchanged #6280 or a composition with today's main. #6280 and #22724 remain prerequisites. Your RTX3070 datapoint would be useful once the actual #6280 head is refreshed; its separate physical-chain tests should retain that exact source pin. AI-assisted: yes (Codex). |
|
@fdfawef324 @oneandonlydean @akkadbakkad89 — I completed a history-preserving main merge for this prerequisite: Amoenus/AnyPS5 The port keeps main’s snapshot/residency/firstUploaded, array/1D and centralized copy checks, adds the cap to the newer GCN geometry path, updates the recording allocator mock, and uses current CMake/debt fragments. Unmodified main: 38/38 GPU processes; refresh: 40/40; Graphics host suite passes on both pins. Full native libs/relinker builds pass. RTX 5080 and AMD 1002:13c0, required Vulkan/cache-off/Khronos validation, verified devices/layer, no skips or diagnostics. Exact pins, raw logs, initial mock failure and proposed updated description. We have pull-only access to the source fork. The owner or an authorized upstream maintainer can adopt it: git fetch https://github.com/Amoenus/AnyPS5.git codex/refresh-6280-main-20261126
git switch claude/agc-cap-texture-mip-chain
git merge --ff-only FETCH_HEAD
git push origin HEAD#22724 has a separate tested refresh; whichever integrates second must preserve the logical guest-count boundary in QueryDimensions. This branch contains no #7085 extra backing. No fresh title/console or cache-executable result; the quarantined test executables were not run. The author’s draft/readiness choice remains unchanged. AI-assisted: yes (Codex; original authorship preserved). Additional externally reported coverage: @akkadbakkad89’s RTX 3070 / driver 617.42 result tests exact refresh |
|
RTX 3070 datapoint for the refresh @Amoenus published, promised further up this thread — validating Tested — NVIDIA GeForce RTX 3070, driver 617.42, Windows 11, Release builds of both pins in the same tree. Every GPU execution run with
The regression set was chosen against the change surface: resinfo/lod/past-mip/sparse for the The refresh log shows the new diagnostic working as intended: This complements @Amoenus's RTX 5080 / AMD 1002:13c0 coverage with the Ampere generation; the branch is good to adopt from this machine's perspective. AI-assisted: yes. |
What
A guest texture descriptor can name more mip levels than Vulkan permits for its extent. Cap sampled, storage and expanded-copy images at the physical chain; bound their allocations, views, uploads, blits, barriers, clears and write-back. Extra-level storage views and attachments remain refused; #7085 supplies separate backing in a follow-up.
Demon's Souls PPSA01342 originally lost the device after a 28x1 BC3 array declared ten levels while the extent held five. The private integration fault pointed to the first byte beyond that image. This is historical diagnosis; it is not a fresh title run on the final rebase.
For the decoded views exercised here (
MAX_MIP = LAST_LEVEL),image_get_resinforetains the guest level count and returns 1x1 spatial extents for extra levels within that count. AtLOD >= count, it zeros every extent/layer component and retains the count. The emitter selects a valid physical query LOD before asking Vulkan, including for LOD 31 / UINT_MAX. Single-level descriptors with an unrepresented base refuse texel loads and LOD queries; pure size queries remain valid. Repacked storage-to-sampled copies use the same allocation/view cap.The rebase preserves #6054's uploadImage path and passes physical
geometry.imageLevels/copyLevelsthrough sRGB image creation, blits, views and refresh. It retains main'sConvertedSampleRequiredalongsideViewLevelsPastChain/LevelsPastChain, and keepsconvertedSamplesandlevelUsesin the cache encoder, decoder and nonzero round-trip fixture. Final cache format:41;ImageResourceguard:40.The existing decoder still clamps raw
LAST_LEVELtoMAX_MIPwhenBASE_LEVEL <= MAX_MIP. The reported 28x1 LAST_LEVEL=9 / MAX_MIP=0 count of ten remains a discrepancy; this change does not fix it. A CPU LAST9/MAX6 control pins that unchanged decode. Samples/gathers past the chain still clamp to represented data, with console behavior unverified. There is no local PS5 or 3D/cube resinfo hardware claim.External evidence is attributed, not counted as our own testing:
Tested
Windows Server 2025 (10.0.26100), WinLibs MinGW-w64 GCC 15.2.0, Release. Final publication candidate
0e1f2ab53b596a4d33ec8426097bda2c05b82068on main676d423968a1a8fcc79c6247020ce22090a8e0d4.Seven selected Release/O3 targets complete; the final restored incremental build took 14.06 seconds. Four CPU/mock CTests passed without skips in 14.91 seconds: agc_shader_bindless, agc_shader_memory, agc_shader_disk_cache and agc_driver_graphics. Two precise current-source controls failed at the intended single-unrepresented-base admission and repacked mip-5-of-5 copy assertions. Source was restored, rebuilt and retested. Conventions pass against the pinned base and later main
72a3d9f2a49d; its clean merge was checked separately from this 676-based execution.The recording mock checks ordinary and beyond-chain sampled/upload/storage sRGB expansion and repacked-copy allocation, view and copy bounds. Device query fixtures cover shortened and ordinary five-level views, single-level base 7 / last 7, 2D/2D-array layouts, LOD=count/count+1/31/UINT_MAX, and uniform/mixed lanes. The inherited llvmpipe mixed-LOD exclusion remains; no Mesa-version cutoff is newly claimed.
Current-head device checks passed 5/5 registrations / four executables without skips in 4.35 seconds on the RTX 3060, sequentially in the managed slot. Required cases: image_levels_past_chain, image_sample_lod_clamp, image_srgb_load, image_srgb_sample_copy and forced sRGB-copy. The frozen naturally dirty query control at this same source head exited 1 in 0.90 seconds and reproduced both expected errors (LOD10 width1 instead of0; LOD5 width28 instead of0), with actual RTX/Vulkan initialization. The checker requires both diagnostics; this is an expected regression failure, separate from the five passing production cases. Device skips/exit77 are not passes. The selective control removes only the zero-extent selection, retaining the safe physical query LOD and guest count; count-boundary mismatches must be observed to count it as a meaningful red.
Runtime hashes were verified before and after; ANYPS5_REQUIRE_VULKAN=1 was set. No fresh title, FPS, console-equivalence or playability result is claimed by this update.
Shared-source coordination is pending: #7550 codec order and #7579 eligibility-line order propose this PR first, with both changes retained by the later rebase. Those proposals are not agreements, so the verified update remains a draft. #7085 already declares this PR as a prerequisite; its depth/layer/level argument order must be reconciled by meaning. There is no additional standalone build dependency or combined-runtime claim.
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)Co-Authored-By: Codex noreply@openai.com