Skip to content

Descriptors: textures picked by index are kept up to date where the heap has no write watch (VICTORY_HEAP_SYNC_MARKS) - #73

Open
UwUCammie wants to merge 1 commit into
borntofrag34:linux-winefrom
UwUCammie:gpu/heap-sync-marks
Open

UwUCammie wants to merge 1 commit into
borntofrag34:linux-winefrom
UwUCammie:gpu/heap-sync-marks

Conversation

@UwUCammie

@UwUCammie UwUCammie commented Nov 30, 2026 •

Copy link
Copy Markdown

With port 1 under Wine (VICTORY_PORT_CONSTANTS=1, VICTORY_PORT_HOME=1) the title's view heap lies in the private home pages. watch::track can't cover those, so Heap::written is None and sync_heaps skips the heap without saying anything (renderer port 2 ... 0 slots told ... 0.0 takings). A slot shaders pick by index then keeps what it showed before.

On my line that shows as all plants vanishing for a single frame now and then. At night the street lights behind them show for that frame, the exposure reacts and the picture pulses darker.

New version since the first one: it no longer makes every record. Of the slots port 2's marks tell (and the fallback's pages) it makes only those that hold a view of a texture object, or of an object that is gone, and that no draw's table read lately. That is 1,000-2,000 records a frame of about 127,000 marked. Slots of draws' tables are skipped before they are read. VICTORY_HEAP_SYNC_MARKS=all makes every record as the first version did, 0 leaves the heap out as before. A/B-able.

How I got to textures: every frame kept for 170 s from one save, one-frame outliers counted, all in diagnostics builds:

what is made frames gaps
nothing (as now) 7,860 10
non-views only 3,579 6
unordered views of textures only 3,370 2
shader views of textures only 3,303 0
all views of objects 3,075 0
everything 3,269 0
this version 11,070 0

Cost in a release build, same place, the submitting thread's wait for the sync: about 1 ms a frame, against 1.6-2.0 for texture records through the old path and 3-4 for everything. Frame rate 26.1 with it against 25.8 and 26.5 without (the other runs of that set were disturbed by other load).

Where it shows reliably for me: at night on the deck of Jason's house, standing still until the idle cameras start cycling. Trees across the water and the plants by the deck are in nearly every shot, and I get 1 to 1.5 frames in 1,000. It is a small part of the picture in most of them, so the pop watch's blip count in a moving town walk would drown it; I kept all frames (VICTORY_POP_ALL=1) and looked for blocks that differ from both neighbours while the neighbours agree.

@borntofrag34

borntofrag34 commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Tried on our RX 7900 GRE under Proton, in town (runs 389-390, two runs with VICTORY_AB=10,VICTORY_HEAP_SYNC_MARKS, the order reversed in the second; details in #66):

  • It works as described: renderer port 2 ... per frame goes from 0 slots told to ~85,000 a frame, and the fallback finds ~200 view records a frame that no store told of.
  • Cost here is much lower than on your line: +1.05 ms (se 0.27) and +0.88 ms (se 0.34) fitted on draws, about 4 %.
  • But the pop watch shows no change: blips in 4.19 % of frames without against 4.41 % with (8,887 and 8,807 frames). In the saved pictures, none of the blips is textures or plants going missing. They are cloud edges during camera turns, and one frame where the whole picture shifts a few pixels. Our walk is by day, so the night exposure pulse you describe is not exercised.

So we don't merge it for now. I'm leaving the PR open as a lead. If you have a place or time of day where the gap shows reliably, we can run it there.

… 2's marks where the write watch has no tracker (VICTORY_HEAP_SYNC_MARKS=0: not)

Under Wine with port 1 the title's view heap has no watch tracker and the sync
passed it over: a slot shaders pick by index kept what it showed before. All
plants were missing for a frame, 1.3 frames in 1,000, and at night the exposure
then pulsed. Of the marked slots only those that hold a texture view no draw's
table read lately are made, 1,000-2,000 a frame of 127,000: 1 ms of waiting a
frame in a release build (all of them: 3-4).
@UwUCammie UwUCammie changed the title Descriptors: opt-in VICTORY_HEAP_SYNC_MARKS for heaps the write watch has no tracker for Descriptors: textures picked by index are kept up to date where the heap has no write watch (VICTORY_HEAP_SYNC_MARKS) Nov 30, 2026
@UwUCammie

Copy link
Copy Markdown
Author

Thanks for running it. I've pushed a different version: it makes only the texture views picked by index, which is what the gap turned out to be about, and skips the draws' own tables before reading them. The description has the counts per kind of record and the cost.

It makes sense that the town walk by day didn't show it. The gap is one frame, mostly small, and between camera turns it disappears in the noise. The place that gives it every time here is in the description (Jason's deck at night, idle cameras), with how I count it. If you can't see it there either, I'd be curious whether your line differs from mine somewhere else, since the 0 slots told are the same on both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants