Repository navigation
test(agc): scope the depth-expand out-of-place mirror count to the write base - #21570
Closed
tablefrogpillow wants to merge 1 commit into
Closed
tablefrogpillow wants to merge 1 commit into
tablefrogpillow wants to merge 1 commit into
Conversation
…ite base unimported-copied-buffer-read in agc_driver_depth_expand_out_of_place_tests asserted a delta on the process-global MirrorCounters().heapMirrors, which counts every live heap-mirror entry in the registry, including the driver's own write-watched internal memory and mirrors left live by earlier cases. Run standalone with SetHostImportBudget(1), the copied case is the first to drive an address-based copy with no import room, so the driver's own memory is served by a heap mirror and the global delta is 1 even though the case's write base is served by a copy; the "expected none" assertion then fails. In the full suite an earlier case already holds that mirror, so the delta is 0 and it passes: a test-ordering dependency, not a product bug (the copy is bit-exact, 15360/15360 texels). Scope the count to the case's own write base with the existing HeapMirrorsWithin(begin, end) helper, as the sibling ResidentHeapMirror and BdaResources tests already do. The (mirrors != 0) == watched check is unchanged; it is just fed a precise, scoped count. Test-only; no product code changes. Fixes boykopovar#21562 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
Contributor
Author
|
Superseded by @oneandonlydean's #21636, which applies the same |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
agc_driver_depth_expand_out_of_place_testscaseunimported-copied-buffer-readfails deterministically when run standalone (reports 1 heap mirror where it expects none) but passes when the whole suite runs — a test-ordering dependency (#21562).Root cause
The case asserts a delta on
MirrorCounters().heapMirrors, which is a process-global live count of every heap-mirror entry in the registry — not a per-case or per-block count. The+1seen standalone is the driver's own internal write-watched memory (Ps5DriverMemoryBase,0xfe0000000): run standalone withSetHostImportBudget(1), the copied case is the first to drive an address-based copy with no import room, so that driver memory is legitimately served by a heap mirror → the global delta is 1, even though the case's write base is correctly served by a copy. In the full suite an earlier case already holds a live mirror/import for the driver memory, so the copied case creates no new heap mirror → delta 0 → pass.So there is no product correctness bug and no mirror-lifetime leak: the mirror is correct product behaviour, and the copy itself is bit-exact (15360/15360 texels). The failure is purely an over-broad assertion reading a global accumulator contaminated by driver-internal state and cross-case ordering.
Fix
Scope the count to the case's own write base using the existing
HeapMirrorsWithin(begin, end)helper — the same patternResidentHeapMirrorandBdaResourcesalready use — instead of the process-globalMirrorCounters().heapMirrors. The(mirrors != 0) == watchedassertion is unchanged; it is just fed a precise, scoped count. Test-only; +11/−3 in one file, no product code touched.Verification (Linux / RADV)
Built on
maine4caa07950,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1+ Khronos validation layer:unimported-copied-buffer-read: PASS (write-base mirrors: 0) — fails without the changeunimported-mirrored-buffer-read: PASS (write-base mirrors: 1 — the scoped count still distinguishes mirrored from copied)agc_driver_depth_expand_out_of_place_testssuite: PASS, no regressionAI-assisted: yes