fix(agc): release a resident multisample depth before a GPU buffer may write over it #11369

Merged
QRMOE merged 4 commits from upstream-pr/11369 into main 2026-10-28 13:49:10 +00:00
QRMOE commented 2026-10-26 09:04:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by QRMOE on 2026-10-26T09:04:41Z.


What

A GPU buffer a shader may write could land on the memory of a resident native multisampled depth surface without the surface being released first. Guest, DMA, texture, storage-image, index and vertex reads already go through RequireNoResidentDepthRead_nid_no_patch before they touch that memory; a writable storage buffer did not. When the buffer was a host import, the GPU wrote straight into guest memory, the surface's guarded generation moved, and the next access to the surface (for example a read that asked for guest publication) stopped on guest writes over native multisample depth are not implemented.

GuestBufferMemory::UploadFinish now calls RequireNoResidentDepthRead_nid_no_patch for each range in Writes(), next to the existing FlushDepthPlanes call and before the GPU runs. This is the order a console sees: the buffer's stores land on top of whatever the depth surface left in memory.

  • A surface no draw has written since import is retired, as for a guest read, and its guest bytes and HTILE are left unchanged.
  • A written surface goes through guest publication. On main that is still the sample-preserving guest publication refusal, now raised at the buffer upload instead of at a later access; with #9950 it publishes the samples first.

Buffers bound read-only are not covered; a new debt entry says so.

Tested

Windows 11 Home 26200, Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (AMD 32.0.31021.1015, Vulkan 1.4.349), WinLibs GCC 15.2.0 r7, Release. The regression test and the validation comparison below were run on this branch as pushed (a65bb53c25, on main b27cc8416f); the selected-test run was on the same commit on main efd368fec6, before a rebase with no conflicts.

  • agc_driver_native_multisample_depth gains CheckBufferWrites: a fresh D16 and D32 surface at 2, 4 and 8 samples, on a device created with VK_EXT_external_memory_host and buffer device addresses, so the written range is bound as a host import (the test requires HostImportCovers; without the extension it prints a skip line). Two cases per format and sample count:
    • an unrelated writable buffer keeps the surface resident;
    • a writable buffer over the last 256 bytes of the depth plane, and one over the HTILE range, retire the unwritten surface and leave its guest bytes and HTILE unchanged;
    • On main: fails with a buffer the GPU may write left an unwritten native depth surface resident over it. With this PR: passes.
  • Khronos validation layer (Vulkan SDK 1.4.363.0), same machine and GPU, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest --test-dir build -R "^agc_driver_native_multisample_depth" -V: neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS; VUID- occurrences are 0 on main and 0 with this PR. The main run stops at the new check, so it covers less of the test than the PR run.
  • tools/select_tests.py selected 1490 of 2398 tests for this diff, -j4, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1: 8 failures, and the same 8 fail on main on this machine: select_tests, nid_database_cache, agc_host_import_cut_lifetime, agc_driver_depth_plane_partial_store, agc_driver_sample_order_grid_reference, agc_driver_frame_capture_eop, agc_driver_frame_replay_shader, agc_driver_frame_replay_shader_host.
  • Title: RESIDENT EVIL requiem (PPSA31246, 01.200.000), on main 29ce6d87eb with #10935, #10304, #9950 and #11199 applied locally. Same title, inputs and other libraries in every run, frame dumps checked:
    • Without this change, 5 of 5 runs stopped about 10 minutes in, after the start-up logos, on guest writes over native multisample depth are not implemented (these runs carried temporary diagnostics, removed since). In four of them a temporary write watch showed the last writes to the 4x D32 128x64 surface at 0x20008d0000 were MarkPossiblyWritten stamps over 0x20008d0000+0x30000 from GuestBufferMemory::MarkDirectWrites and GuestBufferMemory::WriteBack, after the surface's draws; the access that then stopped was the guest publication request of a later read.
    • With this change, 3 of 3 runs passed that point and reached the main menu, Main Story, New Game, Game Mode and the opening title card. (A fourth run with every import traced, which slows the title down, stopped earlier on an unrelated shader-decode error.) After the title card the title shows a black screen while still drawing; one run left there for 40 minutes stopped on VK_ERROR_OUT_OF_DEVICE_MEMORY. Both are separate from this change and not investigated here. Gameplay was not reached.
  • Rerun on the current head 946de281e1 (on main 18ef6be0cd), same machine and validation-layer environment, ctest --test-dir build -R "^agc_driver_native_multisample_depth$" -V: this branch passes; the same tree with GuestBufferMemory.cpp from main fails with a buffer the GPU may write left an unwritten native depth surface resident over it; this branch merged with #10497 (8a0dcd5af9, which carries #10469 and #10492) passes. 0 VUID- occurrences and no missing-layer line in any of the three logs.
  • Rerun on 609f4f1205, after dropping the written-surface refusal case, same machine and validation-layer environment: this branch passes, and the same tree with GuestBufferMemory.cpp from the base main 18ef6be0cd fails with a buffer the GPU may write left an unwritten native depth surface resident over it. The buffer-write cases ran for formats 124 and 126 at 2, 4 and 8 samples (checked=24 unavailable=0); 0 VUID- lines.
  • Not run: Linux, other GPU vendors, the full CTest suite.
  • tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py --branch fix/agc-msaa-depth-buffer-write: #10920 edits the same two lines of the test's own Device setup (it adds the portability subset). Not listed by the tool, since the only shared file is the debt file:
    • #6498 (also carried by #10492 and #10497) adds ShaderResources::requireGuestBuffers(), which calls RequireNoMultisampleTarget for every guest buffer, read-only or writable, right before UploadFinish; in production that also covers this PR's line, but this PR's test drives GuestBufferMemory::Upload directly, so the UploadFinish guard and its test stay in either landing order. Once #6498 is in, the read-only sentence of this PR's debt entry is dropped.
    • #10469, #10492 and #10497 change the written-surface refusal message, which the test no longer checks.

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 (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: PPSA31246 #11599 (RESIDENT EVIL requiem)
  • GPUs tested: AMD Radeon RX 9070 XT, AMD driver 32.0.31021.1015 (Vulkan 1.4.349), Windows 11 Home 26200
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5014797785 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11369). Originally posted by [QRMOE](https://github.com/QRMOE) on 2026-10-26T09:04:41Z. --- ### What A GPU buffer a shader may write could land on the memory of a resident native multisampled depth surface without the surface being released first. Guest, DMA, texture, storage-image, index and vertex reads already go through `RequireNoResidentDepthRead_nid_no_patch` before they touch that memory; a writable storage buffer did not. When the buffer was a host import, the GPU wrote straight into guest memory, the surface's guarded generation moved, and the next access to the surface (for example a read that asked for guest publication) stopped on `guest writes over native multisample depth are not implemented`. `GuestBufferMemory::UploadFinish` now calls `RequireNoResidentDepthRead_nid_no_patch` for each range in `Writes()`, next to the existing `FlushDepthPlanes` call and before the GPU runs. This is the order a console sees: the buffer's stores land on top of whatever the depth surface left in memory. - A surface no draw has written since import is retired, as for a guest read, and its guest bytes and HTILE are left unchanged. - A written surface goes through guest publication. On `main` that is still the `sample-preserving guest publication` refusal, now raised at the buffer upload instead of at a later access; with #9950 it publishes the samples first. Buffers bound read-only are not covered; a new debt entry says so. ### Tested Windows 11 Home 26200, Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (AMD 32.0.31021.1015, Vulkan 1.4.349), WinLibs GCC 15.2.0 r7, Release. The regression test and the validation comparison below were run on this branch as pushed (a65bb53c25, on `main` b27cc8416f); the selected-test run was on the same commit on `main` efd368fec6, before a rebase with no conflicts. - `agc_driver_native_multisample_depth` gains `CheckBufferWrites`: a fresh D16 and D32 surface at 2, 4 and 8 samples, on a device created with `VK_EXT_external_memory_host` and buffer device addresses, so the written range is bound as a host import (the test requires `HostImportCovers`; without the extension it prints a skip line). Two cases per format and sample count: - an unrelated writable buffer keeps the surface resident; - a writable buffer over the last 256 bytes of the depth plane, and one over the HTILE range, retire the unwritten surface and leave its guest bytes and HTILE unchanged; - On `main`: fails with `a buffer the GPU may write left an unwritten native depth surface resident over it`. With this PR: passes. - Khronos validation layer (Vulkan SDK 1.4.363.0), same machine and GPU, `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ctest --test-dir build -R "^agc_driver_native_multisample_depth" -V`: neither log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`; `VUID-` occurrences are 0 on `main` and 0 with this PR. The `main` run stops at the new check, so it covers less of the test than the PR run. - `tools/select_tests.py` selected 1490 of 2398 tests for this diff, `-j4`, `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`: 8 failures, and the same 8 fail on `main` on this machine: `select_tests`, `nid_database_cache`, `agc_host_import_cut_lifetime`, `agc_driver_depth_plane_partial_store`, `agc_driver_sample_order_grid_reference`, `agc_driver_frame_capture_eop`, `agc_driver_frame_replay_shader`, `agc_driver_frame_replay_shader_host`. - Title: RESIDENT EVIL requiem (PPSA31246, 01.200.000), on `main` 29ce6d87eb with #10935, #10304, #9950 and #11199 applied locally. Same title, inputs and other libraries in every run, frame dumps checked: - Without this change, 5 of 5 runs stopped about 10 minutes in, after the start-up logos, on `guest writes over native multisample depth are not implemented` (these runs carried temporary diagnostics, removed since). In four of them a temporary write watch showed the last writes to the 4x D32 128x64 surface at 0x20008d0000 were `MarkPossiblyWritten` stamps over 0x20008d0000+0x30000 from `GuestBufferMemory::MarkDirectWrites` and `GuestBufferMemory::WriteBack`, after the surface's draws; the access that then stopped was the guest publication request of a later read. - With this change, 3 of 3 runs passed that point and reached the main menu, Main Story, New Game, Game Mode and the opening title card. (A fourth run with every import traced, which slows the title down, stopped earlier on an unrelated shader-decode error.) After the title card the title shows a black screen while still drawing; one run left there for 40 minutes stopped on `VK_ERROR_OUT_OF_DEVICE_MEMORY`. Both are separate from this change and not investigated here. Gameplay was not reached. - Rerun on the current head 946de281e1 (on `main` 18ef6be0cd), same machine and validation-layer environment, `ctest --test-dir build -R "^agc_driver_native_multisample_depth$" -V`: this branch passes; the same tree with `GuestBufferMemory.cpp` from `main` fails with `a buffer the GPU may write left an unwritten native depth surface resident over it`; this branch merged with #10497 (8a0dcd5af9, which carries #10469 and #10492) passes. 0 `VUID-` occurrences and no missing-layer line in any of the three logs. - Rerun on 609f4f1205, after dropping the written-surface refusal case, same machine and validation-layer environment: this branch passes, and the same tree with `GuestBufferMemory.cpp` from the base `main` 18ef6be0cd fails with `a buffer the GPU may write left an unwritten native depth surface resident over it`. The buffer-write cases ran for formats 124 and 126 at 2, 4 and 8 samples (`checked=24 unavailable=0`); 0 `VUID-` lines. - Not run: Linux, other GPU vendors, the full CTest suite. - `tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py --branch fix/agc-msaa-depth-buffer-write`: #10920 edits the same two lines of the test's own `Device` setup (it adds the portability subset). Not listed by the tool, since the only shared file is the debt file: - #6498 (also carried by #10492 and #10497) adds `ShaderResources::requireGuestBuffers()`, which calls `RequireNoMultisampleTarget` for every guest buffer, read-only or writable, right before `UploadFinish`; in production that also covers this PR's line, but this PR's test drives `GuestBufferMemory::Upload` directly, so the `UploadFinish` guard and its test stay in either landing order. Once #6498 is in, the read-only sentence of this PR's debt entry is dropped. - #10469, #10492 and #10497 change the written-surface refusal message, which the test no longer checks. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: PPSA31246 #11599 (RESIDENT EVIL requiem) - [x] GPUs tested: AMD Radeon RX 9070 XT, AMD driver 32.0.31021.1015 (Vulkan 1.4.349), Windows 11 Home 26200 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-26 09:09:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T09:09:41Z.

Review: CHANGES_REQUESTED


Reviewed exact head a65bb53c25c5bad83b638deed03fa0caeca2f7b6.

The production change appears to retire or publish a resident native depth surface before the GPU can write into an overlapping guest buffer, and the test covers unrelated, depth-plane, HTILE, and already-written cases. I found one portability issue in the new Device(importHost=true) fixture that can prevent the added cases from running on otherwise usable Vulkan devices.

At NativeMultisampleDepth.cpp, the fixture enables VkPhysicalDeviceBufferDeviceAddressFeatures::bufferDeviceAddress = VK_TRUE whenever both extension names are enumerated. Extension presence does not establish support for this optional feature. The Vulkan feature structure must be queried with vkGetPhysicalDeviceFeatures2, and only a supported feature may be enabled at device creation. If a device exposes both extension names but reports bufferDeviceAddress == VK_FALSE, this fixture fails vkCreateDevice rather than skipping only the host-import cases. Please query the feature and gate the import-host device/test path on its support (while retaining the existing extension checks), then rerun the focused test on the author GPU and a Vulkan configuration without BDA if available.

I did not run the AGC test locally: this environment has no /dev/dri GPU device. Current hosted eligibility, conventions, intake, labels, and report checks pass; product and GPU build jobs are skipped by the repository path policy. The reported Windows/RX 9070 XT test remains author-provided evidence.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5649660364 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11369#pullrequestreview-5649660364). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T09:09:41Z. **Review:** CHANGES_REQUESTED --- Reviewed exact head `a65bb53c25c5bad83b638deed03fa0caeca2f7b6`. The production change appears to retire or publish a resident native depth surface before the GPU can write into an overlapping guest buffer, and the test covers unrelated, depth-plane, HTILE, and already-written cases. I found one portability issue in the new `Device(importHost=true)` fixture that can prevent the added cases from running on otherwise usable Vulkan devices. At `NativeMultisampleDepth.cpp`, the fixture enables `VkPhysicalDeviceBufferDeviceAddressFeatures::bufferDeviceAddress = VK_TRUE` whenever both extension names are enumerated. Extension presence does not establish support for this optional feature. The Vulkan feature structure must be queried with `vkGetPhysicalDeviceFeatures2`, and only a supported feature may be enabled at device creation. If a device exposes both extension names but reports `bufferDeviceAddress == VK_FALSE`, this fixture fails `vkCreateDevice` rather than skipping only the host-import cases. Please query the feature and gate the import-host device/test path on its support (while retaining the existing extension checks), then rerun the focused test on the author GPU and a Vulkan configuration without BDA if available. I did not run the AGC test locally: this environment has no `/dev/dri` GPU device. Current hosted eligibility, conventions, intake, labels, and report checks pass; product and GPU build jobs are skipped by the repository path policy. The reported Windows/RX 9070 XT test remains author-provided evidence.
MarcZX10 commented 2026-10-26 09:29:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T09:29:01Z.

Review: CHANGES_REQUESTED


Re-reviewed exact head 7ab89a42bdceca2d1f33f63282e9708d3d9a0800 against current main 4e43321bd6ceccdc1ae28568bbbc35d9a6446464. The new vkGetPhysicalDeviceFeatures2 query now gates bufferDeviceAddress; unsupported devices create without the optional extensions and the test skips host-import cases. The author reports the focused test passed on the RX 9070 XT and the forced-off path skipped all six combinations. I found no remaining issue with that feature query.

Two merge-readiness items remain:

  • tools/check_main_sync.py reports this branch is 2 commits ahead and 84 behind current main (merge base b27cc8416f820e40ce187f165d34138e24373dd7). The merge preview with main is clean and main has not changed the PR's touched paths since that base, but the repository requires branches to stay current. Please rebase/sync to current main and rerun the focused Vulkan test and conventions on the resulting exact head.
  • Open #10920 also modifies the Device setup in NativeMultisampleDepth.cpp to enable VK_KHR_portability_subset. A three-way merge preview of the current heads reports a content conflict in that file, in the same setup region this PR now changes for BDA. Please coordinate integration order and preserve both the portability-subset setup and this feature-gated host-import setup; add Depends on: #10920 if that PR must land first.

On this host, check_conventions.py and git diff --check pass for the current PR head, and the main merge preview is clean. I could not run the Vulkan test locally because /dev/dri is absent. Hosted eligibility, conventions, labels and report pass; product/GPU build jobs are skipped by path policy.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5649870428 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11369#pullrequestreview-5649870428). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T09:29:01Z. **Review:** CHANGES_REQUESTED --- Re-reviewed exact head `7ab89a42bdceca2d1f33f63282e9708d3d9a0800` against current `main` `4e43321bd6ceccdc1ae28568bbbc35d9a6446464`. The new `vkGetPhysicalDeviceFeatures2` query now gates `bufferDeviceAddress`; unsupported devices create without the optional extensions and the test skips host-import cases. The author reports the focused test passed on the RX 9070 XT and the forced-off path skipped all six combinations. I found no remaining issue with that feature query. Two merge-readiness items remain: - `tools/check_main_sync.py` reports this branch is 2 commits ahead and 84 behind current main (merge base `b27cc8416f820e40ce187f165d34138e24373dd7`). The merge preview with main is clean and main has not changed the PR's touched paths since that base, but the repository requires branches to stay current. Please rebase/sync to current main and rerun the focused Vulkan test and conventions on the resulting exact head. - Open #10920 also modifies the `Device` setup in `NativeMultisampleDepth.cpp` to enable `VK_KHR_portability_subset`. A three-way merge preview of the current heads reports a content conflict in that file, in the same setup region this PR now changes for BDA. Please coordinate integration order and preserve both the portability-subset setup and this feature-gated host-import setup; add `Depends on: #10920` if that PR must land first. On this host, `check_conventions.py` and `git diff --check` pass for the current PR head, and the main merge preview is clean. I could not run the Vulkan test locally because `/dev/dri` is absent. Hosted eligibility, conventions, labels and report pass; product/GPU build jobs are skipped by path policy.
MarcZX10 commented 2026-10-26 10:03:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T10:03:28Z.

Review: DISMISSED


The BDA feature gate fix and the reported RX 9070 XT/forced-off test results remain useful; this exact head is still 7ab89a42bdceca2d1f33f63282e9708d3d9a0800. Current main is now 5b5d24cb22, leaving the branch 87 commits behind. The merge preview is clean, but docs/dev/debt/libSceAgcDriver.md changed on main since the branch base, so the rebase must retain those descriptor notes along with this PR’s debt. Please rebase and rerun the focused Vulkan test and conventions on the resulting head. The open #10920 integration conflict in NativeMultisampleDepth.cpp remains: coordinate the portability-subset setup and BDA feature setup, and record Depends on if order is required. Current conventions and diff checks pass on the existing head; product/GPU jobs are skipped by path policy.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5650266167 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11369#pullrequestreview-5650266167). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T10:03:28Z. **Review:** DISMISSED --- The BDA feature gate fix and the reported RX 9070 XT/forced-off test results remain useful; this exact head is still `7ab89a42bdceca2d1f33f63282e9708d3d9a0800`. Current `main` is now `5b5d24cb22`, leaving the branch 87 commits behind. The merge preview is clean, but `docs/dev/debt/libSceAgcDriver.md` changed on main since the branch base, so the rebase must retain those descriptor notes along with this PR’s debt. Please rebase and rerun the focused Vulkan test and conventions on the resulting head. The open #10920 integration conflict in `NativeMultisampleDepth.cpp` remains: coordinate the portability-subset setup and BDA feature setup, and record `Depends on` if order is required. Current conventions and diff checks pass on the existing head; product/GPU jobs are skipped by path policy.
jotitadev commented 2026-10-27 07:53:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T07:53:38Z.

Review: COMMENTED


Linux NVIDIA and lavapipe run. The runs so far are Windows only (RX 9070 XT, RTX 5070 Ti).

Setup: Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8), each selected with VK_DRIVER_FILES. Head 946de281e merged with --no-commit onto main b7105f728 (clean; it also merges cleanly onto 8df2c3ed0). Focused runs use ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Khronos layer 1.4.341). VK_LOADER_DEBUG=layer shows the layer inserted, and no log has the missing-layer message.

  • Control (main + only this PR's NativeMultisampleDepth.cpp): agc_driver_native_multisample_depth fails on both devices with a buffer the GPU may write left an unwritten native depth surface resident over it, so CheckBufferWrites reaches the host-import path on both.
  • With the PR: agc_driver_native_multisample_depth passes 3/3 on both devices.
    • 3070: Native multisampled depth cases checked=24 unavailable=0, with the "GPU buffer write over the depth or HTILE released the unwritten surface and refused the written one" line for every sample count.
    • lavapipe: checked=16 unavailable=8.
  • Focused set (^agc_driver_native_multisample_depth, ^agc_driver_multisample, guest_buffer, 16 tests): 16/16 3/3 on the 3070. On lavapipe it is 15/16 3/3; the failure is agc_driver_multisample_retirement, which fails the same way on main on this host. 0 VUID- on either device.
  • ^agc suite (without display/flip/lds_atomics64, -j1 --timeout 30): 3070 1042/1042; lavapipe 1041/1042, with the same multisample_retirement failure as main.
  • Builds clean on Linux, so the sizeof asserts in ShaderDiskCache.cpp and PipelineJournal.cpp hold. public_headers passes with main 8df2c3ed0.

GPUs tested: NVIDIA RTX 3070 (Linux), lavapipe

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5663743576 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11369#pullrequestreview-5663743576). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-27T07:53:38Z. **Review:** COMMENTED --- Linux NVIDIA and lavapipe run. The runs so far are Windows only (RX 9070 XT, RTX 5070 Ti). **Setup:** Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8), each selected with `VK_DRIVER_FILES`. Head `946de281e` merged with `--no-commit` onto `main` `b7105f728` (clean; it also merges cleanly onto `8df2c3ed0`). Focused runs use `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (Khronos layer 1.4.341). `VK_LOADER_DEBUG=layer` shows the layer inserted, and no log has the missing-layer message. - **Control (`main` + only this PR's `NativeMultisampleDepth.cpp`):** `agc_driver_native_multisample_depth` fails on both devices with `a buffer the GPU may write left an unwritten native depth surface resident over it`, so `CheckBufferWrites` reaches the host-import path on both. - **With the PR:** `agc_driver_native_multisample_depth` passes 3/3 on both devices. - 3070: `Native multisampled depth cases checked=24 unavailable=0`, with the "GPU buffer write over the depth or HTILE released the unwritten surface and refused the written one" line for every sample count. - lavapipe: `checked=16 unavailable=8`. - **Focused set** (`^agc_driver_native_multisample_depth`, `^agc_driver_multisample`, `guest_buffer`, 16 tests): 16/16 3/3 on the 3070. On lavapipe it is 15/16 3/3; the failure is `agc_driver_multisample_retirement`, which fails the same way on `main` on this host. 0 `VUID-` on either device. - **`^agc` suite** (without display/flip/lds_atomics64, `-j1 --timeout 30`): 3070 1042/1042; lavapipe 1041/1042, with the same `multisample_retirement` failure as `main`. - Builds clean on Linux, so the `sizeof` asserts in `ShaderDiskCache.cpp` and `PipelineJournal.cpp` hold. `public_headers` passes with `main` `8df2c3ed0`. GPUs tested: NVIDIA RTX 3070 (Linux), lavapipe Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Sign in to join this conversation.
No reviewers
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!11369
No description provided.