Skip to content

feat(agc): storage image access to depth planes through a 2D array view from a later slice - #5779

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
mrfelek:pr/depth-storage-slice-view-v3
Oct 14, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
mrfelek:pr/depth-storage-slice-view-v3

Conversation

@mrfelek

@mrfelek mrfelek commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

What

A storage view of a depth plane that starts above slice 0 (a 2D array T# with BASE_ARRAY above 0) threw storage image access to the depth planes of depth surface ... through a 2D array view of slices N-M is not implemented. #5003 added storage views of depth planes from slice 0 and still refuses these.

LayeredDepthStorage already spans slices 0..last, so the view only needs to know where it starts. The refusal is dropped, the first layer joins the object, and only the slices from the base slice to the last are copied in and out of the depth surfaces. The base slice is part of the cache key, so two views of the same memory from different base slices are separate images, as other views of the same plane already are. The technical-debt entry is updated.

Tests: agc_driver_depth_storage_dispatch now stores through a view from base slice 2 and checks that the other slices stay untouched; agc_driver_depth_storage no longer expects the refusal. Both fail without the change.

Tested

Ubuntu 26.10, GCC 15.3.0, RTX 3080 Ti (NVIDIA 615.71.09), Release, on main c654b19.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA03912 Diablo II: Resurrected (PPSA03912) #5146
  • GPUs tested: NVIDIA GeForce RTX 3080 Ti, driver 615.71.09, Ubuntu 26.10
  • AI-assisted: yes; I reviewed every line and ran the tests

AI-assisted; the runs are from my machine.

…ew from a later slice

A storage view of the depth plane that starts above slice 0 was refused. The
layered storage image already spans slices 0..last, and the view starts at its
base slice, so the refusal is dropped and only the slices from the base slice to
the last are copied in and out. The base slice joins the cache key.

DepthStorageDispatch stores through a view from base slice 2 and checks the
other slices stay untouched; it fails without the change.
@github-actions github-actions Bot added docs agc libSceAgc* labels Oct 14, 2026
@mrfelek

mrfelek commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Check on today's main: Diablo II: Resurrected (PPSA03912, 01.039.000), Linux, RTX 3080 Ti (NVIDIA 615.71.09), main 3e577ed with #1186 (head merged locally; one docs conflict in docs/dev/debt/libSceAgcDriver.md, none in code) and this PR on top. Offline > New Character reaches the Rogue Encampment with the character on screen (second attempt of three; the first two launches did not reach it: the game's known load-time crash on the first, a libSceHttp crash after about 10 minutes in game on the second). The storage image access to depth/stencil surface ... slices=1-1 error from before this PR does not appear.

In game, measured on the third run: 39.1 presents per 10 s (windows 40, 39, 39, 39, 39, 39, 39). The depth tests pass on the combination (9 of 9 depth tests; agc_driver_depth_storage and agc_driver_depth_storage_dispatch fail with this PR's source change reverted).

AI-assisted; the runs are from my machine.

@adriadam10

Copy link
Copy Markdown
Collaborator

Checked on Linux (AMD, RADV): agc_driver_depth_storage, agc_driver_depth_storage_dispatch and agc_driver_depth_storage_reuse pass, and the first two fail with the source change reverted. The firstLayer loop bound and the base slice in the cache key look right; the layer-pitch check still guards the remaining case. Merging once the full Build is green.

@adriadam10
adriadam10 merged commit 28b6f19 into boykopovar:main Oct 14, 2026
9 checks passed
@mrfelek mrfelek mentioned this pull request Oct 14, 2026
9 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants