Textures: zeros for a texture's first contents and new levels come from one shared buffer in card memory, not an upload buffer per copy (VICTORY_SHARED_ZEROS) #1588

Merged
101Leafy merged 4 commits from upstream-pr/1588 into main 2026-11-29 08:16:55 +00:00
101Leafy commented 2026-11-28 21:58:30 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-28T21:58:30Z.


A texture's first contents and each new level started from zeros held in an upload buffer the size of the whole texture (or level). Each one was made, waited resident, and cleared while the list was recorded, then sent over the bus again.

Now every such copy reads from one buffer of zeros in the card's memory, which nothing writes. Memory made without CREATE_NOT_ZEROED already holds zeros, so it needs no clear and no upload. The buffer grows by powers of two up to 256 MB. One that was outgrown is kept, since a list recorded with it may not have run yet. Past 256 MB, or with VICTORY_SHARED_ZEROS=0, the old upload buffers are used.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5544970149 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1588). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-11-28T21:58:30Z. --- A texture's first contents and each new level started from zeros held in an upload buffer the size of the whole texture (or level). Each one was made, waited resident, and cleared while the list was recorded, then sent over the bus again. Now every such copy reads from one buffer of zeros in the card's memory, which nothing writes. Memory made without `CREATE_NOT_ZEROED` already holds zeros, so it needs no clear and no upload. The buffer grows by powers of two up to 256 MB. One that was outgrown is kept, since a list recorded with it may not have run yet. Past 256 MB, or with `VICTORY_SHARED_ZEROS=0`, the old upload buffers are used.
NotADonky43 commented 2026-11-29 03:44:12 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by NotADonky43 on 2026-11-29T03:44:12Z.


RTX 5070 Ti/Series X opening, #1588 isolated on cumulative 7f78e8f7 (upstream d1486134). Same release binary with aggregate counters, same frozen profile, 25,728 precompiled shaders and same warm pipeline library. Four openings off/on/on/off, each to six settled heavy render windows. The two enabled runs replaced 192/192 and 127/127 whole-texture upload clears (36.87 and 32.65 MiB of logical initialization) with shared-source copies, holding 36 MiB of committed zero-buffer capacity each. No on-demand single-mip zero call appeared in these runs. Off controls saw 311 and 126 whole-texture clears. These are calls/footprint bytes, not separate driver allocations or a PCIe traffic measurement. Median reported p95s off vs on: 59.0 vs 65.1 ms; reverse 56.5 vs 58.2 ms. Peak private GiB 28.21 vs 26.48; reverse 26.33 vs 26.42. Not scene-matched or evidence of an FPS/total-memory gain. Keeping it separate on this profile. Local fenced texture-byte readback passed with upload fallback and shared source (record two sizes before submission to force 4→8 MiB growth). Posted a source-independent before/after sentinel regression against current main in #1946.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7250228011 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1588#issuecomment-7250228011). Originally posted by [NotADonky43](https://github.com/NotADonky43) on 2026-11-29T03:44:12Z. --- RTX 5070 Ti/Series X opening, #1588 isolated on cumulative 7f78e8f7 (upstream d1486134). Same release binary with aggregate counters, same frozen profile, 25,728 precompiled shaders and same warm pipeline library. Four openings off/on/on/off, each to six settled heavy render windows. The two enabled runs replaced **192/192 and 127/127** whole-texture upload clears (36.87 and 32.65 MiB of logical initialization) with shared-source copies, holding **36 MiB of committed zero-buffer capacity** each. No on-demand single-mip zero call appeared in these runs. Off controls saw 311 and 126 whole-texture clears. These are calls/footprint bytes, not separate driver allocations or a PCIe traffic measurement. Median reported p95s off vs on: 59.0 vs 65.1 ms; reverse 56.5 vs 58.2 ms. Peak private GiB 28.21 vs 26.48; reverse 26.33 vs 26.42. Not scene-matched or evidence of an FPS/total-memory gain. Keeping it separate on this profile. Local fenced texture-byte readback passed with upload fallback and shared source (record two sizes before submission to force 4→8 MiB growth). Posted a source-independent before/after sentinel regression against current main in #1946.
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
trustno1-coder/VIctory-NVIDIA!1588
No description provided.