AGC: native 4-sample D32 depth sampled with HTILE but without ITERATE_256 is refused (Onimusha: Way of the Sword, PPSA27836) #6362

Closed
opened 2026-10-15 13:08:07 +00:00 by simonbronk · 2 comments
simonbronk commented 2026-10-15 13:08:07 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-15T13:08:07Z.


Onimusha: Way of the Sword (PPSA27836) samples a native 4-sample depth target whose HTILE isn't ITERATE_256, and stops on the new game's first scene load. No open PR covers this case. #6300, #6297, #5554 and #5627 all assume ITERATE_256.

AGC graphics: native multisample depth initial import requires pipe-aligned ITERATE_256 HTILE without VRS

I added a local print of the target in prepareDepthSampling (DepthSurface.cpp):

field value
format VK_FORMAT_D32_SFLOAT (126)
samples 4
extent 128x64
HTILE address 0x2000c10000 (non-zero, 256-byte aligned)
iterate256 0
htilePipeAligned 1
htileVrsEncoding 0

So the target passes every other check before this one: format, sample count, Z_X single slice, XOR, base alignment, no stencil. Only ITERATE_256 is off.

Where: after New Game, difficulty and control-style selection, during the first scene load. It happens every run.

Setup: Windows 11, RTX 5070 (NVIDIA 617.42), main 0afa6a607 with #5907, #5776, #5770, #5703, #5841, #5884, #5915 and #5815, plus local sample-count changes.

Host import: this refusal only shows with APS5_NO_HOST_IMPORT=1. With host imports on, the same load ends earlier, at the same point after the save, in VK_ERROR_DEVICE_LOST. NVIDIA device fault reports read invalid at 0x4840000, the same address every run. The last GPU checkpoint is an 8x8 compute program that samples two 2D textures and writes a 16x16x8 3D storage image. I'm still narrowing that one down. It isn't changed by any of these:

  • APS5_NO_PIPELINE_LTO;
  • reverting #6060;
  • #6246;
  • APS5_TEXTURE_CACHE_MIB=6000;
  • APS5_NO_DEFERRED_EVICTION.

How HTILE is laid out without ITERATE_256 isn't settled here, so I haven't guessed an implementation. If someone has the layout, or a hardware measurement of it, I can test a change on this title right away.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5866722602 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6362). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-15T13:08:07Z. --- Onimusha: Way of the Sword (PPSA27836) samples a native 4-sample depth target whose HTILE isn't `ITERATE_256`, and stops on the new game's first scene load. No open PR covers this case. #6300, #6297, #5554 and #5627 all assume `ITERATE_256`. ``` AGC graphics: native multisample depth initial import requires pipe-aligned ITERATE_256 HTILE without VRS ``` I added a local print of the target in `prepareDepthSampling` (`DepthSurface.cpp`): | field | value | |---|---| | format | `VK_FORMAT_D32_SFLOAT` (126) | | samples | 4 | | extent | 128x64 | | HTILE address | `0x2000c10000` (non-zero, 256-byte aligned) | | `iterate256` | 0 | | `htilePipeAligned` | 1 | | `htileVrsEncoding` | 0 | So the target passes every other check before this one: format, sample count, Z_X single slice, XOR, base alignment, no stencil. Only `ITERATE_256` is off. **Where:** after New Game, difficulty and control-style selection, during the first scene load. It happens every run. **Setup:** Windows 11, RTX 5070 (NVIDIA 617.42), `main` 0afa6a607 with #5907, #5776, #5770, #5703, #5841, #5884, #5915 and #5815, plus local sample-count changes. **Host import:** this refusal only shows with `APS5_NO_HOST_IMPORT=1`. With host imports on, the same load ends earlier, at the same point after the save, in `VK_ERROR_DEVICE_LOST`. NVIDIA device fault reports `read invalid at 0x4840000`, the same address every run. The last GPU checkpoint is an 8x8 compute program that samples two 2D textures and writes a 16x16x8 3D storage image. I'm still narrowing that one down. It isn't changed by any of these: - `APS5_NO_PIPELINE_LTO`; - reverting #6060; - #6246; - `APS5_TEXTURE_CACHE_MIB=6000`; - `APS5_NO_DEFERRED_EVICTION`. How HTILE is laid out without `ITERATE_256` isn't settled here, so I haven't guessed an implementation. If someone has the layout, or a hardware measurement of it, I can test a change on this title right away.
simonbronk commented 2026-10-15 13:29:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-15T13:29:08Z.


The device loss with host imports on, mentioned above, now has its own issue with the data: #6374.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6193239649 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6362#issuecomment-6193239649). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-15T13:29:08Z. --- The device loss with host imports on, mentioned above, now has its own issue with the data: #6374.
simonbronk commented 2026-10-15 20:37:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-15T20:37:01Z.


Fix in #6557: the initial import no longer requires ITERATE_256, because it reads no compressed Z planes and the HTILE clear words and footprint do not depend on it (sources in the PR). Tested on Onimusha (PPSA27836) with APS5_NO_HOST_IMPORT=1 on Windows 11, RTX 5070 and AMD gfx1036: the load passes this point and stops at the next refusal, sample-preserving guest publication of native multisample depth is not implemented.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6201767008 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6362#issuecomment-6201767008). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-15T20:37:01Z. --- Fix in #6557: the initial import no longer requires ITERATE_256, because it reads no compressed Z planes and the HTILE clear words and footprint do not depend on it (sources in the PR). Tested on Onimusha (PPSA27836) with `APS5_NO_HOST_IMPORT=1` on Windows 11, RTX 5070 and AMD gfx1036: the load passes this point and stops at the next refusal, `sample-preserving guest publication of native multisample depth is not implemented`.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#6362
No description provided.