Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
One potential confound for the mode-1 experiment at A small synthetic predicate model of 1,632 inherited-write/sample combinations gave 256 same-frame misclassifications; propagating the source's write-frame stamp in that model eliminated them. No Vulkan/game execution was involved. For the diagnostic, it may help to log the zero sentinel explicitly and propagate write-frame provenance alongside the inherited modification tick (including alias synchronization), so mode 1 doesn't accidentally include the same-frame render targets it is intended to exclude. |
A joined or alias-synchronized image took the source's modification tick but kept last_written_frame 0, so EDEN_NX2_OOT_STALE_WRITEBACK=1 counted its same-frame contents as sampled after their write and logged an underflowed frame. Take the source's write frame there, and require a known write frame. Reported by RomainROCH on #2660. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Confirmed and fixed in 62c9dea. Both On build 428 (c33e435) the bug could only widen mode 1. Joined or alias-synced images were written back even when they were written and sampled in the same frame. So that build's visual result still stands, and its FPS cost is a worst case for mode 1. No new test build is planned for this. |
…review EDEN_NX2_OOT_STALE_WRITEBACK=1 writes back the BadOverlap images the collector drops that a later frame sampled after their last write; =2 puts Ocarina in the WritebackDefault set. Off by default. Refs #2056. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A joined or alias-synchronized image took the source's modification tick but kept last_written_frame 0, so EDEN_NX2_OOT_STALE_WRITEBACK=1 counted its same-frame contents as sampled after their write and logged an underflowed frame. Take the source's write frame there, and require a known write frame. Reported by RomainROCH on #2660. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
62c9dea to
e5c09fc
Compare
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # src/video_core/texture_cache/image_base.h
Test build for #2056 (Ocarina of Time pause-menu item preview shows coloured noise). Both new behaviours are behind
EDEN_NX2_OOT_STALE_WRITEBACK, apply only to Ocarina of Time (0400486024DEC000), and are off when the variable is unset. Refs #2056.Evidence. In four Intel Iris Xe Ctrl+F12 bundles (builds 386 and 411), the item preview is a 1120x1333 B10G11R11_FLOAT texture. One draw in the UI pass samples it, and nothing in the frame renders it. Its contents are fragments of other images plus NaN and Inf texels, which is recycled host memory. That matches the collector dropping a GPU-written BadOverlap image without a write-back and then making a new image over the stale pages with no upload. Ocarina is kept out of
WritebackDefaultfor performance (#2038, #818). This test build has not yet confirmed that the preview takes the stale-skip path. A bundle withEDEN_NX2_TC_TRACE=1will show it.Switch.
EDEN_NX2_OOT_STALE_WRITEBACK=1: the collector writes back only the BadOverlap images a later frame sampled after their last write. Each image now records the frame of its last GPU write (MarkModification) and of its last read preparation (PrepareImagewithout modification). Contents joined or alias-synchronized from other images carry the source's write frame, and an image with no known write frame is never written back. Render targets a frame writes and reads within that same frame stay excluded. Build 428 predates the write-frame carry, so in its mode 1 joined images could be written back too. Writes go through the existing async overlap-download path. The first 8 of every 256 log anOoT stale write-backline.EDEN_NX2_OOT_STALE_WRITEBACK=2: Ocarina gets the fullWritebackDefaultset (collector and join write-backs, stale-page uploads), as texture_cache: turn on overlap write-backs and stale uploads for Kirby NS2E #2452 gave Kirby NS2E. Mode 2 is Vulkan only, matching texture_cache: write back dropped GPU-written overlaps in Fire Emblem #2206's Fortune's Weave gate; mode 1 runs on the same staging-map path texture_cache: turn on overlap write-backs and stale uploads for Kirby NS2E #2452 uses and is inert on OpenGL.Checks. The
[writeback]tests add parsing cases and still requireWritebackDefault(0x0400486024DEC000, backend)to be false on every backend. The switch header passes-fsyntax-only -Wall -Werroron x86_64. The branch was rebased onto nx2 after #2206 landed, soWritebackDefaultkeeps its per-backend signature and Fortune's Weave stays on. The full aarch64 and macOS arm64 compile comes from this branch's release-binaries run.