RDNA1 (RX 5700 XT, 8 GB) + DirectMesh: mesh shaders work and the world draws, then the title null-writes at +0x23cf683 when a 16 GB host runs out #498

Closed
opened 2026-12-04 19:16:24 +00:00 by github-bot · 3 comments
Owner

@⁠bogislaus on GitHub · 2026-12-04 19:13 UTC · original

Disclosure: this report was written by an AI assistant from the machine's own logs and counters.
The owner reviewed it and ran every command on the hardware. Artifacts (logs, configs) are available
on request.

Hardware and software

  • Ryzen 5 5600X, ASUS PRIME B550-PLUS, Radeon RX 5700 XT 8 GB (Navi 10, gfx1010), 16 GB DDR4, 850 W
  • CachyOS, kernel 7.3.7-2-cachyos, cmdline: amdgpu.gttsize=9216 ttm.pages_limit=2359296 amdgpu.sched_hw_submission=8
  • xmem main @ 0fd7614b (2026-12-04), built with ./build.sh
  • wine 11.23 (system wine; USE_SYSTEM_WINE=1) — Proton-CachyOS never reaches the adapter on this
    box (it self-deadlocks in win32u at loaderdrv_SetDesktopWindow → get_vulkan_gpus → pthread_once)
  • Driver: DirectMesh (lonewolf0622/bc250meshtaskwork, Mesa 26.2.1) with xmem's patches/mesa.patch
    ported onto it, installed as a private ICD and selected with VK_DRIVER_FILES=…/radeon_icd.x86_64.json
    plus RADV_DIRECTMESH=1

Local source patches in the tree (disclosed because they change behaviour)

  • crates/victory-gpu/src/um.rs: CARD_KEPT_FOR_HOST = 3 << 30 (stock 12 GiB gives an 8 GB card 1024 MB, issue #119)
  • crates/victory-gpu/src/resource.rs: percent_from clamp (50, 97) → (50, 200)

run.conf

CONSOLE=series-s
VICTORY_OUTPUT=1280x720
VICTORY_PRESET=potato
KEEP_FREE=1024
VICTORY_LOG=info
USE_SYSTEM_WINE=1
VICTORY_AMBIENT_RT=0
VK_DRIVER_FILES=/home/bog/vx-dm/dm-merged/share/vulkan/icd.d/radeon_icd.x86_64.json
RADV_DIRECTMESH=1
VICTORY_WARM=0
VICTORY_TEXTURE_ROOM_PERCENT=60
VICTORY_TEXTURE_ROOM_CAP_PERCENT=70
RADV_BC250_IDX_STORAGE_MB=256
VICTORY_PAGES=0

What works

Mesh shaders are real on this card with the DirectMesh driver. With the config above:

victory_gpu::host: host mesh shader support mesh=true
victory_gpu::pipeline::host: host mesh pipeline shaders=[mesh …]
victory_gpu::queue: frame presented … draws=7299 drawn=7299

draws equals drawn on every line — the geometry the stock RDNA1 path refuses
(no host pipeline: the host GPU has no mesh shaders, 41,406 of 99,236 refused) is drawn in full.
Before/after on the same save and profile: heads and hair only → prologue interior with bodies, beds,
props and textures.

Warm pass on this driver: 95,082 pipelines in 1,014 s (8 jobs), 99205 of 99205 native pipelines on disk, 0 refused, 13 GB cache.

What fails

1. The DirectMesh index-storage budget is 128 MiB on this board. During the prologue:

radv/bc250: Task index route draw skipped (index storage unavailable, storage 127 of 128 MiB)
victory_gpu::host: a host command list did not close (Out of memory. (0x8007000E))
vkd3d: d3d12_command_list_Close: Failed to end command buffer, vr -2
vkd3d: hresult_from_vk_result: Out of device memory.

bc250_idx_storage_limit() gives 128 MiB of VRAM unless CHIP_GFX1013 (then GTT/8).
RADV_BC250_IDX_STORAGE_MB=512 removes this failure and roughly doubles the time before the next one.

2. After that, the host runs out of RAM and the title dies on a null write.
Measured with mem_info_gtt_used / mem_info_vram_used sampled every 2 s:

phase GTT VRAM free RAM
menu, flat for 3 min 6,634 / 9,216 MB 4,724 / 8,176 MB 2,745 MB
prologue peak (720p, everything else closed) 8,853 / 9,216 MB 6,577 / 8,176 MB 138 MB

then:

VIctory: unhandled exception 0xc0000005 at victory-image-b99f876b74d4a77f.dll+0x23cf683 (write 0x0: nothing mapped there)

That address is 0x679 bytes past +0x23cf00a, the frame-1 family address; it looks like a write through an
allocation that returned null. With amdgpu.gttsize=11264 the same scene instead ends in a kernel OOM kill
(um-play-*.scope: The kernel OOM killer killed some processes in this unit, 4.5 GB memory peak + 6 GB swap,
GTT 11,263/11,264).

Best result across ~10 configurations: frame 3,931 at 1280x720 with a warm cache.

Questions

  1. Is the 128 MiB index-storage default intended for local-VRAM (non-BC-250) boards, or should it scale
    with the card/aperture? GTA VI's prologue exceeds it on a 24 GC/s card.
  2. On a 16 GB host, is there a supported way to keep the title's footprint down on the split-mesh path? The
    process peaked at 4.5 GB RSS + 6 GB swap while recording ~450 first-use mesh pipelines; a same-spec
    reference running RDNA3 (native mesh) shows ~3.2 GB private and survives with 1 GB spare.

Reproduction

  1. Merge DirectMesh onto xmem's Mesa patch, install as a private ICD, set VK_DRIVER_FILES + RADV_DIRECTMESH=1.
  2. USE_SYSTEM_WINE=1, CONSOLE=series-s, VICTORY_OUTPUT=1280x720, VICTORY_PRESET=potato, VICTORY_WARM=0,
    VICTORY_PAGES=0, RADV_BC250_IDX_STORAGE_MB=256.
  3. Run ./run.sh warm (≈17 min), then ./run.sh play, continue the save into the prologue.
  4. Watch hwmon/mem_info_* and local/run/*.log; the failure is deterministic at the prologue scene load.
**@⁠bogislaus** on GitHub · 2026-12-04 19:13 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/498) > **Disclosure:** this report was written by an AI assistant from the machine's own logs and counters. > The owner reviewed it and ran every command on the hardware. Artifacts (logs, configs) are available > on request. ## Hardware and software - Ryzen 5 5600X, ASUS PRIME B550-PLUS, **Radeon RX 5700 XT 8 GB (Navi 10, gfx1010)**, **16 GB DDR4**, 850 W - CachyOS, kernel `7.3.7-2-cachyos`, cmdline: `amdgpu.gttsize=9216 ttm.pages_limit=2359296 amdgpu.sched_hw_submission=8` - xmem `main` @ `0fd7614b` (2026-12-04), built with `./build.sh` - wine **11.23** (system wine; `USE_SYSTEM_WINE=1`) — Proton-CachyOS never reaches the adapter on this box (it self-deadlocks in `win32u` at `loaderdrv_SetDesktopWindow → get_vulkan_gpus → pthread_once`) - **Driver: DirectMesh** (`lonewolf0622/bc250meshtaskwork`, Mesa 26.2.1) with xmem's `patches/mesa.patch` ported onto it, installed as a private ICD and selected with `VK_DRIVER_FILES=…/radeon_icd.x86_64.json` plus `RADV_DIRECTMESH=1` ### Local source patches in the tree (disclosed because they change behaviour) - `crates/victory-gpu/src/um.rs`: `CARD_KEPT_FOR_HOST = 3 << 30` (stock 12 GiB gives an 8 GB card 1024 MB, issue #119) - `crates/victory-gpu/src/resource.rs`: `percent_from` clamp `(50, 97)` → `(50, 200)` ### run.conf ``` CONSOLE=series-s VICTORY_OUTPUT=1280x720 VICTORY_PRESET=potato KEEP_FREE=1024 VICTORY_LOG=info USE_SYSTEM_WINE=1 VICTORY_AMBIENT_RT=0 VK_DRIVER_FILES=/home/bog/vx-dm/dm-merged/share/vulkan/icd.d/radeon_icd.x86_64.json RADV_DIRECTMESH=1 VICTORY_WARM=0 VICTORY_TEXTURE_ROOM_PERCENT=60 VICTORY_TEXTURE_ROOM_CAP_PERCENT=70 RADV_BC250_IDX_STORAGE_MB=256 VICTORY_PAGES=0 ``` ## What works **Mesh shaders are real on this card with the DirectMesh driver.** With the config above: ``` victory_gpu::host: host mesh shader support mesh=true victory_gpu::pipeline::host: host mesh pipeline shaders=[mesh …] victory_gpu::queue: frame presented … draws=7299 drawn=7299 ``` `draws` equals `drawn` on every line — the geometry the stock RDNA1 path refuses (`no host pipeline: the host GPU has no mesh shaders`, 41,406 of 99,236 refused) is drawn in full. Before/after on the same save and profile: heads and hair only → prologue interior with bodies, beds, props and textures. Warm pass on this driver: **95,082 pipelines in 1,014 s** (8 jobs), `99205 of 99205 native pipelines on disk, 0 refused`, 13 GB cache. ## What fails **1. The DirectMesh index-storage budget is 128 MiB on this board.** During the prologue: ``` radv/bc250: Task index route draw skipped (index storage unavailable, storage 127 of 128 MiB) victory_gpu::host: a host command list did not close (Out of memory. (0x8007000E)) vkd3d: d3d12_command_list_Close: Failed to end command buffer, vr -2 vkd3d: hresult_from_vk_result: Out of device memory. ``` `bc250_idx_storage_limit()` gives 128 MiB of VRAM unless `CHIP_GFX1013` (then GTT/8). `RADV_BC250_IDX_STORAGE_MB=512` removes this failure and roughly doubles the time before the next one. **2. After that, the host runs out of RAM and the title dies on a null write.** Measured with `mem_info_gtt_used` / `mem_info_vram_used` sampled every 2 s: | phase | GTT | VRAM | free RAM | |---|---|---|---| | menu, flat for 3 min | 6,634 / 9,216 MB | 4,724 / 8,176 MB | 2,745 MB | | prologue peak (720p, everything else closed) | 8,853 / 9,216 MB | 6,577 / 8,176 MB | 138 MB | then: ``` VIctory: unhandled exception 0xc0000005 at victory-image-b99f876b74d4a77f.dll+0x23cf683 (write 0x0: nothing mapped there) ``` That address is 0x679 bytes past `+0x23cf00a`, the frame-1 family address; it looks like a write through an allocation that returned null. With `amdgpu.gttsize=11264` the same scene instead ends in a kernel OOM kill (`um-play-*.scope: The kernel OOM killer killed some processes in this unit`, 4.5 GB memory peak + 6 GB swap, GTT 11,263/11,264). Best result across ~10 configurations: **frame 3,931** at 1280x720 with a warm cache. ## Questions 1. Is the 128 MiB index-storage default intended for local-VRAM (non-BC-250) boards, or should it scale with the card/aperture? GTA VI's prologue exceeds it on a 24 GC/s card. 2. On a 16 GB host, is there a supported way to keep the title's footprint down on the split-mesh path? The process peaked at 4.5 GB RSS + 6 GB swap while recording ~450 first-use mesh pipelines; a same-spec reference running RDNA3 (native mesh) shows ~3.2 GB private and survives with 1 GB spare. ## Reproduction 1. Merge DirectMesh onto xmem's Mesa patch, install as a private ICD, set `VK_DRIVER_FILES` + `RADV_DIRECTMESH=1`. 2. `USE_SYSTEM_WINE=1`, `CONSOLE=series-s`, `VICTORY_OUTPUT=1280x720`, `VICTORY_PRESET=potato`, `VICTORY_WARM=0`, `VICTORY_PAGES=0`, `RADV_BC250_IDX_STORAGE_MB=256`. 3. Run `./run.sh warm` (≈17 min), then `./run.sh play`, continue the save into the prologue. 4. Watch `hwmon`/`mem_info_*` and `local/run/*.log`; the failure is deterministic at the prologue scene load.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 19:16:25 +00:00
Author
Owner

@⁠kromka45 on GitHub · 2026-12-04 20:00 UTC · original

@⁠goldfishdev is there any contact to you ? via any app?

**@⁠kromka45** on GitHub · 2026-12-04 20:00 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/498#issuecomment-7422685390) @⁠goldfishdev is there any contact to you ? via any app?
Author
Owner

@⁠goldfishdev on GitHub · 2026-12-04 20:08 UTC · original

The 128 MiB index budget is DirectMesh's, not xmem's. File it with bc250_idx_storage_limit there. The null write looks like the title failing an allocation on a 16 GB host; the upstream part is CARD_KEPT_FOR_HOST = 12 GiB (#119), and the RDNA1 mesh path is #370. Please keep support in the tracker.

**@⁠goldfishdev** on GitHub · 2026-12-04 20:08 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/498#issuecomment-7422871061) The 128 MiB index budget is DirectMesh's, not xmem's. File it with bc250_idx_storage_limit there. The null write looks like the title failing an allocation on a 16 GB host; the upstream part is CARD_KEPT_FOR_HOST = 12 GiB (#119), and the RDNA1 mesh path is #370. Please keep support in the tracker.
Author
Owner

@⁠bogislaus on GitHub · 2026-12-05 07:55 UTC · original

Thanks, that clears it up. I'll take the 128 MiB index-storage budget to the DirectMesh repo, the null write is the 16 GB allocation wall and matches #119, and the mesh path itself is #370, I posted the numbers from this card there. Closing this one.

**@⁠bogislaus** on GitHub · 2026-12-05 07:55 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/498#issuecomment-7434493520) Thanks, that clears it up. I'll take the 128 MiB index-storage budget to the DirectMesh repo, the null write is the 16 GB allocation wall and matches #119, and the mesh path itself is #370, I posted the numbers from this card there. Closing this one.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/lobomfz--VIctory-xmem#498
No description provided.