test(agc): keep the private gate's direct import under the Windows settle floor #28029

Merged
Plyxen merged 1 commit from upstream-pr/28029 into main 2026-11-29 09:29:58 +00:00
Plyxen commented 2026-11-28 05:02:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-11-28T05:02:07Z.


What

agc_driver_linear_target_import_creation fails on Windows main (a163d4b886) on every GPU:

linear target import reuse passed
AGC graphics: private gate: a color target's import of direct memory under the settle floor was made where it would be compared

The PrivateGate case (e1fa56c7bf, 2026-10-26) maps a 512 KiB direct block (ResidentBytes / 4) and expects its color target import to be refused under ImportWatch::Unwatch, because the block is under the settle floor. At that time the floor was 1 MiB.

71dad17b46 (2026-11-20) lowered the Windows floor (PrivateSettleFloorBytes) to one 64 KiB block plus one byte. A private import larger than 64 KiB now settles at the import and stays in the write watch. That is the intended behaviour, so the 512 KiB import is now made. That commit updated the recorder test, which sets APS5_SETTLE_FLOOR_KIB, but not this case.

The case now maps one 64 KiB block (BlockBytes), which is under the default floor, so it again checks what it describes. The 16 KiB color target (TargetBytes) fits in it. The read-only flexible case and the watched case are unchanged. The driver is unchanged.

#26650 reports this failure and names two fixes. #26662 takes the other one: it keeps the whole test at the old 1 MiB floor with APS5_SETTLE_FLOOR_KIB=1024. This change keeps the default floor, so the gate checks the floor Windows runs with. Only one of the two should merge. I missed #26662 when I opened this, because it changes only the test's CMake registration.

The Windows Build job's last finished run (ab6fe4a981) already had 71dad17b46. Its Vulkan tests skip without a device, so CI did not catch this.

Tested

Windows 11, Vulkan SDK 1.4.363 validation layer. I ran 29 tests on each GPU (ANYPS5_GPU) with 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_label_trap_committer_resolve|agc_driver_linear_target_.*|agc_read_traps_over_host_pointer_imports_driver|agc_write_tracking.*|agc_write_watch_coverage.*)$' -V --repeat until-fail:3. The runs compare main a163d4b886 with this change, which was applied together with #28028:

GPU main this change
NVIDIA GeForce RTX 5080 (621.24) 28/29, agc_driver_linear_target_import_creation fails 29/29
AMD Radeon(TM) Graphics, gfx1036 (26.11.2) 28/29, agc_driver_linear_target_import_creation fails 29/29

Every log shows the loader inserting VK_LAYER_KHRONOS_validation. None contains was not found but was requested by env var VK_INSTANCE_LAYERS. Neither main nor the change logs a VUID- error. Every test selected the GPU it was given.

The branch is rebased onto main 4c7578e0a4. None of the 30 commits in between touch this file.

python3 tools/pr_overlap.py --names PrivateGate reports no matching export changes, because PrivateGate is a test case.

python3 tools/pr_overlap.py --branch test/agc-private-gate-windows-settle-floor failed closed. #21649 shares LinearTargetImportCreation.cpp and conflicts with main, so I compared it by hand. It changes DmaBufSparseFailure, not PrivateGate.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: Fixes #26650
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5080 (driver 621.24) and AMD Radeon gfx1036 iGPU (Adrenalin 26.11.2), Windows 11
  • AI-assisted: yes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated the size of a test memory block.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5536868875 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28029). Originally posted by [Plyxen](https://github.com/Plyxen) on 2026-11-28T05:02:07Z. --- ### What `agc_driver_linear_target_import_creation` fails on Windows `main` (`a163d4b886`) on every GPU: ``` linear target import reuse passed AGC graphics: private gate: a color target's import of direct memory under the settle floor was made where it would be compared ``` The `PrivateGate` case (`e1fa56c7bf`, 2026-10-26) maps a 512 KiB direct block (`ResidentBytes / 4`) and expects its color target import to be refused under `ImportWatch::Unwatch`, because the block is under the settle floor. At that time the floor was 1 MiB. `71dad17b46` (2026-11-20) lowered the Windows floor (`PrivateSettleFloorBytes`) to one 64 KiB block plus one byte. A private import larger than 64 KiB now settles at the import and stays in the write watch. That is the intended behaviour, so the 512 KiB import is now made. That commit updated the recorder test, which sets `APS5_SETTLE_FLOOR_KIB`, but not this case. The case now maps one 64 KiB block (`BlockBytes`), which is under the default floor, so it again checks what it describes. The 16 KiB color target (`TargetBytes`) fits in it. The read-only flexible case and the watched case are unchanged. The driver is unchanged. #26650 reports this failure and names two fixes. #26662 takes the other one: it keeps the whole test at the old 1 MiB floor with `APS5_SETTLE_FLOOR_KIB=1024`. This change keeps the default floor, so the gate checks the floor Windows runs with. Only one of the two should merge. I missed #26662 when I opened this, because it changes only the test's CMake registration. The Windows Build job's last finished run (`ab6fe4a981`) already had `71dad17b46`. Its Vulkan tests skip without a device, so CI did not catch this. ### Tested Windows 11, Vulkan SDK 1.4.363 validation layer. I ran 29 tests on each GPU (`ANYPS5_GPU`) with `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_label_trap_committer_resolve|agc_driver_linear_target_.*|agc_read_traps_over_host_pointer_imports_driver|agc_write_tracking.*|agc_write_watch_coverage.*)$' -V --repeat until-fail:3`. The runs compare `main` `a163d4b886` with this change, which was applied together with #28028: | GPU | `main` | this change | |---|---|---| | NVIDIA GeForce RTX 5080 (621.24) | 28/29, `agc_driver_linear_target_import_creation` fails | 29/29 | | AMD Radeon(TM) Graphics, gfx1036 (26.11.2) | 28/29, `agc_driver_linear_target_import_creation` fails | 29/29 | Every log shows the loader inserting `VK_LAYER_KHRONOS_validation`. None contains `was not found but was requested by env var VK_INSTANCE_LAYERS`. Neither `main` nor the change logs a `VUID-` error. Every test selected the GPU it was given. The branch is rebased onto `main` `4c7578e0a4`. None of the 30 commits in between touch this file. `python3 tools/pr_overlap.py --names PrivateGate` reports no matching export changes, because `PrivateGate` is a test case. `python3 tools/pr_overlap.py --branch test/agc-private-gate-windows-settle-floor` failed closed. #21649 shares `LinearTargetImportCreation.cpp` and conflicts with `main`, so I compared it by hand. It changes `DmaBufSparseFailure`, not `PrivateGate`. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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: Fixes #26650 - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 5080 (driver 621.24) and AMD Radeon gfx1036 iGPU (Adrenalin 26.11.2), Windows 11 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Tests** * Updated the size of a test memory block. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
arcwiser commented 2026-11-28 09:05:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by arcwiser on 2026-11-28T09:05:04Z.

Review: APPROVED


Reviewed exact head 131fdc1734bde273fbda5f5b986ef99631b142d9.

The fixture now allocates exactly BlockBytes (64 KiB), which is below the current default PrivateSettleFloorBytes() of 64 KiB + 1, while the 16 KiB color target still fits inside the block. That restores the intended private-import gate assertion without changing production behavior. The linked issue provides reproducible Windows failures across AMD and NVIDIA, and the exact head has both the author's repeated Windows runs and an independent Linux/RADV run. PR #21649 touches the same file but a different test path (DmaBufSparseFailure).

Local checks: tools/check_conventions.py --base upstream/main --head upstream/pr-28029, git diff --check, and a merge-tree check all passed. I could not run the native Vulkan test locally because this machine has no configured C/C++ compiler/test build, so I relied on the two exact-head GPU reports for runtime coverage.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6096888761 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28029#pullrequestreview-6096888761). Originally posted by [arcwiser](https://github.com/arcwiser) on 2026-11-28T09:05:04Z. **Review:** APPROVED --- Reviewed exact head `131fdc1734bde273fbda5f5b986ef99631b142d9`. The fixture now allocates exactly `BlockBytes` (64 KiB), which is below the current default `PrivateSettleFloorBytes()` of 64 KiB + 1, while the 16 KiB color target still fits inside the block. That restores the intended private-import gate assertion without changing production behavior. The linked issue provides reproducible Windows failures across AMD and NVIDIA, and the exact head has both the author's repeated Windows runs and an independent Linux/RADV run. PR #21649 touches the same file but a different test path (`DmaBufSparseFailure`). Local checks: `tools/check_conventions.py --base upstream/main --head upstream/pr-28029`, `git diff --check`, and a merge-tree check all passed. I could not run the native Vulkan test locally because this machine has no configured C/C++ compiler/test build, so I relied on the two exact-head GPU reports for runtime coverage.
MarcZX10 commented 2026-11-28 09:20:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T09:20:38Z.

Review: APPROVED


Reviewed — looks good

The change reduces the private-gate test allocation to one 64 KiB block, matching the stated settle-floor scenario; no blocking defect was found in the changed code.

What I ran

Reviewed head 131fdc1734bde273fbda5f5b986ef99631b142d9. I read description.md, commits.md, manifest.json, diff.patch, and the changed source ranges at the pinned head using repo_read.py; I did not run tests.

Results

Check Result Note
Source review passed One changed test allocation
Tests not run Author reported Windows GPU runs

Findings

Blocking

None.

Non-blocking

None.

Not verified

The remaining contents of LinearTargetImportCreation.cpp were not read. files.json was not available in the review bundle, so the excluded-file list was not verified. Runtime behavior and author-reported test results were not independently verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6096941042 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28029#pullrequestreview-6096941042). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-28T09:20:38Z. **Review:** APPROVED --- # Reviewed — looks good The change reduces the private-gate test allocation to one 64 KiB block, matching the stated settle-floor scenario; no blocking defect was found in the changed code. ## What I ran Reviewed head `131fdc1734bde273fbda5f5b986ef99631b142d9`. I read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, and the changed source ranges at the pinned head using `repo_read.py`; I did not run tests. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | One changed test allocation | | Tests | not run | Author reported Windows GPU runs | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The remaining contents of `LinearTargetImportCreation.cpp` were not read. `files.json` was not available in the review bundle, so the excluded-file list was not verified. Runtime behavior and author-reported test results were not independently verified. ## To get this to a good state Nothing is required.
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!28029
No description provided.