AGC: sparse BDA stores falsely prove a complete page overwrite #7220

Closed
opened 2026-10-17 17:22:14 +00:00 by Amoenus · 3 comments
Amoenus commented 2026-10-17 17:22:14 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T17:22:14Z.


Current status, 2026-10-22 UTC: #7233 merged as 3ca07d086d5f44fbe3c00370e7f03953ab46ca1b at 12:53 UTC and closed this issue. Its exact head was eb55d58728f367f527253b3ae5b30ed45030fdf3. The possible-write versus exact-completion correction is now on main. The queued-consumer handoff #7371 is also merged; the separate production tracking limitation in #8759 remains open. The qualification below is historical evidence at its stated pins, not a new title run.

Our updated Windows report tests eb55 adapted onto main cd700fe9ec. Control 20de25385f has unchanged eb55 NativeMultisampleDepth.cpp, no #7371 production handoff, and only its identical BDA regression added to the adapted base. Both RTX5080 and Radeon Graphics pass the clear group 3/3, each process exercising 26 completed-output cases plus one expected uncovered-HTILE production refusal, checked=27 unavailable=0. The refusal case does not establish completed-clear output; its Windows coverage-loss cause is not isolated. The separate missing-handoff regression fails 3/3 per GPU as expected. Control: 60 passes/six expected failures; literal main:66 passes with its older fixture. No VUIDs, validation errors/warnings, whole-test skips or timeouts. Exact hardware/settings and older evidence remain in the maintained report. No current candidate or Sonic result is implied.

Attributed exact-eb55 Linux reports: RTX4070Ti/GCC13.3 completes the tracked clear path; RTX3080/RADV/lavapipe matrix completes it on NVIDIA, with expected safe refusals on RADV/lavapipe. Lavapipe additionally has unavailable cases and a separate BDA skip. These do not establish universal NVIDIA or Windows coverage. The author's scope correction distinguishes test acceptance from a production import/watch fix.

Keep this issue open. The original sparse-store reproduction and held fe08b72de proposal below have not been rerun on today's main. fe08 remains held because a correction must preserve the recognized full-clear producer. No generic-coverage fix or title-unblock claim. AI-assisted report maintenance: yes (Codex).

Original sparse-store reproduction, held proposal and historical positive/negative controls

Historical candidate result, 2026-10-18: #7233 at e7b6e4381f (2026-10-18). The completion-based revision passes the full8-case refusal group3/3 on each physical NVIDIA/AMD GPU, including the same-value partial store. The real BDA positive passes through its new production completion argument, with exact32768-byte metadata readback, complete=1 and owner reuse; the sparse wave32/wave64 controls retain incomplete-page coverage. Full Windows/Linux builds pass. Maintained current matrix, test-only fork, fixture-contract adaptation and #7311 reset correction. The f030 failure below is historical and corrected in this revised validation. fe08 remains held. Sonic's new observed HTILE refusal is a separate title check; no successful e7b6 title run is claimed yet.

Proposal status, 2026-10-17 UTC: do not promote fe08b72de. A new real-GPU producer control confirms that this proposal rejects a legitimate full native HTILE clear on both GPUs. The earlier 54 selected controls did not exercise this path. The generic coverage mismatch below remains reproduced, but the current production consumer also requires an independently recognized full-range kernel; no incorrect native clear or title-visible corruption has been demonstrated. See the end-to-end comparison below.
Independent test-only PR #7228 now carries the standalone GPU regression. It neither ships fe08 nor closes this generic coverage finding.

Original reproduction on pinned main 66702f1cff

On main 66702f1cffd3646f2d674ed093fde0a85a70761f, sparse GPU stores through BDA can make GuestMemory::StoredAllSince_nid_no_patch return true for an entire 4096-byte page. The page contains bytes the shader never stores. This is a completeness-proof mismatch, not a claim that BDA page invalidation should be narrower.

Reproducer and evidence

Test-only fork branch, exact head 317ba251804fa7203f26ee511e6450408578e126. Production code is unchanged main; only the fixture and its CTest registration are added.

The test reuses the repository's NarrowConstantStoreFixture (8 lanes, 16-byte stride, byte/short/dword stores: 56 written bytes within the first 128 bytes). It requires a BDA page-table binding, uses a watched 1 MiB allocation, warms the import, takes a clean generation, dispatches again, waits idle, and verifies every byte of the 1 MiB allocation against the fixture/sentinel pattern before asking the tracker about coverage. The next page remains unmodified and unreported.

Both wave32 and wave64 reproduce 3/3 on each physical GPU (12 failing regressions total):

GPU Driver OS Observed
NVIDIA GeForce RTX 5080, 10de:2c02 32.0.16.1062 Windows 11, build 26200 watched=1 generation=6 overlap=0 before dispatch; first page overlap=1 complete=1, next page overlap=0
AMD Radeon(TM) Graphics, 1002:13c0 32.0.21036.18 same Windows host identical

Each measured case finishes below 0.6 seconds with shader caching disabled. The assertion is sparse BDA stores falsely prove a complete 4096-byte overwrite. Target/dependency builds and conventions pass. Linux Ubuntu 24.04/lavapipe builds, but both cases explicitly skip because that import loses write watching; this is not counted as reproduction or a passing behavioral check. Earlier 64 KiB Windows controls likewise lost watching and did not reproduce; the 1 MiB settled import is necessary for this fixture.

Reproduce after a normal full test-enabled build:

cmake --build build --target agc_driver_bda_write_coverage_tests
ctest --test-dir build -V -R "^agc_driver_bda_write_coverage" --timeout 30

Select the GPU with the existing ANYPS5_GPU selector and require Vulkan with ANYPS5_REQUIRE_VULKAN=1; verify the selected-device line in the output. CTest supplies ANYPS5_NO_SHADER_CACHE=1.

Source path and scope

BdaResources::markWrittenPages converts written-page flags into page-aligned MarkWritten ranges. MarkWritten records those possible-written ranges as driver pieces, while DriverPieces::covers treats their union as complete byte coverage. Native depth clear completion consumes this proof, but its other producer/HTILE/value checks still apply. This fixture does not establish a wrong depth clear or a title-visible corruption.

Found while investigating PPSA99902's #5336: its observed metadata invalidations come from BDA written-page reports. This issue does not establish that changing the proof resolves that title's DCC refusal; the guard must remain until actual metadata transitions are supported. The ordinary manual launch independently reproduced #5336 today.

A proposed correction should distinguish possible-written pages from exact completed stores: keep conservative overlap invalidation, but never let a page flag by itself establish complete byte coverage. Exact StoreOwnBytes/known fills must retain their existing coverage proof. No capability fallback or guard removal is proposed.

Overlap search checked StoredAllSince, BDA coverage reports, #6346, #6868 and #6455; their currently published changes do not distinguish possible BDA page coverage from exact stored bytes. @SleglJan, this touches tracker proof semantics near your pending work; reporting the independent reproducer first to avoid overlapping implementation without coordination. No duplicate upstream PR has been opened.

AI-assisted investigation and fixture: Codex; physical GPU runs and complete readback verified locally. No game code or assets attached.

Tested fork proposal

fe08b72de7631d50ee6c1472d8e35771802a4580, branch codex/fix-bda-store-coverage-main667, separates possible-written driver pieces from complete ones. BDA written-page reports use the possible form; overlap checks still see them, while the full-coverage query excludes them. Exact MarkWritten/StoreOwnBytes callers retain their complete-store behavior. The candidate also tests an uncertain whole 64 KiB block, an exact dword (complete for its four bytes, incomplete for its page), and an exact page store (complete for its page).

At this exact head, full relinker/library builds pass on Windows and Linux. Nine focused groups repeated three times on each verified RTX5080/AMD device give 54 passes, no skips: wave32/wave64 coverage, depth fast clear, depth fast-clear submit, native depth clears/refusals, and 2/4/8-sample DCC clear controls. The formerly failing real-BDA cases now report overlap=1 complete=0 next page overlap=0, with exact 1 MiB readback. The native-depth fixture's separate selected-device lines also match each requested physical vendor. Every selected test stays under 30 seconds.

Linux/lavapipe has 15 passes and 4 explicitly skipped cases in the same selection: the two BDA coverage cases lose write watching, and 2-/8-sample DCC clear controls lack support. No Linux BDA correctness result is claimed. Cppcheck and selected clang-tidy checks parse all three changed translation units without selected diagnostics; conventions pass. Base remains main667.

This is a proposal for review/coordination, not an upstream PR or a claim to unblock PPSA99902. The existing depth-clear fixtures pass, but a title-visible incorrect clear caused by this proof mismatch has not been demonstrated. Producer recognition, completed HTILE values and other existing refusals remain required. In particular, the effect on a legitimate full BDA-written HTILE clear needs an explicit end-to-end control before promotion; page bits cannot alone serve as exact-byte proof. #5336's resident color-DCC refusal is intentionally unchanged. The test-only branch above preserves the unchanged-main failing control.

Full native BDA producer control: proposal regression confirmed

A new test runs the existing recognized 17-word HTILE mask kernel through the normal recompiler/BDA dispatch path, using watched 1 MiB imports. It creates a native four-sample D32 owner for a 5x3 surface with zero-clear metadata, changes the clear value to one, notifies the recognized complete HTILE producer, dispatches all 32 workgroups, waits idle, and verifies the complete 32 KiB metadata range is 0xfffffff0 while the rest of its allocation remains zero. It then asks the native owner to reuse its sampled view and attachment.

Production code Exact test head RTX5080 AMD Radeon Graphics
unchanged main667 739dd2e6253214fde3feef0af8b0f9cb657fc5f5 3/3 accepted 3/3 accepted
fe08 proposal + identical test 502daeda0acd2185020ebad6af48bd9276d022cc 3/3 refused 3/3 refused

Both sides pass the exact metadata/allocation readback, verify the physical device identity, and finish each case below one second. Main reports complete=1 and accepts the clear. The proposal reports complete=0, then throws native multisample depth clear has no complete tracked HTILE store. No skip or timeout was counted. Drivers/OS are the same as the earlier table. The initial fixture setup was corrected before this matched comparison; its earlier warm-up initialization failure is excluded.

Reproduction: build agc_driver_bda_write_coverage_tests on either linked branch and run ctest --test-dir build -V -R "^agc_driver_bda_native_clear$" --timeout 30. These are Windows target/dependency rebuilds on the exact heads; the prior full Windows/Linux builds remain evidence for fe08 itself, not a new full-build or Linux claim for these test additions. Conventions pass. This control checks completed native-owner acceptance plus GPU metadata readback; it does not add a numeric sampled-depth readback or a title/gameplay claim.

Why this matters: HtileDepthClearBytes_nid_no_patch checks a known unconditional kernel and complete direct workgroup extent before the driver calls NoteHtileDepthClear. The native clear consumer relies on that producer restriction as well as completion/CPU/depth/value checks. Globally downgrading all BDA page records without replacing that producer's completion proof regresses an existing supported path. The earlier native-depth fixtures simulated completion with StoreOwnBytes, so their passes did not establish this preservation requirement.

The original sparse-store finding establishes that page coverage cannot be used as a generic exact-byte proof. It does not by itself establish a bug in the restricted native consumer. Please keep the fe08 branch as investigation material; no upstream PR or integration rollout of that proposal. A complete correction must preserve this positive producer case as well as reject unproven sparse coverage. Coordinating here avoids interfering with #6346/#6868 or submitting a guard-removal workaround. AI-assisted fixture/analysis; no game code or assets attached.

Historical f030 control: the maintained report retains the accepted4-byte/32768-byte same-value partial-clear reproducer and unchanged-main refusal. The revised e7b6 callback no longer reproduces that acceptance in our current physical-GPU and lavapipe refusal matrices. This does not turn the historical f030 result into a title finding.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5901077792 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7220). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T17:22:14Z. --- <!-- codex-pr7233-validation-status-v1 --> **Current status, 2026-10-22 UTC:** #7233 merged as `3ca07d086d5f44fbe3c00370e7f03953ab46ca1b` at 12:53 UTC and closed this issue. Its exact head was `eb55d58728f367f527253b3ae5b30ed45030fdf3`. The possible-write versus exact-completion correction is now on main. The queued-consumer handoff #7371 is also merged; the separate production tracking limitation in #8759 remains open. The qualification below is historical evidence at its stated pins, not a new title run. Our [updated Windows report](https://github.com/boykopovar/AnyPS5/pull/7233#issuecomment-6244828184) tests eb55 adapted onto main `cd700fe9ec`. [Control `20de25385f`](https://github.com/Amoenus/AnyPS5/commit/20de25385fcc3489e123263f769f7daee6eb4cac) has unchanged eb55 `NativeMultisampleDepth.cpp`, no #7371 production handoff, and only its identical BDA regression added to the adapted base. Both RTX5080 and Radeon Graphics pass the clear group **3/3**, each process exercising **26 completed-output cases plus one expected uncovered-HTILE production refusal**, `checked=27 unavailable=0`. The refusal case does not establish completed-clear output; its Windows coverage-loss cause is not isolated. The separate missing-handoff regression fails 3/3 per GPU as expected. Control: 60 passes/six expected failures; literal main:66 passes with its older fixture. No VUIDs, validation errors/warnings, whole-test skips or timeouts. Exact hardware/settings and older evidence remain in the maintained report. No current candidate or Sonic result is implied. Attributed exact-eb55 Linux reports: [RTX4070Ti/GCC13.3](https://github.com/boykopovar/AnyPS5/pull/7233#issuecomment-6305226092) completes the tracked clear path; [RTX3080/RADV/lavapipe matrix](https://github.com/boykopovar/AnyPS5/pull/7233#issuecomment-6305242381) completes it on NVIDIA, with expected safe refusals on RADV/lavapipe. Lavapipe additionally has unavailable cases and a separate BDA skip. These do not establish universal NVIDIA or Windows coverage. [The author's scope correction](https://github.com/boykopovar/AnyPS5/pull/7233#issuecomment-6305289660) distinguishes test acceptance from a production import/watch fix. **Keep this issue open.** The original sparse-store reproduction and held `fe08b72de` proposal below have not been rerun on today's main. fe08 remains held because a correction must preserve the recognized full-clear producer. No generic-coverage fix or title-unblock claim. AI-assisted report maintenance: yes (Codex). <!-- /codex-pr7233-validation-status-v1 --> <details> <summary>Original sparse-store reproduction, held proposal and historical positive/negative controls</summary> <!-- codex-pr7233-historical-e7b6-status-v1 --> **Historical candidate result, 2026-10-18: #7233 at e7b6e4381f (2026-10-18).** The completion-based revision passes the full8-case refusal group3/3 on each physical NVIDIA/AMD GPU, including the same-value partial store. The real BDA positive passes through its new production completion argument, with exact32768-byte metadata readback, complete=1 and owner reuse; the sparse wave32/wave64 controls retain incomplete-page coverage. Full Windows/Linux builds pass. [Maintained current matrix, test-only fork, fixture-contract adaptation and #7311 reset correction](https://github.com/boykopovar/AnyPS5/pull/7233#issuecomment-6239238188). The f030 failure below is historical and corrected in this revised validation. fe08 remains held. Sonic's new observed HTILE refusal is a separate title check; no successful e7b6 title run is claimed yet. <!-- /codex-pr7233-historical-e7b6-status-v1 --> <!-- codex-bda-native-clear-status-v1 --> **Proposal status, 2026-10-17 UTC: do not promote fe08b72de.** A new real-GPU producer control confirms that this proposal rejects a legitimate full native HTILE clear on both GPUs. The earlier 54 selected controls did not exercise this path. The generic coverage mismatch below remains reproduced, but the current production consumer also requires an independently recognized full-range kernel; no incorrect native clear or title-visible corruption has been demonstrated. See the end-to-end comparison below. Independent test-only PR #7228 now carries the standalone GPU regression. It neither ships fe08 nor closes this generic coverage finding. <!-- /codex-bda-native-clear-status-v1 --> ## Original reproduction on pinned main `66702f1cff` On main `66702f1cffd3646f2d674ed093fde0a85a70761f`, sparse GPU stores through BDA can make `GuestMemory::StoredAllSince_nid_no_patch` return true for an entire 4096-byte page. The page contains bytes the shader never stores. This is a completeness-proof mismatch, not a claim that BDA page invalidation should be narrower. ## Reproducer and evidence [Test-only fork branch](https://github.com/Amoenus/AnyPS5/tree/codex/test-bda-store-coverage-main667), exact head [317ba251804fa7203f26ee511e6450408578e126](https://github.com/Amoenus/AnyPS5/commit/317ba251804fa7203f26ee511e6450408578e126). Production code is unchanged main; only the fixture and its CTest registration are added. The test reuses the repository's `NarrowConstantStoreFixture` (8 lanes, 16-byte stride, byte/short/dword stores: 56 written bytes within the first 128 bytes). It requires a BDA page-table binding, uses a watched 1 MiB allocation, warms the import, takes a clean generation, dispatches again, waits idle, and verifies every byte of the 1 MiB allocation against the fixture/sentinel pattern before asking the tracker about coverage. The next page remains unmodified and unreported. Both wave32 and wave64 reproduce 3/3 on each physical GPU (12 failing regressions total): | GPU | Driver | OS | Observed | | --- | --- | --- | --- | | NVIDIA GeForce RTX 5080, `10de:2c02` | 32.0.16.1062 | Windows 11, build 26200 | `watched=1 generation=6 overlap=0` before dispatch; first page `overlap=1 complete=1`, next page `overlap=0` | | AMD Radeon(TM) Graphics, `1002:13c0` | 32.0.21036.18 | same Windows host | identical | Each measured case finishes below 0.6 seconds with shader caching disabled. The assertion is `sparse BDA stores falsely prove a complete 4096-byte overwrite`. Target/dependency builds and conventions pass. Linux Ubuntu 24.04/lavapipe builds, but both cases explicitly skip because that import loses write watching; this is not counted as reproduction or a passing behavioral check. Earlier 64 KiB Windows controls likewise lost watching and did not reproduce; the 1 MiB settled import is necessary for this fixture. Reproduce after a normal full test-enabled build: ```text cmake --build build --target agc_driver_bda_write_coverage_tests ctest --test-dir build -V -R "^agc_driver_bda_write_coverage" --timeout 30 ``` Select the GPU with the existing `ANYPS5_GPU` selector and require Vulkan with `ANYPS5_REQUIRE_VULKAN=1`; verify the selected-device line in the output. CTest supplies `ANYPS5_NO_SHADER_CACHE=1`. ## Source path and scope `BdaResources::markWrittenPages` converts written-page flags into page-aligned `MarkWritten` ranges. `MarkWritten` records those possible-written ranges as driver pieces, while `DriverPieces::covers` treats their union as complete byte coverage. [Native depth clear completion](https://github.com/boykopovar/AnyPS5/blob/66702f1cffd3646f2d674ed093fde0a85a70761f/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp#L215) consumes this proof, but its other producer/HTILE/value checks still apply. This fixture does not establish a wrong depth clear or a title-visible corruption. Found while investigating PPSA99902's #5336: its observed metadata invalidations come from BDA written-page reports. This issue does **not** establish that changing the proof resolves that title's DCC refusal; the guard must remain until actual metadata transitions are supported. The ordinary manual launch independently reproduced #5336 today. A proposed correction should distinguish possible-written pages from exact completed stores: keep conservative overlap invalidation, but never let a page flag by itself establish complete byte coverage. Exact `StoreOwnBytes`/known fills must retain their existing coverage proof. No capability fallback or guard removal is proposed. Overlap search checked `StoredAllSince`, BDA coverage reports, #6346, #6868 and #6455; their currently published changes do not distinguish possible BDA page coverage from exact stored bytes. @SleglJan, this touches tracker proof semantics near your pending work; reporting the independent reproducer first to avoid overlapping implementation without coordination. No duplicate upstream PR has been opened. AI-assisted investigation and fixture: Codex; physical GPU runs and complete readback verified locally. No game code or assets attached. <!-- codex-bda-coverage-proposal-v1 --> ## Tested fork proposal [fe08b72de7631d50ee6c1472d8e35771802a4580](https://github.com/Amoenus/AnyPS5/commit/fe08b72de7631d50ee6c1472d8e35771802a4580), branch [codex/fix-bda-store-coverage-main667](https://github.com/Amoenus/AnyPS5/tree/codex/fix-bda-store-coverage-main667), separates possible-written driver pieces from complete ones. BDA written-page reports use the possible form; overlap checks still see them, while the full-coverage query excludes them. Exact `MarkWritten`/`StoreOwnBytes` callers retain their complete-store behavior. The candidate also tests an uncertain whole 64 KiB block, an exact dword (complete for its four bytes, incomplete for its page), and an exact page store (complete for its page). At this exact head, full relinker/library builds pass on Windows and Linux. Nine focused groups repeated three times on each verified RTX5080/AMD device give **54 passes, no skips**: wave32/wave64 coverage, depth fast clear, depth fast-clear submit, native depth clears/refusals, and 2/4/8-sample DCC clear controls. The formerly failing real-BDA cases now report `overlap=1 complete=0 next page overlap=0`, with exact 1 MiB readback. The native-depth fixture's separate selected-device lines also match each requested physical vendor. Every selected test stays under 30 seconds. Linux/lavapipe has **15 passes and 4 explicitly skipped cases** in the same selection: the two BDA coverage cases lose write watching, and 2-/8-sample DCC clear controls lack support. No Linux BDA correctness result is claimed. Cppcheck and selected clang-tidy checks parse all three changed translation units without selected diagnostics; conventions pass. Base remains main667. This is a proposal for review/coordination, not an upstream PR or a claim to unblock PPSA99902. The existing depth-clear fixtures pass, but a title-visible incorrect clear caused by this proof mismatch has not been demonstrated. Producer recognition, completed HTILE values and other existing refusals remain required. In particular, the effect on a legitimate full BDA-written HTILE clear needs an explicit end-to-end control before promotion; page bits cannot alone serve as exact-byte proof. #5336's resident color-DCC refusal is intentionally unchanged. The test-only branch above preserves the unchanged-main failing control. <!-- /codex-bda-coverage-proposal-v1 --> <!-- codex-bda-native-clear-result-v1 --> ## Full native BDA producer control: proposal regression confirmed A new test runs the existing recognized 17-word HTILE mask kernel through the normal recompiler/BDA dispatch path, using watched 1 MiB imports. It creates a native four-sample D32 owner for a 5x3 surface with zero-clear metadata, changes the clear value to one, notifies the recognized complete HTILE producer, dispatches all 32 workgroups, waits idle, and verifies the complete 32 KiB metadata range is `0xfffffff0` while the rest of its allocation remains zero. It then asks the native owner to reuse its sampled view and attachment. | Production code | Exact test head | RTX5080 | AMD Radeon Graphics | | --- | --- | --- | --- | | unchanged main667 | [739dd2e6253214fde3feef0af8b0f9cb657fc5f5](https://github.com/Amoenus/AnyPS5/commit/739dd2e6253214fde3feef0af8b0f9cb657fc5f5) | 3/3 accepted | 3/3 accepted | | fe08 proposal + identical test | [502daeda0acd2185020ebad6af48bd9276d022cc](https://github.com/Amoenus/AnyPS5/commit/502daeda0acd2185020ebad6af48bd9276d022cc) | 3/3 refused | 3/3 refused | Both sides pass the exact metadata/allocation readback, verify the physical device identity, and finish each case below one second. Main reports `complete=1` and accepts the clear. The proposal reports `complete=0`, then throws `native multisample depth clear has no complete tracked HTILE store`. No skip or timeout was counted. Drivers/OS are the same as the earlier table. The initial fixture setup was corrected before this matched comparison; its earlier warm-up initialization failure is excluded. Reproduction: build `agc_driver_bda_write_coverage_tests` on either linked branch and run `ctest --test-dir build -V -R "^agc_driver_bda_native_clear$" --timeout 30`. These are Windows target/dependency rebuilds on the exact heads; the prior full Windows/Linux builds remain evidence for fe08 itself, not a new full-build or Linux claim for these test additions. Conventions pass. This control checks completed native-owner acceptance plus GPU metadata readback; it does not add a numeric sampled-depth readback or a title/gameplay claim. **Why this matters:** `HtileDepthClearBytes_nid_no_patch` checks a known unconditional kernel and complete direct workgroup extent before the driver calls `NoteHtileDepthClear`. The native clear consumer relies on that producer restriction as well as completion/CPU/depth/value checks. Globally downgrading all BDA page records without replacing that producer's completion proof regresses an existing supported path. The earlier native-depth fixtures simulated completion with `StoreOwnBytes`, so their passes did not establish this preservation requirement. The original sparse-store finding establishes that page coverage cannot be used as a generic exact-byte proof. It does not by itself establish a bug in the restricted native consumer. Please keep the fe08 branch as investigation material; **no upstream PR or integration rollout of that proposal**. A complete correction must preserve this positive producer case as well as reject unproven sparse coverage. Coordinating here avoids interfering with #6346/#6868 or submitting a guard-removal workaround. AI-assisted fixture/analysis; no game code or assets attached. <!-- /codex-bda-native-clear-result-v1 --> <!-- codex-pr7233-same-value-partial-v1 --> **Historical f030 control:** the [maintained report](https://github.com/boykopovar/AnyPS5/pull/7233#issuecomment-6239238188) retains the accepted4-byte/32768-byte same-value partial-clear reproducer and unchanged-main refusal. The revised e7b6 callback no longer reproduces that acceptance in our current physical-GPU and lavapipe refusal matrices. This does not turn the historical f030 result into a title finding. <!-- /codex-pr7233-same-value-partial-v1 --> </details>
SleglJan commented 2026-10-17 17:31:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-17T17:31:17Z.


@Amoenus thanks for checking first. Neither #6868 nor #6346 changes how MarkWritten ranges count: BDA page ranges still become driver pieces that StoredAllSince treats as complete, so your fix doesn't duplicate either one. Go ahead.

One interaction with #6868: a new driver piece whose range contains older pieces' ranges now takes one of their slots and clears the others. If pieces get an exact/possible kind, a possible page range shouldn't take or clear the slot of an exact piece it contains, because that piece's completeness proof would be lost.

  • That fails closed, but StoredAllSince then answers false over a range the exact store did cover, and its one user, the native multisample depth clear check, refuses.
  • Never letting a possible piece replace anything doesn't work either: a possible range recorded again and again would refill the four slots, which is what #6868 fixes.
  • Letting a possible piece take only a possible piece's slot, or keeping the kinds in separate slots, avoids both.

Also: MarkDirectWrites passes whole writable buffer ranges to the same MarkWritten, so those ranges are possible ranges too. A kind added only in markWrittenPages leaves the same false proof for descriptor-bound sparse stores.

If your fix lands first, I'll rebase #6868 onto it. I can also run 007 First Light on it. That title hit #6868's case, through MarkDirectWrites ranges rather than BDA page flags.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6237674780 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7220#issuecomment-6237674780). Originally posted by [SleglJan](https://github.com/SleglJan) on 2026-10-17T17:31:17Z. --- @Amoenus thanks for checking first. Neither #6868 nor #6346 changes how MarkWritten ranges count: BDA page ranges still become driver pieces that StoredAllSince treats as complete, so your fix doesn't duplicate either one. Go ahead. One interaction with #6868: a new driver piece whose range contains older pieces' ranges now takes one of their slots and clears the others. If pieces get an exact/possible kind, a possible page range shouldn't take or clear the slot of an exact piece it contains, because that piece's completeness proof would be lost. - That fails closed, but StoredAllSince then answers false over a range the exact store did cover, and its one user, the native multisample depth clear check, refuses. - Never letting a possible piece replace anything doesn't work either: a possible range recorded again and again would refill the four slots, which is what #6868 fixes. - Letting a possible piece take only a possible piece's slot, or keeping the kinds in separate slots, avoids both. Also: MarkDirectWrites passes whole writable buffer ranges to the same MarkWritten, so those ranges are possible ranges too. A kind added only in `markWrittenPages` leaves the same false proof for descriptor-bound sparse stores. If your fix lands first, I'll rebase #6868 onto it. I can also run 007 First Light on it. That title hit #6868's case, through MarkDirectWrites ranges rather than BDA page flags. AI-assisted: yes (Claude Code)
Amoenus commented 2026-10-17 18:29:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T18:29:27Z.


@SleglJan noted the kind-aware slot reuse and the additional MarkDirectWrites producer. A further positive control changed the next step: main accepts the recognized full HTILE kernel3/3 on each GPU, while fe08 rejects it3/3 despite correct32KiB metadata readback. That first proposal is held; test-only #7228 preserves this missing GPU producer case. Exact control branches/results are now in the issue body.

A complete correction must cover both possible-range producers, preserve exact pieces when coalescing possible ranges, avoid exhausting slots on repeated possible stores, and retain a completion proof for legitimate full HTILE clears. That broader correction is not ready, and I have not claimed a new007 validation. I will link the next tested candidate here before coordinating its order with #6868.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238586300 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7220#issuecomment-6238586300). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T18:29:27Z. --- @SleglJan noted the kind-aware slot reuse and the additional `MarkDirectWrites` producer. A further positive control changed the next step: main accepts the recognized full HTILE kernel3/3 on each GPU, while fe08 rejects it3/3 despite correct32KiB metadata readback. That first proposal is held; test-only #7228 preserves this missing GPU producer case. Exact control branches/results are now in the issue body. A complete correction must cover both possible-range producers, preserve exact pieces when coalescing possible ranges, avoid exhausting slots on repeated possible stores, and retain a completion proof for legitimate full HTILE clears. That broader correction is not ready, and I have not claimed a new007 validation. I will link the next tested candidate here before coordinating its order with #6868.
MarcZX10 commented 2026-10-18 15:20:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T15:20:55Z.


Thanks for running the no-host-import control. Since the worker exits at the native-depth read refusal before attaching a completion, this control cannot isolate the write-watch import from the later check. That confirms the existing test harness needs the real driver-device import path (or a targeted production change) to validate the interaction; it does not yet validate a proposed fix. I agree the earlier candidate should remain held until the full-clear positive control and both possible-range producers are covered.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251608617 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7220#issuecomment-6251608617). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T15:20:55Z. --- Thanks for running the no-host-import control. Since the worker exits at the native-depth read refusal before attaching a completion, this control cannot isolate the write-watch import from the later check. That confirms the existing test harness needs the real driver-device import path (or a targeted production change) to validate the interaction; it does not yet validate a proposed fix. I agree the earlier candidate should remain held until the full-clear positive control and both possible-range producers are covered.
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#7220
No description provided.