Skip to content

Ignore Wine/Proton shader caches (vkd3d-proton, DXVK) - #220

Closed
SkippySteve wants to merge 1 commit into
Marvisak:mainfrom
SkippySteve:chore/gitignore-vkd3d-cache
Closed

SkippySteve wants to merge 1 commit into
Marvisak:mainfrom
SkippySteve:chore/gitignore-vkd3d-cache

Conversation

@SkippySteve

Copy link
Copy Markdown

Running VIctory under Wine/Proton from a checkout leaves vkd3d-proton / DXVK shader caches in the working directory. Because cargo xtask policy checks untracked-but-not-ignored files too (git ls-files --others --exclude-standard), a stray vkd3d-proton.cache makes the policy check (and the pre-commit hook) fail:

POLICY: vkd3d-proton.cache: file type not on the allowlist
POLICY: vkd3d-proton.cache: binary content (NUL bytes)

Change

  • .gitignore: ignore vkd3d-proton.cache, vkd3d-proton.cache.write, vkd3d_shader_cache/, *.dxvk-cache, next to the other derived-data entries.
  • docs/asset-policy.md: one paragraph under "Where data lives" noting these are derived data and how to redirect them (VKD3D_SHADER_CACHE_PATH, DXVK_STATE_CACHE_PATH).

Testing

  • With dummy binary vkd3d-proton.cache before the change: cargo xtask policy fails as above.
  • After the change, with dummy vkd3d-proton.cache, vkd3d-proton.cache.write, x.dxvk-cache and vkd3d_shader_cache/a present: cargo xtask policy → asset policy: 151 files ok, and git status shows none of them.

No assets or binaries added.

@SkippySteve

Copy link
Copy Markdown
Author

Folded into #149 (same commit cherry-picked onto docs/linux-proton). Closing as superseded.

muhammed-aksoy pushed a commit to muhammed-aksoy/VIctory that referenced this pull request Nov 24, 2026
1bugproof pushed a commit to 1984742628/VIctory that referenced this pull request Nov 24, 2026
…cutions, and the clamp charges the budget once per group (port of fork Marvisak#220)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Callimann8 pushed a commit to Callimann8/VIctory-fork that referenced this pull request Nov 25, 2026
…c, draw-table slots left to their draws, no failing write-watch calls; card fetches inside their flights (off by default)

- Descriptor sync: a multiply-and-fold fingerprint of a record in place of
  BLAKE3 (35 to 42 ms a frame over 250,000 to 300,000 records), and slots
  that draws read through tables lately are left to their draws
  (VICTORY_HEAP_SYNC_TABLES=1 mirrors them too): the pass over the heap
  went from 70-220 ms a frame to about 3.
- Write watch: no kernel asking for memory the guards already hold as view
  memory (pull request Marvisak#670 by Jonirulah).
- Card copies' flagged pieces can come down inside their own flights
  (pull request Marvisak#648 by Jonirulah; VICTORY_CARD_FETCH_INFLIGHT=1, off by
  default). One game run with it on: no device loss, the copy-back
  thread's fetch wait 181 -> 0 ms a frame, the card busier; no frame-time
  gain claimed.
- Logging: the heap pass's texture part and buffer slots; indirect compute
  dispatches over 65,535 groups.
- README: what was measured, and that pull request Marvisak#220 with
  VICTORY_INDIRECT_WINDOW=1 lost the device twice here and is not in.

One five-minute game run of this tree's source on an RTX 4070: no device
loss; the frame is still 250 to 380 ms (the card is the limit). This
merged tree was built; its test suites were not run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
PastiiJay pushed a commit to PastiiJay/klbf-lab-beta that referenced this pull request Nov 25, 2026
…c, draw-table slots left to their draws, no failing write-watch calls; card fetches inside their flights (off by default)

- Descriptor sync: a multiply-and-fold fingerprint of a record in place of
  BLAKE3 (35 to 42 ms a frame over 250,000 to 300,000 records), and slots
  that draws read through tables lately are left to their draws
  (VICTORY_HEAP_SYNC_TABLES=1 mirrors them too): the pass over the heap
  went from 70-220 ms a frame to about 3.
- Write watch: no kernel asking for memory the guards already hold as view
  memory (pull request Marvisak#670 by Jonirulah).
- Card copies' flagged pieces can come down inside their own flights
  (pull request Marvisak#648 by Jonirulah; VICTORY_CARD_FETCH_INFLIGHT=1, off by
  default). One game run with it on: no device loss, the copy-back
  thread's fetch wait 181 -> 0 ms a frame, the card busier; no frame-time
  gain claimed.
- Logging: the heap pass's texture part and buffer slots; indirect compute
  dispatches over 65,535 groups.
- README: what was measured, and that pull request Marvisak#220 with
  VICTORY_INDIRECT_WINDOW=1 lost the device twice here and is not in.

One five-minute game run of this tree's source on an RTX 4070: no device
loss; the frame is still 250 to 380 ms (the card is the limit). This
merged tree was built; its test suites were not run.
gmankab pushed a commit to gmankab/victory that referenced this pull request Nov 25, 2026
…queue for fetches, indirect draw windows made safer, a profiler; all behind switches

- VICTORY_ASYNC_SUBMIT=1: submissions are prepared and sent by a thread of
  the layer, in order, instead of by the title's render thread; the
  queue's line stays open while its head is prepared.
- VICTORY_QUEUE2=1: fetches of what shaders wrote to copies in the card's
  memory go to a copy queue, with the fix for a piece fetched beside a
  later flight (fetched again when that flight lands).
- Pull request Marvisak#220 (cheaper indirect draws) is in, its windows off by
  default; a draw record of 2^23 vertices an instance or more runs empty
  (its window checker found one list drawing 90 such records).
- Fills of upload memory and read-only title buffer copies no longer wait
  for flights; each is checked against what the flights then wrote, and
  the first mismatch turns the waiting back on (VICTORY_FILL_WAIT=1).
- Up to 512 idle host lists and the texture staging buffers are reused.
- VICTORY_MERGE_GAP / VICTORY_MERGE_RUNS (off / 512 by default; the gap
  form is not exact, see its comment).
- VICTORY_PROFILE=1 (diagnostics builds): a sampling profiler inside the
  layer.
- README: what was measured, the history of the device losses with
  windows, and what is still open (frame rate dips; cause not known).

Measured on an RTX 4070 in the first room: about 3.5-4 frames a second
before, 6-7 with all the switches, defaults about 4.5-5. Five runs with
windows on since the fix, no device loss. This merged tree was built; its
whole test suite was not run (the tests around flights, queues, indirect
draws and the copy queue were, on the development tree).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
iLucasRT pushed a commit to iLucasRT/VInAMD that referenced this pull request Nov 26, 2026
The clamp charged the list's budget record by record: an atomic read and
a compare-and-swap loop per record on one word, every thread of a window
racing for it, so a group of n records took n rounds and about n*n/2
atomics. The word is CPU-visible memory (zeroed on the CPU at
submission), so on a card of its own each of them crosses the bus. On an
RTX 5070 Ti the benchmark's windows of 32 took 46-50 ms for 3,200 draws
where draws clamped one at a time took 19 ms (Marvisak#220).

Now the records' costs go to group-shared memory, one thread charges
their sum with one compare-and-swap (retried only if another group got
there first), simulating the same saturation record by record in lane
order, and every thread reads whether its record fitted. The mesh
diagnostics (largest group count asked, groups asked in all) are summed
in the group and added once. What a record costs and when it runs empty
are unchanged; which records of a group fit is now their lane order
instead of the order the GPU served the race.

Test: a group with 300 left of the budget keeps its first draw (100),
empties the second (250, which takes the rest) and the ones after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iLucasRT pushed a commit to iLucasRT/VInAMD that referenced this pull request Nov 26, 2026
… all

An execution may ask for thousands of records with a count buffer that
counts a few: the clamp runs a group per 64 asked. Before the charge per
group, the threads past the count returned at once; with it, the first
thread of every group read the budget word, and for mesh records added
the group's notes to it, records or none. In memory the CPU maps that is
up to three atomics across the bus per empty group (on an RTX 5070 an
in-game A/B of 32c6229 ran slower, Marvisak#220). Now a group without records
makes no atomic; the group's barriers stay in uniform control flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant