You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Model M under executor dx12: a fixed 2.5 GiB measuring arena at every context creation #38
Discussion #10 reports that Model M allocated a 2,560 MiB buffer next to its 706 MiB arena. That buffer is the first of
two arenas the D3D12 executor creates on the game's device (clean/runtime/interop/executor_d3d12.cpp, prepare_device): pass 1 makes a device with the default arena (WG_D3D12_ARENA_MB, default 2560 MiB, clean/runtime/device_d3d12.cpp), runs the whole runtime creation to measure the highest arena offset the network
uses, and destroys it; pass 2 makes the arena that stays, sized to that measurement plus 1 MiB.
What could be better:
The measuring arena is a fixed 2.5 GiB whatever the render and output size, so every context creation briefly
commits 2.5 GiB on the game's device on top of what the game holds, even when the context needs far less. On 8 GB
cards (RX 9060 XT / 9060, see Test reports wanted: RX 9060 XT, RX 9060 and 8 GB cards #3) that is a large share; if the allocation keeps failing for 5 s, Model M falls back.
Pass 1's device has no log sink, so its teardown lines are dropped. If its teardown cannot confirm completion, the
device keeps its GPU objects, the 2.5 GiB arena included, until the game exits, and WrongGPU's log says nothing.
That would match the report of both buffers side by side.
The default and the two passes are documented only in code comments.
To do: first check on Windows and under Proton whether the 2.5 GiB buffer is still allocated after creation (video
memory before, during and after Model M's create). Then options to discuss: measure the need without a full-size arena
(a size from the context's render and output size, or a first pass that only counts allocations), give pass 1's device
the same log sink so its teardown is visible, and document the transient size. The output must stay bit-identical.
Checked under Proton, as asked: the 2.5 GiB measuring arena is allocated at Model M's creation and released again within about half a second. It did not stay alive next to the real arena in this run.
Setup:
Cyberpunk 2077 under GE-Proton 11-11 on an RX 9070 XT (16 GB, Mesa RADV), output 2560×1440, DLSS Quality (render 1505×847).
Video memory read from /sys/class/drm/card1/device/mem_info_vram_used, 10 times a second. This is the whole device, so the game's own allocations are included.
Timeline, relative to OptiScaler's "Creating FSR 3.X upscaler feature" for WrongGPU (15:51:00.18 in OptiScaler.log):
Time
VRAM used
just before
8.1 GB
+0.02 s
9.4 GB
+0.12 s
12.7 GB
+0.23 s
10.1 GB
+0.54 s and after
9.45 GB, steady
So the peak was about +3.3 GB over the level just before, which fits the 2,560 MiB pass-1 arena plus the second arena and the game's own allocations around the same moment. The level settled about 1.3 GB higher. At 10 samples a second the true peak may have been briefly higher than what was recorded.
What this doesn't cover: Windows; an 8 GB card, where the +3.3 GB moment is the real risk (#3); and a context re-created at a resolution change. Pass 1's teardown lines still don't reach the log, so the log alone couldn't have shown this.
Activity
j0nsh1n commentedon Nov 13, 2026
Checked under Proton, as asked: the 2.5 GiB measuring arena is allocated at Model M's creation and released again within about half a second. It did not stay alive next to the real arena in this run.
Setup:
0bb64c5with dxil-spirv #362./sys/class/drm/card1/device/mem_info_vram_used, 10 times a second. This is the whole device, so the game's own allocations are included.Timeline, relative to OptiScaler's "Creating FSR 3.X upscaler feature" for WrongGPU (15:51:00.18 in OptiScaler.log):
So the peak was about +3.3 GB over the level just before, which fits the 2,560 MiB pass-1 arena plus the second arena and the game's own allocations around the same moment. The level settled about 1.3 GB higher. At 10 samples a second the true peak may have been briefly higher than what was recorded.
What this doesn't cover: Windows; an 8 GB card, where the +3.3 GB moment is the real risk (#3); and a context re-created at a resolution change. Pass 1's teardown lines still don't reach the log, so the log alone couldn't have shown this.