fix(shader): poison unsupported biased volume table entries #6881
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6881"
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 Scramblrrrr on 2026-10-16T15:48:50Z.
What
007 First Light (PPSA11386) stops during boot with
2D biased sampling of a volume requires one slice and mip level zero onlywhen a runtime image table contains an unsupported volume descriptor.TryRuntimeImageModethrows while resolving that record, so even a record the shader never selects aborts the whole materialization.Return the existing Dimension rejection instead.
ResolveImageTablesemits the normal poison record and retains its access-time fault.RuntimeImageModestill throws for direct use. No new volume mode is enabled; the one-slice/mip-zero restriction and error text remain.The synthetic table places a valid 2D texture beside each unsupported volume case: extra slice, nonzero base mip, last mip and max mip. It checks the valid binding survives, bad records retain their Dimension reason and descriptor, and fault metadata is retained. Supported direct one-slice access passes; unsupported direct uses still throw. No title data is in the fixture.
Tested
Windows 11 Pro, GCC 15.2, Release, SPIRV-Tools OFF; NVIDIA RTX 5070 Ti, driver 617.42.
107482caed, maine5c2b3c325plus only this fix/test: affected target rebuilt,agc_shader_memorypasses (0.39 s; CTest total 0.93 s). Main's newly added dynamic-storage mip-chain test is retained alongside this test. Conventions/diff checks pass. No new production change in the rebase.aa4018fdf, main452494439: 10/10 selected CPU/Vulkan checks pass (7.00 s); replace only the production line with main while keeping the final fixture, andagc_shader_memoryfails with the exact volume exception. Restore/rebuild: 10/10 pass (6.64 s), no skips. Tests: shader memory, SPIR-V module, graphics, shared/write tracking, position invariance, constant phi, cube clamp, plane bias on a single-level volume, image table. New poison metadata assertions are CPU tests; existing image tests execute Vulkan.00abe7efastops before a visible frame with the exception after at least 1758 cache writes. Same integration plus this fix atfb925cae4passes the stop and submits frames, then spends minutes compiling NVIDIA pipelines; owned stop at black startup frame 352. No selected-poison fault observed. Later combined stacks render the offline menu; no isolated FPS benefit is attributed to this fix.Not covered: GPU execution selecting the new poisoned volume record, a full suite at the current head, or unmodified-title gameplay from this fix alone. Raw title code, assets, descriptors, requests and logs remain local.
Merge order with #6454: standalone test uses main's snapshot layout. If #6454 lands first, the two-line shared-column adaptation from
913b93635is required. It is included and tested in our separate integration; EagleBearerYS has the corresponding merge ready on #6454. No dependency for this standalone fix/test. Coordination: 007 tracking discussion.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 (none added).mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T16:11:55Z.
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.
core/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppImported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-16T17:00:48Z.
Review: COMMENTED
Linux run, which the PR doesn't cover yet: NVIDIA and lavapipe. Head
aa4018fdf, merged ontomain143f13055.Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, SPIRV-Tools off. RTX 3070, NVIDIA 595.99.02 (Vulkan 1.4.329), and lavapipe, Mesa 26.0.3 (LLVM 21.1.8, Vulkan 1.4.335). All runs through ctest.
ShaderMemory.cppchange applied on its own overmainfailsagc_shader_memorywith2D biased sampling of a volume requires one slice and mip level zero only. With the fix, the ten tests from the description pass 14/14 (the regex also picks up theagc_driver_image_table*variants andagc_shared_write_partial_collect), three runs, on the 3070.^agc|shader|recompiler(display/flip/lds_atomics64excluded,-j1): 614/615. The one failure isagc_driver_store_over_untracked. It fails 10/10 on plainmain143f13055here too, so it is not from this PR.agc_driver_image_plane_bias_on_single_level_volumeandagc_driver_image_table*among them: 80/80, same asmain. The per-wave key cases of the image-table tests skip themselves there (subgroup 8 doesn't hold one wave32).Not run: a GPU execution that selects the poisoned volume record (the new checks are CPU-side), and no title. No AMD/Intel.
GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3), Ubuntu 26.04
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-16T19:48:08Z.
@Scramblrrrr Linux title run, the cross-test from #5714. Title: 007 First Light (PPSA11386 v01.018.000). Setup: Linux 7.2.10, RTX 3080 10 GB, NVIDIA 615.78.08, GCC 16.2.1, Release, bubblewrap sandbox. Stack:
main4186f06a9plus open PRs (#5987, #6553, #6465 and #6868 among them), unpublished local fixes the title needs, local logging and scripted input, and the title's two feedback-wait limits widened in its executable as described in #6172 (local only). For this run I reverted our local workaround for this throw (described in #5714) and cherry-picked this headaa4018fdfinstead; it applied cleanly. Switches:APS5_HOST_IMPORT_MIB=12288,APS5_RESOURCE_CACHE_ENTRIES=64,APS5_NO_DRAW_SRT_ENTRIES=1,APS5_PROFILE_DRAW=1, a guest fault dump.2D biased sampling of a volume requires one slice and mip level zero only. With this change the title passes that point, loads its save into gameplay and runs to present 1534, where the 2,700 s budget ended. The run did not stop on an error: no guest fault and nowhat()in the log.deferred write-back failed: image table … unsupported operationsites appear, with identical counts up to present 1000. Four of the five no longer appeared in an earlier run of ours on a stack with an older revision of #6402 (stores through image tables). They are not from this change.dimension.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T00:41:51Z.
The red/green from @jotitadev (the
ShaderMemory.cppchange alone failsagc_shader_memorywith the volume throw; with the fix the ten tests pass 14/14 on the RTX 3070, and 80/80 on lavapipe) and @SleglJan's 007 run (past the throw, into gameplay to present 1534, no guest fault) cover this as asked. Not run yet: a GPU execution that selects the poisoned volume record, and the 007 run is on a stack of several PRs.Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-17T07:34:56Z.
Heads-up for merge order: this head (
aa4018fdf) and #6454's head (1752c4a89) merge without a git conflict, also onto currentmain17cfb1f4c. ButverifyVolumeBiasTableRejectioninShaderMemory.cppdoesn't compile against #6454's snapshot layout, which moveswordsinto each column and makescodesaSharedValues. A GCC build of both onmainbc3c0fc13with #5799, #6317 and #6332 fails with:column.codes = {0u, 1u};:no match for 'operator=' (operand types are 'ShaderRecompiler::SharedValues<unsigned int>' and '<brace-enclosed initializer list>')snapshot.tables.words = {plane, invalid};:'struct ShaderRecompiler::ImageTableSnapshot' has no member named 'words'Your integration branch already has the adaptation (913b93635, "test(shader): adapt volume rejection fixture to shared columns"), but neither PR carries it yet, so whichever lands second needs it. cc @EagleBearerYS
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-17T08:35:35Z.
Thanks @SleglJan, confirmed: with both on
main,ShaderMemory.cppstops at those two lines on Linux and Windows (run). Whichever lands second takes the adaptation:maincarries the same two lines as @Scramblrrrr's 913b93635, inside the merge so it builds. I have that merge ready: with it, the^agctests pass on Linux (646 of 646), and on Windows apart from the two replay tools that exit 0xc0000139 on that runner for other branches too (run).Imported from boykopovar/AnyPS5. Originally posted by keravyn-ops on 2026-10-17T09:21:38Z.
AMD / Windows run of this PR at
aa4018fdf: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release.agc_shader_memory: pass (0.45 s)AI-assisted: yes (runs made on the device above).
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-18T08:15:16Z.
Thanks @SleglJan, @jotitadev, @keravyn-ops and @EagleBearerYS for the cross-tests and merge-order checks. I resumed today and have resolved the new main conflict in the standalone PR branch: main's dynamic-storage mip-chain test and this volume-rejection test are both retained, with no change to the production fix. The main-only update is local at
fd0d1f172, not pushed yet; I am rebuilding before updating this PR.The separate fresh-main007 integration (baseed01d79d3, current #6454a508aa03c) retains the two-line shared-column adaptation from913b93635. Its runtime libraries build, and its native test executables are rebuilding. It does not add those #6454-specific test types to this standalone PR while #6454 is unmerged. No new title result claimed yet. Raw title data remains local. AI-assisted: Codex.
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-18T08:25:09Z.
Rebased onto main
e5c2b3c32at head107482cae, preserving both main's dynamic-storage mip-chain test and this volume test. Clean-main-only agc_shader_memory rebuilt and passes0.39s (CTest total0.93s); conventions pass. Production fix unchanged. Description now includes the independent Linux/AMD results and merge-order adaptation. Our separate current-main007 integration c2d5e46a4 passes44/44selected native controls19.94s and is now cold-booting; no new title result yet. AI-assisted: Codex.