Mirror copied descriptors from the fingerprinted record #792

Open
yualk wants to merge 2 commits from upstream-pr/792 into main
yualk commented 2026-11-25 07:41:50 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by yualk on 2026-11-25T07:41:50Z.


Defect

HostHeap::mirror_copied fingerprints captured record bytes, then rereads the live guest slot through mirror. If the live record changes A→B between those operations, it caches fingerprint A while installing B. When A later reappears, deduplication suppresses the repair.

Fix

Decode the same immutable 12-byte header that was fingerprinted and pass it to the existing mirror_record path. Ordinary API-driven mirroring is unchanged.

Reproduction

The test interns valid point-clamp A and point-wrap B records, captures A while the live slot contains B, and consumes the published sampler in a fenced D3D12 shader. A 2×1 texture contains independent bytes [17, 231]; the shader also reads a stable clamp and a same-shaped wrap decoy.

  • Parent: [17, 231, 61] — changed slot incorrectly samples wrap B.
  • Fixed, RTX 5070 Ti: [231, 231, 61].
  • Fixed, WARP: [231, 231, 61].

The direct list retires, the fence completes, and device status remains valid before UAV readback. Existing copied-view/cap/stable controls also pass.

Limits

This proves captured bytes → installed descriptor → GPU-consumed sampler value in the owned fixture. It does not claim that a specific title draw reaches a byte-copied sampler or that it fixes lighting/gameplay by itself.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6599669711 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/792). Originally posted by [yualk](https://github.com/yualk) on 2026-11-25T07:41:50Z. --- ## Defect `HostHeap::mirror_copied` fingerprints captured record bytes, then rereads the live guest slot through `mirror`. If the live record changes A→B between those operations, it caches fingerprint A while installing B. When A later reappears, deduplication suppresses the repair. ## Fix Decode the same immutable 12-byte header that was fingerprinted and pass it to the existing `mirror_record` path. Ordinary API-driven mirroring is unchanged. ## Reproduction The test interns valid point-clamp A and point-wrap B records, captures A while the live slot contains B, and consumes the published sampler in a fenced D3D12 shader. A 2×1 texture contains independent bytes `[17, 231]`; the shader also reads a stable clamp and a same-shaped wrap decoy. - Parent: `[17, 231, 61]` — changed slot incorrectly samples wrap B. - Fixed, RTX 5070 Ti: `[231, 231, 61]`. - Fixed, WARP: `[231, 231, 61]`. The direct list retires, the fence completes, and device status remains valid before UAV readback. Existing copied-view/cap/stable controls also pass. ## Limits This proves captured bytes → installed descriptor → GPU-consumed sampler value in the owned fixture. It does not claim that a specific title draw reaches a byte-copied sampler or that it fixes lighting/gameplay by itself.
iGoldenNinja commented 2026-11-25 08:09:06 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by iGoldenNinja on 2026-11-25T07:57:57Z.


Independent RTX 5080 hardware check, NVIDIA 617.14, Windows 11 Pro 25H2 build 26200.9974, Ryzen 9 5900X. I copied only this PR's two synthetic sampler fixtures and HLSL file onto parent 9376fd6 and compared it with clean head 7793886.

  • The parent failed both assertions. Its fenced shader readback was [17, 231, 61].
  • The PR head passed both assertions and returned [231, 231, 61].

This reproduces the changed sampler value on the RTX 5080 with the stable clamp and decoy outputs agreeing. Test scope and pinned revisions. OpenAI Codex (GPT-6) ran the tests and drafted this report.

Gameplay follow-up on the same hardware. Both builds used the same local archive and replay support and byte-matched warm caches, with default readback. Both reached the first controllable prison room and finished a matched 90-second route. Parent 9376fd6 displayed 322 application frames at 3.56 FPS and 470.38 ms P99. PR head 7793886 displayed 320 at 3.54 FPS and 493.93 ms P99. Both refused the same eight D3D12 pipelines (E_INVALIDARG), with no logged device removal. The matched view still showed the sharp room lighting boundary and stepped character edges. This was one run per build, with no live instrumentation for the descriptor mismatch. Full comparison

<!-- greyfinch-sync:fxceless/victory-fork:comment:7156451156 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/792#issuecomment-7156451156). Originally posted by [iGoldenNinja](https://github.com/iGoldenNinja) on 2026-11-25T07:57:57Z. --- Independent RTX 5080 hardware check, NVIDIA 617.14, Windows 11 Pro 25H2 build 26200.9974, Ryzen 9 5900X. I copied only this PR's two synthetic sampler fixtures and HLSL file onto parent `9376fd6` and compared it with clean head `7793886`. - The parent failed both assertions. Its fenced shader readback was `[17, 231, 61]`. - The PR head passed both assertions and returned `[231, 231, 61]`. This reproduces the changed sampler value on the RTX 5080 with the stable clamp and decoy outputs agreeing. [Test scope and pinned revisions](https://github.com/iGoldenNinja/victory-fork/blob/3f03966e6997c938dd4a7cd7e5760dbeca8fd116/docs/nvidia-pr792-5080.md). OpenAI Codex (GPT-6) ran the tests and drafted this report. **Gameplay follow-up on the same hardware.** Both builds used the same local archive and replay support and byte-matched warm caches, with default readback. Both reached the first controllable prison room and finished a matched 90-second route. Parent `9376fd6` displayed 322 application frames at 3.56 FPS and 470.38 ms P99. PR head `7793886` displayed 320 at 3.54 FPS and 493.93 ms P99. Both refused the same eight D3D12 pipelines (`E_INVALIDARG`), with no logged device removal. The matched view still showed the sharp room lighting boundary and stepped character edges. This was one run per build, with no live instrumentation for the descriptor mismatch. [Full comparison](https://github.com/iGoldenNinja/victory-fork/blob/dc5668930e24c7b4c70515b06604c5960bcaa8ad/docs/nvidia-pr792-5080.md)
ArturoWolff commented 2026-11-25 10:11:09 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ArturoWolff on 2026-11-25T09:13:10Z.


Reproduced yualk’s sampler result on Linux without game assets or a physical GPU (GE-Proton11-14, Mesa llvmpipe 26.3.1). Same two tests, same shader binary, same prefix and adapter:

Descriptor implementation Fenced readback: changed / clamp / decoy Tests
Parent 9376fd6 + PR fixtures 17 / 231 / 61 both failed their expected-value assertions
PR 7793886 231 / 231 / 61 both passed

For anyone repeating this on llvmpipe: the unmodified test binary stopped at D3D12 host/heap setup. Requesting feature level 11_0 in the test host only got the record test through, but CreateRootSignature still returned 0x80004005 on the cs_5_1 path. For the comparison above, both builds used that same test-host change and the PR’s unchanged HLSL precompiled via DXC (-T cs_6_0 -E main, SHA-256 422709d38d1b2b66b4b32dda6ac80ea2fbfedeaabb06e8b2ffd20a44962aff97). No changes to either revision’s descriptor implementation. Only the changed slot flipped, matching the Windows results above. This checks the sampler after dispatch, not a retail draw, lighting, or frame time.

AI disclosure: Hermes Agent ran the Linux comparison and wrote this comment for ArturoWolff.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7158034467 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/792#issuecomment-7158034467). Originally posted by [ArturoWolff](https://github.com/ArturoWolff) on 2026-11-25T09:13:10Z. --- Reproduced yualk’s sampler result on Linux without game assets or a physical GPU (GE-Proton11-14, Mesa llvmpipe 26.3.1). Same two tests, same shader binary, same prefix and adapter: | Descriptor implementation | Fenced readback: changed / clamp / decoy | Tests | |---|---|---| | Parent `9376fd6` + PR fixtures | `17 / 231 / 61` | both failed their expected-value assertions | | PR `7793886` | `231 / 231 / 61` | both passed | For anyone repeating this on llvmpipe: the unmodified test binary stopped at D3D12 host/heap setup. Requesting feature level 11_0 in the **test host only** got the record test through, but `CreateRootSignature` still returned `0x80004005` on the `cs_5_1` path. For the comparison above, both builds used that same test-host change and the PR’s unchanged HLSL precompiled via DXC (`-T cs_6_0 -E main`, SHA-256 `422709d38d1b2b66b4b32dda6ac80ea2fbfedeaabb06e8b2ffd20a44962aff97`). No changes to either revision’s descriptor implementation. Only the changed slot flipped, matching the Windows results above. This checks the sampler after dispatch, not a retail draw, lighting, or frame time. AI disclosure: Hermes Agent ran the Linux comparison and wrote this comment for ArturoWolff.
timorjay commented 2026-11-25 16:12:55 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by timorjay on 2026-11-25T16:12:00Z.


Downstream hardware check on an RTX 5090 D v2 (24 GB, NVIDIA 617.42), in an offline Windows 11 Sandbox. Flamingo 229a052c also has a batched mirror_copied_page path. I adapted yualk’s test so its changed sampler goes through that path, and ran the same two synthetic tests and HLSL against both builds.

Build Changed sampler Direct clamp control Second texture control
Flamingo 229a052c, tests added 17 231 61
Same revision, using the captured record in both copy paths 231 231 61

The first texture contains 17 and 231. The copied record specifies clamp, while the live slot has changed to wrap. The GPU readback distinguishes the two. The descriptor test also failed on the original and passed on the patched build. All three GPU values were read after the fence completed.

For forks carrying the batched path, it needs to use the same captured header as the fingerprint, just like the single-record path in this PR. In two views of the same in-game checkpoint I saw no FPS gain from the change. Thanks for supplying the original fixture and fix.

AI-assisted with Codex.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167680248 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/792#issuecomment-7167680248). Originally posted by [timorjay](https://github.com/timorjay) on 2026-11-25T16:12:00Z. --- Downstream hardware check on an RTX 5090 D v2 (24 GB, NVIDIA 617.42), in an offline Windows 11 Sandbox. Flamingo `229a052c` also has a batched `mirror_copied_page` path. I adapted yualk’s test so its changed sampler goes through that path, and ran the same two synthetic tests and HLSL against both builds. | Build | Changed sampler | Direct clamp control | Second texture control | | --- | ---: | ---: | ---: | | Flamingo `229a052c`, tests added | 17 | 231 | 61 | | Same revision, using the captured record in both copy paths | 231 | 231 | 61 | The first texture contains 17 and 231. The copied record specifies clamp, while the live slot has changed to wrap. The GPU readback distinguishes the two. The descriptor test also failed on the original and passed on the patched build. All three GPU values were read after the fence completed. For forks carrying the batched path, it needs to use the same captured header as the fingerprint, just like the single-record path in this PR. In two views of the same in-game checkpoint I saw no FPS gain from the change. Thanks for supplying the original fixture and fix. AI-assisted with Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/792:upstream-pr/792'
git switch 'upstream-pr/792'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/792'
git switch 'upstream-pr/792'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/792'
git switch 'upstream-pr/792'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/792'
git switch 'main'
git merge --squash 'upstream-pr/792'
git switch 'main'
git merge --ff-only 'upstream-pr/792'
git switch 'main'
git merge 'upstream-pr/792'
git push origin 'main'
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
fxceless/victory-fork!792
No description provided.