Skip to content

test(agc): count only the unimported depth expand case's own heap mirrors - #21636

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
oneandonlydean:test/agc-depth-expand-own-mirrors
Dec 4, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
oneandonlydean:test/agc-depth-expand-own-mirrors

Conversation

@oneandonlydean

Copy link
Copy Markdown
Collaborator

in the full suite. The mirror is not on the case's blocks. Every address-based build leases all registered
ranges, so the first one in the process also meets the 2 MiB AGC driver memory at 0xfe0000000. With the
case's budget of 1 byte that import is refused, and since the driver memory is write-watched (#8120) it gets
a heap mirror, as intended. In the full suite an earlier case has already imported it. The case counted every
live heap mirror in the process, so it saw that one.

I now count the heap mirrors on the case's own five blocks with HeapMirrorsWithin. On Linux (RTX 4090):
copied alone 0 mirrors and passes, mirrored alone 5 (it counted 6 before, one of them the driver memory),
full suite passes with 5 and 0.

Fixes #21562.

AI-assisted: yes

…rors

unimported-copied-buffer-read failed when run alone: its refused address-based build also heap-mirrors the write-watched AGC driver memory at 0xfe0000000, which an earlier case's build has otherwise imported, and the case counted every live heap mirror. Count the mirrors on the case's blocks with HeapMirrorsWithin instead, so both unimported cases give the same verdict alone and in the suite. Fixes boykopovar#21562.
@domx4q

domx4q commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Linux NVIDIA run with the Khronos validation layer, since the description gives no layer run.

Setup: Arch Linux, kernel 7.3.4, GCC 16.2.1 Release, NVIDIA GeForce RTX 4090 (10de:2684), driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head 84619c1b65 merged with --no-ff onto main e4caa07950 (7b0659898e, clean merge).

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R '^agc_driver_depth_expand_out_of_place(_inline)?$' -V

The two cases were also run alone with the same environment: build/tests/agc_driver_depth_expand_out_of_place_tests <case>.

main e4caa07950 this PR
ctest 2/2 passed 2/2 passed
unimported-copied-buffer-read alone fails, 1 heap mirror (expected none), 2 of 2 runs passes, 0 heap mirrors
unimported-mirrored-buffer-read alone passes, 6 heap mirrors passes, 5 heap mirrors
Insert instance layer "VK_LAYER_KHRONOS_validation" 4 (ctest), 2 per lone case 4 (ctest), 2 per lone case
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- 0 0

Failure on main with the case alone (#21562):

  heap mirrors made for the case's blocks: 1 (expected none)
AGC graphics: depth expand: an address-based buffer copy of a copied write base no host import serves does not hold the read surface's depth

In the full ctest run the case counts 5 mirrors (mirrored) and 0 (copied) on both sides. All logs show Selected GPU name=NVIDIA GeForce RTX 4090.

No new VUID- errors; both tests pass on Ada, and the lone unimported-copied-buffer-read failure from #21562 is gone with this change.

AI-assisted: yes (Claude Code)

@tablefrogpillow

Copy link
Copy Markdown
Contributor

Same fix as #21570 — I'd posted the identical HeapMirrorsWithin scoping for #21562 a bit earlier (verified it skips→0 on the copied case and keeps the mirrored case at 1, no suite regression on RDNA2 gfx1036 + RDNA3 gfx1100). Since this is the maintainer PR I've closed mine in favour of it. Nice independent cross-check on the same root cause (the write-watched 0xfe0000000 driver memory under the 1-byte budget).

AI-assisted: yes

@maskym

maskym commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Windows + NVIDIA result for head 84619c1b65, merged alone into main e069a7562f (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. main itself fails to compile one test on Windows at this commit (UploadCacheReadOnlyFlush.cpp:177, setenv; #19899 fixes it), so both trees were built with ninja -k 0.

Validation-layer protocol on main and on this PR (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation 1.4.366, VK_LOADER_DEBUG=error,warn,layer, ctest -R '^(agc|guest_video_out|video_out|pad_sdl)' --parallel 4 -V):

Tree Passed Layer inserted was not found but was requested VUID- set
main 2050/2054 1856 0 none
this PR 2049/2054 1856 0 identical

agc_driver_upload_cache_read_only_flush is Not Run on both trees because of the main build break above. agc_driver_frame_replay_rewind_store also failed in this PR's parallel run (--parallel 4), but rerun alone it passes 3 of 3 on this PR's tree (and 3 of 3 on main earlier today on this machine), so I read it as load-dependent. No new validation errors and no other new failures. The remaining failures on this PR's tree (agc_driver_stencil_plane_memory, agc_driver_store_over_untracked, agc_driver_msaa_dcc_unwatch) also fail on main here.

The tests this PR adds or changes (agc_driver_depth_expand_out_of_place, agc_driver_depth_expand_out_of_place_inline) pass in the full validation-layer run. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@rafaconvaitis

Copy link
Copy Markdown
Contributor

Windows + AMD run; I found no AMD run in the description or in the comments. Head 84619c1b65 merged alone onto main 9a50e1014e with git merge --no-ff (clean merge).

Setup: Windows 11 25H2 (build 26200), AMD Radeon 760M integrated graphics (1002:15bf, Vulkan device name Radeon 5), AMD Software 26.11.2 (driver 32.0.32029.2010, Vulkan 1.4.359), selected with ANYPS5_GPU=Radeon, WinLibs GCC 15.2.0 r7 UCRT, Release, BUILD_TESTING=ON, Khronos validation layer 1.4.363 (LunarG SDK 1.4.363.1). Only the focused test targets were built; the other execution tests were left out with ANYPS5_AGC_EXECUTION_TESTS.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, ctest -R '^(agc_driver_depth_expand_out_of_place|agc_driver_depth_expand_out_of_place_inline)$' -V -j 1, 3 runs per side.

test main this PR
agc_driver_depth_expand_out_of_place passes 3/3 passes 3/3
agc_driver_depth_expand_out_of_place_inline passes 3/3 passes 3/3
  • This PR changes tests only, so there is no negative control to run.
  • VUID- lines: 0 in the main and PR logs. Every run logs Selected GPU name=Radeon 5 vendor=0x1002 device=0x15bf and Insert instance layer "VK_LAYER_KHRONOS_validation", and none logs was not found but was requested.

AI-assisted: yes (build and runs scripted with an AI assistant, on the hardware above).

This was referenced Nov 21, 2026
@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head 84619c1b65, applied with git apply on main fd4aeed483 together with the other 28 PRs of one batch (#22366, #22943, #23994, #24150, #24483, #14625, #16796, #17425, #20528, #22589, #22887, #14505, #16792, #17900, #18484, #20048, #20099, #20517, #22886, #23659, #23880, #24047, #24100, #24248, #16353, #21683, #21714, #22276). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
agc_driver_depth_expand_out_of_place, agc_driver_depth_expand_out_of_place_inline (2 tests, matched by name to the test file this PR changes) all pass all pass

Whole batch: the full ctest -j 12 (6522 tests) on the RTX 3080 has 5 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. Failing tests I could not trace to a single PR (reverting the likely candidates did not clear them): public_headers. The 2125 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the change scopes the test’s mirror count to its five allocated blocks.

What I ran

Reviewed head 84619c1b655fecef92242d45bccdc0b6a649c2a6. Read description.md, commits.md, manifest.json, diff.patch, and the changed source ranges covering RunUnimportedBufferRead, Surfaces, and NewSurfaces. No commands or tests were run.

Results

Check Result Note
Diff and targeted source review passed One changed file reviewed
Tests not run No test execution performed

Findings

Blocking

None.

Non-blocking

None.

Not verified

The test was not executed, so the reported Linux RTX 4090 results were not independently confirmed. The rest of DepthExpandOutOfPlace.cpp was not read; no other changed files are listed in the manifest.

To get this to a good state

Nothing is required.

@upipibi

upipibi commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@oneandonlydean the only failing check on 84619c1b65 is conventions (run 43880368347): add the '### What' heading of the template, add the '### Tested' heading of the template, add the '### Checklist' heading of the template. The description has none of the three headings. Edit it, no push needed: put your text under ### What and ### Tested and add the ### Checklist block from .github/pull_request_template.md.

AI-assisted (Claude Code, Claude Sonnet 5.5).

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trial-merged this fixture change cleanly onto a1b75b0947. The new query scopes mirror assertions to the depth, stencil, HTILE, destination depth and copy allocations owned by the case. The copied-texel comparison still verifies the actual result. Please retain both watched and unwatched cases, since they expect opposite mirror outcomes. Paired lavapipe validation is pending.

AI-assisted: yes.

@oneandonlydean
oneandonlydean merged commit 1cb97e5 into boykopovar:main Dec 4, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* fix error Closes an issue (Fixes #N)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agc_driver_depth_expand_out_of_place_tests: unimported-copied-buffer-read fails standalone, passes in the full suite (case ordering dependency)

9 participants