Possible improvment using commit from victory-nvidia #10

Open
opened 2026-12-02 12:38:30 +00:00 by github-bot · 3 comments
Owner

@⁠RC6Code on GitHub · 2026-11-29 01:10 UTC · original

Hey,

I found an improvement of about 6.5ms (105ms to 99ms) in a scene by applying a version of this commit that can also be ported over to Victory-Lite: github.com/asdaasdsaddf/VIctory-NVIDIA@2ad55e6

I think it might interest you

**@⁠RC6Code** on GitHub · 2026-11-29 01:10 UTC · [original](https://github.com/vix0e0e/VIctory-LITE/issues/10) Hey, I found an improvement of about 6.5ms (105ms to 99ms) in a scene by applying a version of this commit that can also be ported over to Victory-Lite: https://github.com/asdaasdsaddf/VIctory-NVIDIA/commit/2ad55e6 I think it might interest you
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 12:38:30 +00:00
Author
Owner

@⁠crissuper20 on GitHub · 2026-11-29 09:07 UTC · original

Two more ports that helped here, both measured on Linux (Proton). Posting in case they're useful for LITE:

Setup: LITE be4eeeb (diag), GTX 1650 4 GB, i5-4690 (turbo 3.7 GHz), 16 GB, Arch/CachyOS, NVIDIA 620.70, Proton Experimental 11 (umu), Series S, the Play-4GB-VRAM settings.

1. VIctory-NVIDIA #1601 (placeholders under Wine). Wine answers NtQueryVirtualMemory(MemoryRegionInformationEx) with STATUS_INVALID_INFO_CLASS, so placeholder() is always false and every asking re-asks about every hole. Here that was ~6,000 "questions about holes" per frame. The PR applies to LITE's watch.rs/xmem.rs with offsets (only the lib.rs export list needs a hand edit). After it: 0 per frame.

2. Skipped pipelines are left out of building too. On this driver a few compute shaders hang NVIDIA's compiler or overflow the build thread's stack (thread 'victory-pipelines-N' has overflowed its stack, three times in the first minute). With the workers gone, every frame waits the whole VICTORY_PIPELINE_WAIT_MS (2.5-8 s frames, ~1,700 draws dropped as "being made"). VICTORY_SKIP_PIPELINES only guarded 3 of the ~12 host_pipeline() call sites in draw.rs, so the skipped shaders were still built through the others. Checking the skip list in make::left_out() covers all of them: 0 overflows since.

Result (same save, same settings, warm caches; the street scene of the save, 600-1000 s):

median p25 best
be4eeeb 474 ms 271 ms 108 ms
be4eeeb + both 114 ms 100 ms 87 ms

A heavier later scene (4,500 draws) stays at ~500 ms; there the time goes to list recording on 4 cores, not to these.

Also needed under Proton: native d3dcompiler_47 in the prefix (winetricks), otherwise the two-plane composer fails every frame (Wine's compiler drops [RootSignature]; VIctory-NVIDIA #925 is the code fix).

Happy to share the diff (~80 lines) if you want it.

**@⁠crissuper20** on GitHub · 2026-11-29 09:07 UTC · [original](https://github.com/vix0e0e/VIctory-LITE/issues/10#issuecomment-7253554825) Two more ports that helped here, both measured on Linux (Proton). Posting in case they're useful for LITE: **Setup:** LITE be4eeeb (diag), GTX 1650 4 GB, i5-4690 (turbo 3.7 GHz), 16 GB, Arch/CachyOS, NVIDIA 620.70, Proton Experimental 11 (umu), Series S, the Play-4GB-VRAM settings. **1. VIctory-NVIDIA #1601 (placeholders under Wine).** Wine answers `NtQueryVirtualMemory(MemoryRegionInformationEx)` with `STATUS_INVALID_INFO_CLASS`, so `placeholder()` is always false and every asking re-asks about every hole. Here that was ~6,000 "questions about holes" per frame. The PR applies to LITE's `watch.rs`/`xmem.rs` with offsets (only the `lib.rs` export list needs a hand edit). After it: 0 per frame. **2. Skipped pipelines are left out of building too.** On this driver a few compute shaders hang NVIDIA's compiler or overflow the build thread's stack (`thread 'victory-pipelines-N' has overflowed its stack`, three times in the first minute). With the workers gone, every frame waits the whole `VICTORY_PIPELINE_WAIT_MS` (2.5-8 s frames, ~1,700 draws dropped as "being made"). `VICTORY_SKIP_PIPELINES` only guarded 3 of the ~12 `host_pipeline()` call sites in `draw.rs`, so the skipped shaders were still built through the others. Checking the skip list in `make::left_out()` covers all of them: 0 overflows since. **Result** (same save, same settings, warm caches; the street scene of the save, 600-1000 s): | | median | p25 | best | |---|---|---|---| | be4eeeb | 474 ms | 271 ms | 108 ms | | be4eeeb + both | **114 ms** | **100 ms** | **87 ms** | A heavier later scene (4,500 draws) stays at ~500 ms; there the time goes to list recording on 4 cores, not to these. Also needed under Proton: native `d3dcompiler_47` in the prefix (winetricks), otherwise the two-plane composer fails every frame (Wine's compiler drops `[RootSignature]`; VIctory-NVIDIA #925 is the code fix). Happy to share the diff (~80 lines) if you want it.
Author
Owner

@⁠crissuper20 on GitHub · 2026-11-29 17:25 UTC · original

A correction to my numbers above. They came from a diagnostics build with VICTORY_D3D12_DRED=1, which was a default in my bench script, not in LITE. With DRED on, each recorded command gets a text marker and a timestamp. Here that was 87% of the list recording time (notes in the "recording per frame" log line: 3,364 of 3,885 ms per frame).

Here are the same machine, save and settings again, compared at equal draw counts. I'm comparing by draw count because the scene drifts between runs, so time windows don't line up.

draws/frame diag + DRED=1 diag + DRED=0 release build
600-1,200 117-142 ms 73 ms 70 ms
4,000-6,000 513-516 ms 193 ms 173 ms (2 runs)

The release build also kept swap under 100 MB, against 1-3 GB with the diagnostics build.

The relative results above still hold. They were all measured with DRED on: the two ports, and native d3dcompiler_47. If you benchmark with a diagnostics build, set VICTORY_D3D12_DRED=0 unless you're chasing a device-removed error.

**@⁠crissuper20** on GitHub · 2026-11-29 17:25 UTC · [original](https://github.com/vix0e0e/VIctory-LITE/issues/10#issuecomment-7259684627) A correction to my numbers above. They came from a **diagnostics build with `VICTORY_D3D12_DRED=1`**, which was a default in my bench script, not in LITE. With DRED on, each recorded command gets a text marker and a timestamp. Here that was 87% of the list recording time (`notes` in the "recording per frame" log line: 3,364 of 3,885 ms per frame). Here are the same machine, save and settings again, compared at equal draw counts. I'm comparing by draw count because the scene drifts between runs, so time windows don't line up. | draws/frame | diag + DRED=1 | diag + DRED=0 | release build | |---|---|---|---| | 600-1,200 | 117-142 ms | 73 ms | 70 ms | | 4,000-6,000 | 513-516 ms | 193 ms | 173 ms (2 runs) | The release build also kept swap under 100 MB, against 1-3 GB with the diagnostics build. The relative results above still hold. They were all measured with DRED on: the two ports, and native `d3dcompiler_47`. If you benchmark with a diagnostics build, set `VICTORY_D3D12_DRED=0` unless you're chasing a device-removed error.
Author
Owner

@⁠crissuper20 on GitHub · 2026-11-30 13:48 UTC · original

Two more Linux findings, same machine as above (GTX 1650 4 GB, i5-4690 4 cores, Proton Experimental 11, release build, compared at equal draw counts):

1. The wineserver's view list (Wine bug 60868) is the biggest single cost under Proton. During heavy frames the wineserver took 12-15% of all CPU, almost all of it in is_valid_view_addr and req_unmap_view (perf). It walks every mapped view on each map and unmap, and the title keeps tens of thousands of them. I built only the wineserver from Valve's Wine at the installed Proton commit, patched to keep views in a tree (same approach as upstream Wine 3217449b; I used the patch pinned in VIctory-NVIDIA #3367, after reading it). Then I pointed PROTONPATH at a folder of links next to the installed Proton.

draws/frame stock Proton (warm caches) view-tree wineserver (2 runs)
3,000-4,000 150 ms 128-138 ms
4,000-6,000 161 ms 133-136 ms

So heavy frames are about 16% faster (6.2 → 7.4 fps).

2. LITE main never keeps pipelines under Proton. pipeline/library.rs makes the empty library with make(&[]). vkd3d-proton refuses a zero-length blob with a non-null pointer (if (!blob_length && blob) return E_INVALIDARG; in cache.c), and a Rust empty slice's pointer is never null. So every Linux run logs no host pipeline library: pipelines are not kept. VIctory-NVIDIA fixed this in d9377769 (null pointer when the blob is empty). Without a rebuild, VKD3D_CONFIG=pipeline_library_ignore_mismatch_driver works when an old or Windows host-pipelines.bin is present.

3. The scx_lavd scheduler (sched-ext, CachyOS scx-scheds) on top of the view-tree wineserver gave 122-124 ms at 4,000-6,000 draws over 2 runs. Ten other runs that night landed at 132-140 ms, so that's about −10% on a 4-core CPU without hyperthreading.

What didn't help here, for anyone testing the same things:

  • No gain: RLIMIT_NICE 30 (so Wine applies thread priorities), VICTORY_MAP_THREADS=1, VICTORY_GUARD_REST=10000, VICTORY_LAND_THREADS=2, VICTORY_PANEL=0, VICTORY_CARD_ALL=1, zswap off.
  • Inconclusive: VICTORY_CARD_BUFFERS_MB=512, and mitigations=off.
  • Already on: ntsync, in Proton Experimental 11.
**@⁠crissuper20** on GitHub · 2026-11-30 13:48 UTC · [original](https://github.com/vix0e0e/VIctory-LITE/issues/10#issuecomment-7280389256) Two more Linux findings, same machine as above (GTX 1650 4 GB, i5-4690 4 cores, Proton Experimental 11, release build, compared at equal draw counts): **1. The wineserver's view list (Wine bug 60868) is the biggest single cost under Proton.** During heavy frames the wineserver took 12-15% of all CPU, almost all of it in `is_valid_view_addr` and `req_unmap_view` (`perf`). It walks every mapped view on each map and unmap, and the title keeps tens of thousands of them. I built only the wineserver from Valve's Wine at the installed Proton commit, patched to keep views in a tree (same approach as upstream Wine 3217449b; I used the patch pinned in VIctory-NVIDIA #3367, after reading it). Then I pointed `PROTONPATH` at a folder of links next to the installed Proton. | draws/frame | stock Proton (warm caches) | view-tree wineserver (2 runs) | |---|---|---| | 3,000-4,000 | 150 ms | 128-138 ms | | 4,000-6,000 | 161 ms | 133-136 ms | So heavy frames are about 16% faster (6.2 → 7.4 fps). **2. LITE main never keeps pipelines under Proton.** `pipeline/library.rs` makes the empty library with `make(&[])`. vkd3d-proton refuses a zero-length blob with a non-null pointer (`if (!blob_length && blob) return E_INVALIDARG;` in `cache.c`), and a Rust empty slice's pointer is never null. So every Linux run logs `no host pipeline library: pipelines are not kept`. VIctory-NVIDIA fixed this in d9377769 (null pointer when the blob is empty). Without a rebuild, `VKD3D_CONFIG=pipeline_library_ignore_mismatch_driver` works when an old or Windows `host-pipelines.bin` is present. **3. The `scx_lavd` scheduler (sched-ext, CachyOS `scx-scheds`) on top of the view-tree wineserver** gave 122-124 ms at 4,000-6,000 draws over 2 runs. Ten other runs that night landed at 132-140 ms, so that's about −10% on a 4-core CPU without hyperthreading. What didn't help here, for anyone testing the same things: - **No gain:** RLIMIT_NICE 30 (so Wine applies thread priorities), `VICTORY_MAP_THREADS=1`, `VICTORY_GUARD_REST=10000`, `VICTORY_LAND_THREADS=2`, `VICTORY_PANEL=0`, `VICTORY_CARD_ALL=1`, zswap off. - **Inconclusive:** `VICTORY_CARD_BUFFERS_MB=512`, and `mitigations=off`. - **Already on:** ntsync, in Proton Experimental 11.
This discussion has been locked. Commenting is limited to contributors.
No description provided.