RX 9070 XT: materials turn black for a moment (floor decal, faces, clothes), and different objects stay black from run to run #69

Open
opened 2026-12-01 14:07:50 +00:00 by github-bot · 18 comments
Owner

@⁠Fran-co-F on GitHub · 2026-12-01 14:02 UTC · original

Thanks for xmem. It's far faster here than the fork I used before: with over 7,000 draws a frame and ray tracing off, I went from about 12 to about 30 fps (rough comparison: different fork, scaling and route). These image problems remain, and they're what keeps me from playing. I didn't find an existing report of them.

System

  • Ryzen 7 9800X3D, RX 9070 XT 16 GB, 32 GB RAM, CachyOS (kernel 7.3.6)
  • GE-Proton11-14 with its own wineserver (checked while the game was running)
  • 37bb30f, your patched Mesa 26.3.1 and pinned vkd3d-proton
  • Series X profile, 2560x1440 output (1706x960 render), all ~94,200 pipelines prepared
  • Differences from setup.sh: VIctory is built with cargo-xwin and an SDK I already had. I also removed the two optional sudo calls from run.sh.

1. Materials turn black for a moment

It's easiest to reproduce in the cash-store robbery, in the shot where the character in the hood points the gun. The floor mat (or decal) turns black for one distinct picture in a 60 fps recording, then comes back. Sometimes other materials turn black in the same picture:

build (all with ray tracing on) floor mat character
37bb30f, vkd3d-proton built with GCC 16.2, no switches black face, hands and clothes go dark too
37bb30f, vkd3d-proton built with llvm-mingw (Clang 23.1.6), no switches black normal
37bb30f + #47 #45 #44 #43 #38 #31, VICTORY_POOL_MOVE=1 (Clang) black, twice face black both times, clothes normal

Each row is one recorded session, and the number of flashes may vary between runs. The images show before / during / after, and there are slow-motion clips for the first and last rows.

Plain 37bb30f, vkd3d-proton built with GCC (left to right: before, during, after):

11-parpadeo-gcc

VIDEO:
https://github.com/user-attachments/assets/079e7bd0-69ca-4a11-83fd-af733bd5ebb7

Plain 37bb30f, vkd3d-proton built with Clang (left to right: before, during, after; afterwards, the mat has no orange border):

10-parpadeo-37bb30f-RT

Combined build, Clang (each row is one flash; left to right: before, during, after):

8-parpadeo-antes-durante-despues

VIDEO:
https://github.com/user-attachments/assets/d8582ba1-67ae-47fe-bbc8-1b1f5ae58e17

  • In the Clang run on plain 37bb30f, the mat comes back without its orange border for at least the next picture. By eye, it looks like a less detailed version of the texture. That might point to the texture's host copy being dropped and made again, but I haven't confirmed it.
  • I also saw decal flicker with ray tracing off, on plain 37bb30f (with and without VICTORY_PAGES=0) and on the combined build. I don't have videos of those. It's easy to notice while driving, too.

Probably not the cause of the flicker:

  • The vkd3d-proton compiler: the flash happens with both. For the GCC test I deleted the prepared pipelines and Mesa's cache, then made them all again. victory.exe and Mesa were the same.
  • The six PRs: plain 37bb30f does it too.
  • Missing pipelines: the prepared sessions had 0 to 3 native pipeline missed at first use.
  • A bad copy of the game files: 25 files (109 GB) are read from a copy on another drive. A byte-by-byte comparison with my original dump found no differences (this doesn't verify the dump itself).

What the logs show (not matched to individual flashes): these sessions all reach textures picked by index: the card has no room for more; they wait. In the GCC session (about 7 minutes):

  • VRAM ended at 10,452 / 11,333 MB
  • 311719 for room or age (28264 MB) host copies let go
  • 9612 uploaded from memory that read all zeros (1033 of them filled later)
  • texture_late kind="after_memory": n=487,129, mean 14.4 s, p90 over 32 s

In the combined-build session there are also bursts of a texture already on the card is brought up to date although the card has no room for new ones (about 8,500 in 1.5 s). Other sessions have similar bursts.

2. Objects that stay black, different from run to run

  • Table in the prison cell: mostly black with rows of coloured pixels in two combined-build sessions. The rows look like they're in the same places (screenshots).
  • "STORE ROOM" door: completely black from several angles in a combined-build session, while its handle, its frame and the signs look right (screenshot).
  • In the GCC session, the table and the door looked right, but a locker near the start didn't. That's what I saw while playing; that part wasn't recorded. Since it changes between runs, I can't say GCC fixed the table or the door.

Table in the prison cell (combined build):

3-mesa-negra

SECOND SESSION:
6-mesa-print-windows-16

"STORE ROOM" door (combined build):

9-puerta-negra

I also tried reading more of each texture in fingerprint_blank / print_of (16 windows of 16 KiB instead of 3, a local switch). It didn't fix the table.

3. Seen once

On the combined build with ray tracing on, the cell ceiling showed a faded image of what looks like the prison yard (screenshot). I didn't notice it in the later sessions, including the ones with plain 37bb30f. I don't know whether the PRs or VICTORY_POOL_MOVE=1 cause it.

Prison yard on the cell ceiling (combined build):

7-patio-en-el-techo

I haven't tested #67 yet. Its BC7 and placed-view fixes may be related to some of this, but I don't know. I can test patches or diagnostic switches on this card.

AI use: Claude Code (Claude Opus 5.5) made the builds, read the logs and code, compared the video frames, and wrote this. I played and recorded the sessions, and saw the image problems myself.

**@⁠Fran-co-F** on GitHub · 2026-12-01 14:02 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69) Thanks for xmem. It's far faster here than the fork I used before: with over 7,000 draws a frame and ray tracing off, I went from about 12 to about 30 fps (rough comparison: different fork, scaling and route). These image problems remain, and they're what keeps me from playing. I didn't find an existing report of them. ## System - Ryzen 7 9800X3D, RX 9070 XT 16 GB, 32 GB RAM, CachyOS (kernel 7.3.6) - GE-Proton11-14 with its own wineserver (checked while the game was running) - `37bb30f`, your patched Mesa 26.3.1 and pinned vkd3d-proton - Series X profile, 2560x1440 output (1706x960 render), all ~94,200 pipelines prepared - **Differences from `setup.sh`:** VIctory is built with `cargo-xwin` and an SDK I already had. I also removed the two optional `sudo` calls from `run.sh`. ## 1. Materials turn black for a moment It's easiest to reproduce in the cash-store robbery, in the shot where the character in the hood points the gun. The floor mat (or decal) turns black for one distinct picture in a 60 fps recording, then comes back. Sometimes other materials turn black in the same picture: | build (all with ray tracing on) | floor mat | character | |---|---|---| | `37bb30f`, vkd3d-proton built with **GCC 16.2**, no switches | black | **face, hands and clothes go dark too** | | `37bb30f`, vkd3d-proton built with llvm-mingw (Clang 23.1.6), no switches | black | normal | | `37bb30f` + #47 #45 #44 #43 #38 #31, `VICTORY_POOL_MOVE=1` (Clang) | black, twice | face black both times, clothes normal | Each row is one recorded session, and the number of flashes may vary between runs. The images show before / during / after, and there are slow-motion clips for the first and last rows. **Plain `37bb30f`, vkd3d-proton built with GCC** (left to right: before, during, after): <img width="2712" height="642" alt="11-parpadeo-gcc" src="https://github.com/user-attachments/assets/891498fc-442c-47a5-8002-112a564ca2cc" /> VIDEO: https://github.com/user-attachments/assets/079e7bd0-69ca-4a11-83fd-af733bd5ebb7 **Plain `37bb30f`, vkd3d-proton built with Clang** (left to right: before, during, after; afterwards, the mat has no orange border): <img width="2712" height="642" alt="10-parpadeo-37bb30f-RT" src="https://github.com/user-attachments/assets/cbae7a59-1776-421d-99b8-78d838e588dc" /> **Combined build, Clang** (each row is one flash; left to right: before, during, after): <img width="2412" height="1150" alt="8-parpadeo-antes-durante-despues" src="https://github.com/user-attachments/assets/cbac8be4-a971-463b-8b53-fd3c40ff0232" /> VIDEO: https://github.com/user-attachments/assets/d8582ba1-67ae-47fe-bbc8-1b1f5ae58e17 - **In the Clang run on plain `37bb30f`, the mat comes back without its orange border for at least the next picture.** By eye, it looks like a less detailed version of the texture. That might point to the texture's host copy being dropped and made again, but I haven't confirmed it. - I also saw decal flicker with ray tracing off, on plain `37bb30f` (with and without `VICTORY_PAGES=0`) and on the combined build. I don't have videos of those. It's easy to notice while driving, too. **Probably not the cause of the flicker:** - **The vkd3d-proton compiler:** the flash happens with both. For the GCC test I deleted the prepared pipelines and Mesa's cache, then made them all again. `victory.exe` and Mesa were the same. - **The six PRs:** plain `37bb30f` does it too. - **Missing pipelines:** the prepared sessions had 0 to 3 `native pipeline missed at first use`. - **A bad copy of the game files:** 25 files (109 GB) are read from a copy on another drive. A byte-by-byte comparison with my original dump found no differences (this doesn't verify the dump itself). **What the logs show (not matched to individual flashes):** these sessions all reach `textures picked by index: the card has no room for more; they wait`. In the GCC session (about 7 minutes): - VRAM ended at 10,452 / 11,333 MB - `311719 for room or age (28264 MB)` host copies let go - `9612 uploaded from memory that read all zeros (1033 of them filled later)` - `texture_late kind="after_memory"`: n=487,129, mean 14.4 s, p90 over 32 s In the combined-build session there are also bursts of `a texture already on the card is brought up to date although the card has no room for new ones` (about 8,500 in 1.5 s). Other sessions have similar bursts. ## 2. Objects that stay black, different from run to run - **Table in the prison cell:** mostly black with rows of coloured pixels in two combined-build sessions. The rows look like they're in the same places (screenshots). - **"STORE ROOM" door:** completely black from several angles in a combined-build session, while its handle, its frame and the signs look right (screenshot). - **In the GCC session,** the table and the door looked right, but a locker near the start didn't. That's what I saw while playing; that part wasn't recorded. Since it changes between runs, **I can't say GCC fixed the table or the door.** **Table in the prison cell** (combined build): <img width="2000" height="1125" alt="3-mesa-negra" src="https://github.com/user-attachments/assets/13bc9182-9db7-4873-84bd-050e3b08917d" /> SECOND SESSION: <img width="2000" height="1125" alt="6-mesa-print-windows-16" src="https://github.com/user-attachments/assets/595e448f-2762-4e4c-8099-0a4ab444b53b" /> **"STORE ROOM" door** (combined build): <img width="1920" height="1080" alt="9-puerta-negra" src="https://github.com/user-attachments/assets/d42431fd-cc9b-4e9b-a031-4276fa11f534" /> I also tried reading more of each texture in `fingerprint_blank` / `print_of` (16 windows of 16 KiB instead of 3, a local switch). It didn't fix the table. ## 3. Seen once On the combined build with ray tracing on, the cell ceiling showed a faded image of what looks like the prison yard (screenshot). I didn't notice it in the later sessions, including the ones with plain `37bb30f`. I don't know whether the PRs or `VICTORY_POOL_MOVE=1` cause it. **Prison yard on the cell ceiling** (combined build): <img width="2000" height="1125" alt="7-patio-en-el-techo" src="https://github.com/user-attachments/assets/5dd35ae4-9638-4ab8-b8a9-28c1a24f2f3b" /> I haven't tested #67 yet. Its BC7 and placed-view fixes may be related to some of this, but I don't know. I can test patches or diagnostic switches on this card. **AI use:** Claude Code (Claude Opus 5.5) made the builds, read the logs and code, compared the video frames, and wrote this. I played and recorded the sessions, and saw the image problems myself.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 14:07:50 +00:00
Author
Owner

@⁠Widget9337 on GitHub · 2026-12-01 15:14 UTC · original · edited 2026-12-01 15:57 UTC

Same card here, same problem. Mostly ground, terrain, buildings and props go black: sometimes a small section, sometimes a whole object (a road sign). Which ones changes from run to run, and some flash black and come back. I worked through the open PRs and a few switches to narrow it down.

Setup: RX 9070 XT, Ryzen 9 7950X3D, CachyOS (kernel 7.2), this repo's patched Mesa 26.3.1 and pinned vkd3d-proton, runtime proton-cachyos-slr. Series X profile, 1920x1080 output, PC FSR 4 Quality (1280x720 render), ray tracing on, fullscreen through gamescope. The base is 37bb30f + #52 + #60 (which includes #58).

What I tried

change result
#43 (RT UAV barrier + Mesa nir_lower_memory_model) No visible change. GPU wait 6.7 → 12.4 ms per frame. Reverted
#67 with VICTORY_PLACED_COPIED=1 Maybe slightly better. Fired 14 times in one session (9 at 256x256, 5 at 1024x1024). Kept
#47 Left out a stale upload 15 times in one session. No visible change for the scenery. Kept
#45 No visible change. Kept
VICTORY_AMBIENT_RT=0 (#61) Worse: shadows flicker, and the black textures stay. RT "pages that had no copy" went 42 → 54
VICTORY_BVH_BUILDER=0 (RT off) The black textures stay. About 170–230 RT draws dropped per frame, and only 7 "no copy" reads in the session

None of these cost measurable fps (except #43).

The zero-memory uploads are real zeros

Every session logs about 2,300–3,100 uploaded from memory that read all zeros, with only 50–80 filled later. I wondered whether the blank recheck, which looks at three 16 KiB windows, misses fills elsewhere in a texture. So I added a local diagnostic: after the third look still finds the samples blank, it reads the whole texture once (up to 64 MiB).

blank-full: totals checked=700 still_zero=699 missed_by_samples=1 mib_read=846

699 of 700 were still zero end to end. The one with data started at offset 0, so it was a fill between looks, not a miss. So the sampling isn't the problem: that title memory stays empty. Either these textures never get used, or their data reaches the card some other way that the host copy doesn't follow, like the placed-view case #67 covers.

TLDR

  • Not ray tracing (still there with RT off).
  • Not the RT ambient stand-in.
  • Not the blank-recheck sampling.
  • Not fixed by #43, #45 or #47. Only slightly helped by #67.

That points at another GPU-side write path into textures (a copy, resolve, or compute/decompression output) that doesn't reach the host copy or the views placed over it. Happy to run a diagnostic build or switches on this card.

**@⁠Widget9337** on GitHub · 2026-12-01 15:14 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7315584934) · edited 2026-12-01 15:57 UTC Same card here, same problem. Mostly ground, terrain, buildings and props go black: sometimes a small section, sometimes a whole object (a road sign). Which ones changes from run to run, and some flash black and come back. I worked through the open PRs and a few switches to narrow it down. **Setup:** RX 9070 XT, Ryzen 9 7950X3D, CachyOS (kernel 7.2), this repo's patched Mesa 26.3.1 and pinned vkd3d-proton, runtime `proton-cachyos-slr`. Series X profile, 1920x1080 output, PC FSR 4 Quality (1280x720 render), ray tracing on, fullscreen through gamescope. The base is `37bb30f` + #52 + #60 (which includes #58). ### What I tried | change | result | |---|---| | #43 (RT UAV barrier + Mesa `nir_lower_memory_model`) | No visible change. GPU wait 6.7 → 12.4 ms per frame. Reverted | | #67 with `VICTORY_PLACED_COPIED=1` | Maybe slightly better. Fired 14 times in one session (9 at 256x256, 5 at 1024x1024). Kept | | #47 | Left out a stale upload 15 times in one session. No visible change for the scenery. Kept | | #45 | No visible change. Kept | | `VICTORY_AMBIENT_RT=0` (#61) | Worse: shadows flicker, and the black textures stay. RT "pages that had no copy" went 42 → 54 | | `VICTORY_BVH_BUILDER=0` (RT off) | **The black textures stay.** About 170–230 RT draws dropped per frame, and only 7 "no copy" reads in the session | None of these cost measurable fps (except #43). ### The zero-memory uploads are real zeros Every session logs about 2,300–3,100 `uploaded from memory that read all zeros`, with only 50–80 `filled later`. I wondered whether the blank recheck, which looks at three 16 KiB windows, misses fills elsewhere in a texture. So I added a local diagnostic: after the third look still finds the samples blank, it reads the whole texture once (up to 64 MiB). ``` blank-full: totals checked=700 still_zero=699 missed_by_samples=1 mib_read=846 ``` 699 of 700 were still zero end to end. The one with data started at offset 0, so it was a fill between looks, not a miss. **So the sampling isn't the problem:** that title memory stays empty. Either these textures never get used, or their data reaches the card some other way that the host copy doesn't follow, like the placed-view case #67 covers. ### TLDR - Not ray tracing (still there with RT off). - Not the RT ambient stand-in. - Not the blank-recheck sampling. - Not fixed by #43, #45 or #47. Only slightly helped by #67. That points at another GPU-side write path into textures (a copy, resolve, or compute/decompression output) that doesn't reach the host copy or the views placed over it. Happy to run a diagnostic build or switches on this card.
Author
Owner

@⁠Widget9337 on GitHub · 2026-12-01 20:58 UTC · original · edited 2026-12-02 13:12 UTC

Follow-up with something that may be related: whole parts of objects vanish when the camera moves slightly.

From one spot, turning the camera by just a few degrees makes a parked red pickup lose its entire body, both the cab and the bed. Only the wheels, the front bumper and a cooler sitting next to it are still drawn. A scooter nearby does the same thing: its body disappears and only its wheels are left. Turning back brings both bodies back right away, and it repeats every time at the same angles. The pieces that stay visible look like separate meshes from the body, so whole draws seem to be dropped, not single triangles or textures. Same setup as before: RX 9070 XT, Series X profile, 1080p, FSR 4 Quality, RT on.

What I checked:

  • The VIctory HUD shows 0 dropped draws, and the log has no warning when it happens.
  • The title's calls to the unimplemented native pipeline methods 0x1c8/0x218 (#74) all happen at startup (16,384 and 2,048 calls by 20:40:24, with gameplay starting at 20:40:59), not when the camera moves.
  • It happened before #83 too, and nothing changes with #83 (plus #58) applied. The black and flickering textures are also unchanged with #83.

Because it follows the camera and nothing is dropped on our side, my guess is the title's own GPU culling. If the data that decides visibility (depth or occlusion results, bounding data) has parts that a GPU write didn't make visible, whole objects would get culled. That's the same family as the black textures above. I'm happy to run a capture or try switches at this spot if that helps.

**@⁠Widget9337** on GitHub · 2026-12-01 20:58 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7325543001) · edited 2026-12-02 13:12 UTC Follow-up with something that may be related: **whole parts of objects vanish when the camera moves slightly.** From one spot, turning the camera by just a few degrees makes a parked red pickup lose its entire body, both the cab and the bed. Only the wheels, the front bumper and a cooler sitting next to it are still drawn. A scooter nearby does the same thing: its body disappears and only its wheels are left. Turning back brings both bodies back right away, and it repeats every time at the same angles. The pieces that stay visible look like separate meshes from the body, so whole draws seem to be dropped, not single triangles or textures. Same setup as before: RX 9070 XT, Series X profile, 1080p, FSR 4 Quality, RT on. What I checked: - The VIctory HUD shows **0 dropped draws**, and the log has no warning when it happens. - The title's calls to the unimplemented native pipeline methods `0x1c8`/`0x218` (#74) all happen at startup (16,384 and 2,048 calls by 20:40:24, with gameplay starting at 20:40:59), not when the camera moves. - It happened before #83 too, and nothing changes with #83 (plus #58) applied. The black and flickering textures are also unchanged with #83. Because it follows the camera and nothing is dropped on our side, my guess is the title's own GPU culling. If the data that decides visibility (depth or occlusion results, bounding data) has parts that a GPU write didn't make visible, whole objects would get culled. That's the same family as the black textures above. I'm happy to run a capture or try switches at this spot if that helps.
Author
Owner

@⁠weneedbucks on GitHub · 2026-12-02 00:27 UTC · original

System: Intel i7-10700K, RX 9060 XT 16 GB, 32 GB RAM, CachyOS (kernel 7.3), system Wine 11.23, this repo's patched Mesa and vkd3d-proton from setup.sh. All 99,409 pipelines prepared, 0 bad.
Build/settings: f7f0360 (+ #109, #126, #129, #113). Series S profile, 1920x1080 output, VICTORY_UPSCALER=7 + VICTORY_FSR_HOST=1 (FSR 4, 1280x720 render), VICTORY_PAGES=0.

  • What I see: Jason's skin turns black for a moment, then comes back. It's usually his arms. Once, his whole face went black.
  • Ray tracing: it happens with RT on (VICTORY_BVH_BUILDER=1) as well as off, so it agrees with your finding that it isn't RT.
  • VICTORY_PLACED_COPIED=1 never fired here. In a 3.5 min session with it on, the log had none of its a copy into a title texture goes into the view placed over it too lines (it says the first 16). Jason's face still went black in that session. So on Series S, whatever writes these textures isn't the copy-into-placed-view path that #67 covers.

Happy to run a diagnostic build or switches on this card.

**@⁠weneedbucks** on GitHub · 2026-12-02 00:27 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7330569069) System: Intel i7-10700K, RX 9060 XT 16 GB, 32 GB RAM, CachyOS (kernel 7.3), system Wine 11.23, this repo's patched Mesa and vkd3d-proton from setup.sh. All 99,409 pipelines prepared, 0 bad. Build/settings: f7f0360 (+ #109, #126, #129, #113). Series S profile, 1920x1080 output, VICTORY_UPSCALER=7 + VICTORY_FSR_HOST=1 (FSR 4, 1280x720 render), VICTORY_PAGES=0. - What I see: Jason's skin turns black for a moment, then comes back. It's usually his arms. Once, his whole face went black. - Ray tracing: it happens with RT on (VICTORY_BVH_BUILDER=1) as well as off, so it agrees with your finding that it isn't RT. - VICTORY_PLACED_COPIED=1 never fired here. In a 3.5 min session with it on, the log had none of its a copy into a title texture goes into the view placed over it too lines (it says the first 16). Jason's face still went black in that session. So on Series S, whatever writes these textures isn't the copy-into-placed-view path that #67 covers. Happy to run a diagnostic build or switches on this card.
Author
Owner

@⁠GreemSC on GitHub · 2026-12-02 11:52 UTC · original

Another data point, RDNA 3 this time: RX 7900 XT 20 GB, i7-12700K, CachyOS kernel 7.3.6, Proton-CachyOS Wine, this repo's patched Mesa 26.3.1 and vkd3d-proton 71cae09. Build d044248 + #163 + #164 + #166, Series X, ray tracing on, all 99,830 pipelines prepared, 0 bad.

With VICTORY_FSR_4K=quality (FSR 4.1.2 through the PC upscaler, 1706x960 → 2560x1440) and frame generation on: in the car scene of the opening, Lucia's face skin turned black (seen by the user while playing). Frame captures of every 8th frame of the same run show her face lit normally, so it is transient, like the flashes described above.

I can't say yet whether it also happens there without FSR 4: on the same build with the title's own upscaler (render scale 0.75) nobody was watching that scene. If someone has a lead on what to log for a skin draw that goes black, I can run it.

AI assistance: Claude Code (Claude Opus 5.5) wrote this report from the run's log and captures; the black face was seen by the user.

**@⁠GreemSC** on GitHub · 2026-12-02 11:52 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7344523254) Another data point, RDNA 3 this time: RX 7900 XT 20 GB, i7-12700K, CachyOS kernel 7.3.6, Proton-CachyOS Wine, this repo's patched Mesa 26.3.1 and vkd3d-proton `71cae09`. Build `d044248` + #163 + #164 + #166, Series X, ray tracing on, all 99,830 pipelines prepared, 0 bad. With `VICTORY_FSR_4K=quality` (FSR 4.1.2 through the PC upscaler, 1706x960 → 2560x1440) and frame generation on: **in the car scene of the opening, Lucia's face skin turned black** (seen by the user while playing). Frame captures of every 8th frame of the same run show her face lit normally, so it is transient, like the flashes described above. I can't say yet whether it also happens there without FSR 4: on the same build with the title's own upscaler (render scale 0.75) nobody was watching that scene. If someone has a lead on what to log for a skin draw that goes black, I can run it. AI assistance: Claude Code (Claude Opus 5.5) wrote this report from the run's log and captures; the black face was seen by the user.
Author
Owner

@⁠DrArroway on GitHub · 2026-12-02 22:30 UTC · original

Data point from a clean 61-minute run on main (32b136e) with AMD Radeon RX 6900 XT (1002:73bf) (Ryzen 9 7900X, 64 GiB RAM, GE-Proton11-15, default run.conf, VICTORY_PLACED_COPIED off, RT on).

Overall run health was clean (0 errors, steady 8660 MB RAM / 3378 MB VRAM, 11412440 MiB texture versions skipped vs 73102 MiB read with 0 audit misses, 98.8% median GPU busy across 3211 clock samples), except 2–3 character skin textures showed psychedelic rainbow/block corruption.

Looking at the run log, two placed-view diagnostics showed up right where character skin/bake textures are created:

1. Three HERO LEAD placed views over host-copied textures (placed_in_host_written)

view_address=0xe489c0000 view_offset=0     view_width=256 view_height=256 view_layers_levels=0x30001 view_format=71 copied_address=0xe489c0000 copied_bytes=90112 copied_width=256 copied_height=256 copied_layers_levels=0x90001 copied_format=78
view_address=0xd4db34000 view_offset=81920 view_width=256 view_height=256 view_layers_levels=0x70001 view_format=71 copied_address=0xd4db20000 copied_bytes=90112 copied_width=256 copied_height=256 copied_layers_levels=0x90001 copied_format=78
view_address=0x96f480000 view_offset=0     view_width=256 view_height=256 view_layers_levels=0x70001 view_format=71 copied_address=0x96f480000 copied_bytes=90112 copied_width=256 copied_height=256 copied_layers_levels=0x90001 copied_format=99

Worth noting for anyone looking at VICTORY_PLACED_COPIED / seed_later: all three cases are views placed after the host copy (placed_in_host_written), cross block sizes (format=71 (8, 4) over format=78 & 99 (16, 4)), and one starts at a non-zero offset (view_offset=81920).

2. Placed textures overlapping mismatched host render/UAV targets (alias_of / placed_inside_target)

Ten a placed texture lies where a texture the host writes does, and is not like it warnings (placed 8–10 level views in formats 71/80/83/98/99/28 over 1-level format=28/29 (4, 1) targets):

[1024, 1024, 98, 1920, 1088, 29], levels 9 and 1, layers 1 and 1
[1024, 1024, 98, 1024, 1024, 28], levels 9 and 1, layers 1 and 1
[2048, 2048, 80, 1024, 1024, 28], levels 10 and 1, layers 1 and 1
[ 512,  512, 28, 1024, 1024, 28], levels 8 and 1, layers 1 and 1
[2048, 1024, 99, 1024, 1024, 28], levels 9 and 1, layers 1 and 1
[2048, 2048, 71, 1024, 1024, 28], levels 10 and 1, layers 1 and 1
[1024, 1024, 99,  512, 1024, 28], levels 9 and 1, layers 1 and 1
[ 512,  512, 83,  512, 1024, 28], levels 8 and 1, layers 3 and 1
[1024, 1024, 98,  512, 1024, 28], levels 9 and 1, layers 1 and 1
[1024, 2048, 71,  512, 1024, 28], levels 9 and 1, layers 1 and 1

Plus one placed_inside_target warning at a non-zero offset inside a host target:

[16, 4, 10, 1, 512, 512, 29, 1] offset=0x8e000 target_bytes=1048576 target_flags=0xc00001
**@⁠DrArroway** on GitHub · 2026-12-02 22:30 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7360790612) Data point from a clean 61-minute run on `main` (`32b136e`) with `AMD Radeon RX 6900 XT (1002:73bf)` (Ryzen 9 7900X, 64 GiB RAM, `GE-Proton11-15`, default `run.conf`, `VICTORY_PLACED_COPIED` off, RT on). Overall run health was clean (`0` errors, steady `8660 MB` RAM / `3378 MB` VRAM, `11412440 MiB` texture versions skipped vs `73102 MiB` read with `0` audit misses, `98.8%` median GPU busy across `3211` clock samples), except 2–3 character skin textures showed psychedelic rainbow/block corruption. Looking at the run log, two placed-view diagnostics showed up right where character skin/bake textures are created: ### 1. Three `HERO LEAD` placed views over host-copied textures (`placed_in_host_written`) ```text view_address=0xe489c0000 view_offset=0 view_width=256 view_height=256 view_layers_levels=0x30001 view_format=71 copied_address=0xe489c0000 copied_bytes=90112 copied_width=256 copied_height=256 copied_layers_levels=0x90001 copied_format=78 view_address=0xd4db34000 view_offset=81920 view_width=256 view_height=256 view_layers_levels=0x70001 view_format=71 copied_address=0xd4db20000 copied_bytes=90112 copied_width=256 copied_height=256 copied_layers_levels=0x90001 copied_format=78 view_address=0x96f480000 view_offset=0 view_width=256 view_height=256 view_layers_levels=0x70001 view_format=71 copied_address=0x96f480000 copied_bytes=90112 copied_width=256 copied_height=256 copied_layers_levels=0x90001 copied_format=99 ``` Worth noting for anyone looking at `VICTORY_PLACED_COPIED` / `seed_later`: all three cases are views placed **after** the host copy (`placed_in_host_written`), cross block sizes (`format=71` `(8, 4)` over `format=78` & `99` `(16, 4)`), and one starts at a non-zero offset (`view_offset=81920`). ### 2. Placed textures overlapping mismatched host render/UAV targets (`alias_of` / `placed_inside_target`) Ten `a placed texture lies where a texture the host writes does, and is not like it` warnings (placed 8–10 level views in formats `71`/`80`/`83`/`98`/`99`/`28` over 1-level `format=28`/`29` `(4, 1)` targets): ```text [1024, 1024, 98, 1920, 1088, 29], levels 9 and 1, layers 1 and 1 [1024, 1024, 98, 1024, 1024, 28], levels 9 and 1, layers 1 and 1 [2048, 2048, 80, 1024, 1024, 28], levels 10 and 1, layers 1 and 1 [ 512, 512, 28, 1024, 1024, 28], levels 8 and 1, layers 1 and 1 [2048, 1024, 99, 1024, 1024, 28], levels 9 and 1, layers 1 and 1 [2048, 2048, 71, 1024, 1024, 28], levels 10 and 1, layers 1 and 1 [1024, 1024, 99, 512, 1024, 28], levels 9 and 1, layers 1 and 1 [ 512, 512, 83, 512, 1024, 28], levels 8 and 1, layers 3 and 1 [1024, 1024, 98, 512, 1024, 28], levels 9 and 1, layers 1 and 1 [1024, 2048, 71, 512, 1024, 28], levels 9 and 1, layers 1 and 1 ``` Plus one `placed_inside_target` warning at a non-zero offset inside a host target: ```text [16, 4, 10, 1, 512, 512, 29, 1] offset=0x8e000 target_bytes=1048576 target_flags=0xc00001 ```
Author
Owner

@⁠Widget9337 on GitHub · 2026-12-03 01:21 UTC · original

More on the vanishing vehicles from my last comment. It looks like visibility culling tied to one place, not level of detail:

  • It depends on the place, not the vehicle. Vehicles spawn at random, but whatever vehicle stands at that spot loses its body the same way.
  • Only from one viewpoint, and only on the right side of the view. From the same camera position, a vehicle disappears when it's in the right part of the screen and never when it's on the left. Turning back brings it back right away.
  • So far it's only this one spot. I haven't seen it anywhere else.
  • Not level of detail: with VICTORY_VEHICLE_LOD_BIAS=2 (#133, the log confirms detail: patched … vehicle LOD bias value=2), nothing changed.
  • Same on current main (8585cd4, with #109/#110/#133/#163/#164 in), plus the earlier builds.

Where: In front of the gun store just after getting full control of Jason.

Because whole bodies go while separate pieces (wheels, bumper, a cooler beside it) stay, and only within one region of the screen from one spot, my guess is the title's occlusion test sees something wrong there: wrong depth from an occluder, or one of the black or missing surfaces from this issue writing depth it shouldn't. Happy to try a switch or take a capture at that spot.

**@⁠Widget9337** on GitHub · 2026-12-03 01:21 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7364249518) More on the vanishing vehicles from my last comment. It looks like visibility culling tied to one place, not level of detail: - **It depends on the place, not the vehicle.** Vehicles spawn at random, but whatever vehicle stands at that spot loses its body the same way. - **Only from one viewpoint, and only on the right side of the view.** From the same camera position, a vehicle disappears when it's in the right part of the screen and never when it's on the left. Turning back brings it back right away. - **So far it's only this one spot.** I haven't seen it anywhere else. - **Not level of detail:** with `VICTORY_VEHICLE_LOD_BIAS=2` (#133, the log confirms `detail: patched … vehicle LOD bias value=2`), nothing changed. - **Same on current `main`** (8585cd4, with #109/#110/#133/#163/#164 in), plus the earlier builds. Where: In front of the gun store just after getting full control of Jason. Because whole bodies go while separate pieces (wheels, bumper, a cooler beside it) stay, and only within one region of the screen from one spot, my guess is the title's occlusion test sees something wrong there: wrong depth from an occluder, or one of the black or missing surfaces from this issue writing depth it shouldn't. Happy to try a switch or take a capture at that spot.
Author
Owner

@⁠Widget9337 on GitHub · 2026-12-03 06:50 UTC · original · edited 2026-12-03 07:04 UTC

A partial fix for some of the black and flickering textures, from the alias_of warning (the same one @⁠DrArroway found):

a placed texture lies where a texture the host writes does, and is not like it

What it is. The title draws into a render target, then places a BC texture over the same memory: for example a 1024x1024 BC7 (format 98/99) over a 1024x1024 RGBA8 target (28), or a 2048x2048 BC1 (72) over the same target. On the console both read the same memory. Here the drawing stays in the host's target, and the BC texture is filled from title memory, which the drawing never reaches, so it reads zeros or old bytes. With target_flags and target_layout added to that warning, the targets I saw are all 0xc00001 (render target) and tiled (layout 0).

What I changed. texback.rs already copies textures of a fixed list of kinds back into title memory in the console's layout (the ocean's maps, the phone photo). I used that in two steps:

  1. A size list. I put back the VICTORY_TEXTURE_BACK=<w>x<h>f<format>,... switch that 2773fdf removed, as an addition to the default list, and let render_target_wanted take drawn targets of those kinds in any layout, not only the linear photo target. I took the kinds from the warnings in all my logs: 1024x1024f28 ×68, 1920x1088f29 ×21, 512x512f29 ×16, 1024x1024f29 ×7, 512x1024f28 ×3.
  2. No list (what I run now): VICTORY_TEXTURE_BACK_ALIASED. When alias_of finds a texture of another kind placed over a target, it marks that target (the object, not its size). A marked target is copied back each time it's drawn or written. With =2, it's also copied back once at the next list close when it's found, for a target that was drawn before the texture was placed over it and maybe never again. Targets over 32 MiB are logged and skipped, and a freed target is unmarked. About 200 lines in total, mostly comments and logging, in texback.rs, resource.rs (the call in alias_of, plus the two fields on the warning) and host.rs (the once-only copy in textures_back).

Result (RX 9070 XT, 7950X3D, main 8585cd4 + local commits, Series X, 1080p with FSR 4 Balanced, RT on, 30 cap):

  • It fixes some of it, not all. A large building sign that flickered every time stopped flickering, and a few smaller signs that were always black now show. That held with the size list and with the automatic mode. Plenty of flicker and black textures remain, so this is one cause among others.
  • In one session the automatic mode marked three targets on its own (512x512f29, 1024x1024f28, 1024x1024f29). Every copy-back tiled and landed (0 could not be tiled, 0 stale).
  • No frame-rate cost I can measure. Copy-backs stayed at about 320 a second, the same as without it (most are the ocean's), and CPU preparing time per frame didn't change (5.4 ms). Median fps by draws per frame, first two minutes left out, from sessions with comparable driving:
draws per frame without size list automatic
5–7.5k 30.0 30.0 30.0
7.5–8.5k 28–30 30.0 29.5
8.5–9.5k 26.7 28.0–29.4 28.3
9.5k+ 25 26.8–27.4 24.8
worst 10% 21.8–22.5 22.9–23.0 21.0

The automatic session had the most fast driving, which is GPU-bound here and accounts for its lower heavy-scene numbers.

Not covered:

  • Textures placed inside a target rather than at its start (lies inside the memory of a texture the host writes). Here those are mostly 640x360 and 565x318 views into a 1280x720 format-17 target and into the 3840x2160 format-24 UI plane; copying those back every frame would be expensive.
  • The other cause from my earlier comment: thousands of textures whose title memory stays all zeros, with no host target over them. Most of the remaining flicker is probably there.

I'm happy to share the patch, or to test a build that does this properly upstream.

**@⁠Widget9337** on GitHub · 2026-12-03 06:50 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7370290983) · edited 2026-12-03 07:04 UTC A partial fix for some of the black and flickering textures, from the `alias_of` warning (the same one @⁠DrArroway found): > a placed texture lies where a texture the host writes does, and is not like it **What it is.** The title draws into a render target, then places a BC texture over the same memory: for example a 1024x1024 BC7 (format 98/99) over a 1024x1024 RGBA8 target (28), or a 2048x2048 BC1 (72) over the same target. On the console both read the same memory. Here the drawing stays in the host's target, and the BC texture is filled from title memory, which the drawing never reaches, so it reads zeros or old bytes. With `target_flags` and `target_layout` added to that warning, the targets I saw are all `0xc00001` (render target) and tiled (layout 0). **What I changed.** `texback.rs` already copies textures of a fixed list of kinds back into title memory in the console's layout (the ocean's maps, the phone photo). I used that in two steps: 1. **A size list.** I put back the `VICTORY_TEXTURE_BACK=<w>x<h>f<format>,...` switch that `2773fdf` removed, as an addition to the default list, and let `render_target_wanted` take drawn targets of those kinds in any layout, not only the linear photo target. I took the kinds from the warnings in all my logs: 1024x1024f28 ×68, 1920x1088f29 ×21, 512x512f29 ×16, 1024x1024f29 ×7, 512x1024f28 ×3. 2. **No list (what I run now): `VICTORY_TEXTURE_BACK_ALIASED`.** When `alias_of` finds a texture of another kind placed over a target, it marks that target (the object, not its size). A marked target is copied back each time it's drawn or written. With `=2`, it's also copied back once at the next list close when it's found, for a target that was drawn before the texture was placed over it and maybe never again. Targets over 32 MiB are logged and skipped, and a freed target is unmarked. About 200 lines in total, mostly comments and logging, in `texback.rs`, `resource.rs` (the call in `alias_of`, plus the two fields on the warning) and `host.rs` (the once-only copy in `textures_back`). **Result** (RX 9070 XT, 7950X3D, `main` `8585cd4` + local commits, Series X, 1080p with FSR 4 Balanced, RT on, 30 cap): - **It fixes some of it, not all.** A large building sign that flickered every time stopped flickering, and a few smaller signs that were always black now show. That held with the size list and with the automatic mode. **Plenty of flicker and black textures remain**, so this is one cause among others. - In one session the automatic mode marked three targets on its own (512x512f29, 1024x1024f28, 1024x1024f29). Every copy-back tiled and landed (0 `could not be tiled`, 0 stale). - **No frame-rate cost I can measure.** Copy-backs stayed at about 320 a second, the same as without it (most are the ocean's), and CPU preparing time per frame didn't change (5.4 ms). Median fps by draws per frame, first two minutes left out, from sessions with comparable driving: | draws per frame | without | size list | automatic | |---|---|---|---| | 5–7.5k | 30.0 | 30.0 | 30.0 | | 7.5–8.5k | 28–30 | 30.0 | 29.5 | | 8.5–9.5k | 26.7 | 28.0–29.4 | 28.3 | | 9.5k+ | 25 | 26.8–27.4 | 24.8 | | worst 10% | 21.8–22.5 | 22.9–23.0 | 21.0 | The automatic session had the most fast driving, which is GPU-bound here and accounts for its lower heavy-scene numbers. **Not covered:** - Textures placed *inside* a target rather than at its start (`lies inside the memory of a texture the host writes`). Here those are mostly 640x360 and 565x318 views into a 1280x720 format-17 target and into the 3840x2160 format-24 UI plane; copying those back every frame would be expensive. - The other cause from my earlier comment: thousands of textures whose title memory stays all zeros, with no host target over them. Most of the remaining flicker is probably there. I'm happy to share the patch, or to test a build that does this properly upstream.
Author
Owner

@⁠Fran-co-F on GitHub · 2026-12-03 13:00 UTC · original

Thanks @⁠Widget9337, this is the most concrete lead on the black/flickering textures so far: the title drawing into a render target and then reading the same memory as a BC texture matches what I saw (several objects going black together, the mat coming back at what looked like a lower mip).

Would you consider opening a PR with VICTORY_TEXTURE_BACK_ALIASED, even as a draft and opt-in? Since a rewrite is underway in a separate repo, having the diagnosis and the patch in a PR (with your notes on what it fixes and what it doesn't, like textures placed inside a target and the all-zero title memory) seems like the best way for it to reach the maintainers and carry over, even if the code itself doesn't.

**@⁠Fran-co-F** on GitHub · 2026-12-03 13:00 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7379178114) Thanks @⁠Widget9337, this is the most concrete lead on the black/flickering textures so far: the title drawing into a render target and then reading the same memory as a BC texture matches what I saw (several objects going black together, the mat coming back at what looked like a lower mip). Would you consider opening a PR with `VICTORY_TEXTURE_BACK_ALIASED`, even as a draft and opt-in? Since a rewrite is underway in a separate repo, having the diagnosis and the patch in a PR (with your notes on what it fixes and what it doesn't, like textures placed inside a target and the all-zero title memory) seems like the best way for it to reach the maintainers and carry over, even if the code itself doesn't.
Author
Owner

@⁠UwUCammie on GitHub · 2026-12-03 13:05 UTC · original

I have another data point for the interior-offset case. On an RX 7900 XT with RADV, loading my city save at native 1920×1080 (Series X, render scale 1.0, frame gen off) logged a 960×540 format-67 view starting at offset 0x5b0000 inside a 1920×1080 format-42 texture. Both have one mip. The loader reports target_bytes=8294400 and target_flags=0x300004.

That gives us a concrete pair to check if the alias work is extended to interior views. The diagnostic is limited to one line per kind of pair, so this capture doesn’t tell me how often the view was sampled. I haven’t matched it to a particular flickering object.

**@⁠UwUCammie** on GitHub · 2026-12-03 13:05 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7379300708) I have another data point for the interior-offset case. On an RX 7900 XT with RADV, loading my city save at native 1920×1080 (Series X, render scale 1.0, frame gen off) logged a 960×540 format-67 view starting at offset `0x5b0000` inside a 1920×1080 format-42 texture. Both have one mip. The loader reports `target_bytes=8294400` and `target_flags=0x300004`. That gives us a concrete pair to check if the alias work is extended to interior views. The diagnostic is limited to one line per kind of pair, so this capture doesn’t tell me how often the view was sampled. I haven’t matched it to a particular flickering object.
Author
Owner

@⁠DrArroway on GitHub · 2026-12-03 18:03 UTC · original

Follow-up to our previous #69 comment, this time with VICTORY_PLACED_COPIED=1 enabled on main (4e02e38).

Setup & settings

  • GPU / System: AMD Radeon RX 6900 XT (1002:73bf), Ryzen 9 7900X, 62 GiB RAM, CachyOS kernel 7.3.7-1-cachyos, GE-Proton11-15-x86_64
  • Settings: 2560x1440, RT on (VICTORY_BVH_BUILDER=1), VICTORY_PLACED_COPIED=1, VICTORY_PARTS_ONE_CALL=1, VICTORY_KEEP_HOST_BUFFERS=1, VICTORY_SKIP_INTRO=1

VICTORY_PLACED_COPIED=1 result (31m 09s session)

  • Visuals: No psychedelic character skin textures appeared anywhere during the 31-minute session (with VICTORY_PLACED_COPIED off yesterday, 2–3 character skins showed psychedelic block corruption).
  • HERO LEAD warnings: 0 (down from 3).
  • twin_copy activity: 99 placed views paired (32× 1024×1024 78→98/99, 18× 2048×2048 78→98/99, 16× 256×256 78→98/99, plus 99→98/99/95/83/78 and 71→71/72) and 21 live subresource copy events logged (16 copied=true).
  • Remaining mismatches: Only 3 alias_of render-target pairs appeared — [1024, 1024, 99, 1920, 1088, 29], [1024, 1024, 99, 1280, 720, 29], [1024, 1024, 98, 1280, 720, 29] (the target-copyback case @⁠Widget9337 is addressing with VICTORY_TEXTURE_BACK_ALIASED).

Stability & #330 / #332 notes

  • 0 GPU errors (8484 MB RAM / 3554 MB unified-memory VRAM, 25.4 median / 26.0 avg FPS across 360 tools/session-fps.sh samples, 6.7 ms avg preparing).
  • VICTORY_PARTS_ONE_CALL=1 (#330): coalesced 20.9 median joined parts/frame (p90 = 44.2) into 17.7 queue calls/frame.
  • VICTORY_KEEP_HOST_BUFFERS=1 (#332): 0.0 allocators remade for age across all 1,815 samples (saving 32.1/s median, 713.3/s peak).
  • The session ended at 31m 09s on the unrelated #57/#142 +0x2626877 allocator-list cycle hang (tools/wake-race.sh 30 on GE-Proton11-15-x86_64 passed cleanly: 3305092 waits, 6206854 wakes, ok: no damage in 30 s).
**@⁠DrArroway** on GitHub · 2026-12-03 18:03 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7387542372) Follow-up to our [previous #69 comment](https://git.gtahub.st/github/lobomfz--VIctory-xmem/issues/69), this time with **`VICTORY_PLACED_COPIED=1`** enabled on `main` (`4e02e38`). ### Setup & settings - **GPU / System:** `AMD Radeon RX 6900 XT (1002:73bf)`, Ryzen 9 7900X, 62 GiB RAM, CachyOS kernel `7.3.7-1-cachyos`, `GE-Proton11-15-x86_64` - **Settings:** `2560x1440`, RT on (`VICTORY_BVH_BUILDER=1`), `VICTORY_PLACED_COPIED=1`, `VICTORY_PARTS_ONE_CALL=1`, `VICTORY_KEEP_HOST_BUFFERS=1`, `VICTORY_SKIP_INTRO=1` ### `VICTORY_PLACED_COPIED=1` result (`31m 09s` session) - **Visuals:** **No psychedelic character skin textures appeared** anywhere during the 31-minute session (with `VICTORY_PLACED_COPIED` off yesterday, 2–3 character skins showed psychedelic block corruption). - **`HERO LEAD` warnings:** **`0`** (down from `3`). - **`twin_copy` activity:** **`99` placed views paired** (`32×` `1024×1024` `78`→`98`/`99`, `18×` `2048×2048` `78`→`98`/`99`, `16×` `256×256` `78`→`98`/`99`, plus `99`→`98`/`99`/`95`/`83`/`78` and `71`→`71`/`72`) and **`21` live subresource copy events** logged (`16` `copied=true`). - **Remaining mismatches:** Only **`3` `alias_of` render-target pairs** appeared — `[1024, 1024, 99, 1920, 1088, 29]`, `[1024, 1024, 99, 1280, 720, 29]`, `[1024, 1024, 98, 1280, 720, 29]` (the target-copyback case @⁠Widget9337 is addressing with `VICTORY_TEXTURE_BACK_ALIASED`). ### Stability & `#330` / `#332` notes - `0` GPU errors (`8484 MB` RAM / `3554 MB` unified-memory VRAM, `25.4` median / `26.0` avg FPS across `360` `tools/session-fps.sh` samples, `6.7 ms` avg preparing). - `VICTORY_PARTS_ONE_CALL=1` (`#330`): coalesced **`20.9` median joined parts/frame** (`p90 = 44.2`) into **`17.7` queue calls/frame**. - `VICTORY_KEEP_HOST_BUFFERS=1` (`#332`): **`0.0` allocators remade for age** across all `1,815` samples (saving **`32.1/s` median**, `713.3/s` peak). - The session ended at `31m 09s` on the unrelated `#57`/`#142` `+0x2626877` allocator-list cycle hang (`tools/wake-race.sh 30` on `GE-Proton11-15-x86_64` passed cleanly: `3305092 waits, 6206854 wakes`, `ok: no damage in 30 s`).
Author
Owner

@⁠fish1917 on GitHub · 2026-12-03 20:20 UTC · original

Same card (RX 9070 XT, Mesa 26.3.1 + pinned vkd3d-proton) and the same symptoms here: black or missing ground, decals and signs that change from run to run, present with RT off too. This render-target/BC-texture alias case is the first lead that matches what we see.

Could you open the PR for VICTORY_TEXTURE_BACK_ALIASED (draft and opt-in is fine), or share the patch? Happy to test it here and report before/after on the same saves, including frame time, copy-back counts and which remaining cases stay black.

**@⁠fish1917** on GitHub · 2026-12-03 20:20 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7391081361) Same card (RX 9070 XT, Mesa 26.3.1 + pinned vkd3d-proton) and the same symptoms here: black or missing ground, decals and signs that change from run to run, present with RT off too. This render-target/BC-texture alias case is the first lead that matches what we see. Could you open the PR for `VICTORY_TEXTURE_BACK_ALIASED` (draft and opt-in is fine), or share the patch? Happy to test it here and report before/after on the same saves, including frame time, copy-back counts and which remaining cases stay black.
Author
Owner

@⁠LloydNicholson on GitHub · 2026-12-03 20:28 UTC · original

Another data point, this time with every result measured on recorded frames rather than judged by eye. Eight things are ruled out.

Setup: RX 9060 XT 16 GB, Nobara (kernel 7.3), Proton-CachyOS. Build is main + upstream 842767a merged, Series X profile, high preset, diag build.

Repro: the opening motel. Walk to door 10, knock, then hold LT on Vicki and click RS to zoom in and out. Her head goes black for exactly one frame, cut off sharply at the neck, while the shine on her eyes and lips stays. In some flashes her neck, arms and back go black in the same frame. One-frame black squares also show on the wall and on the chair next to the door.

Method: every run starts from the same save copy, and every frame is saved at 640x360 (VICTORY_POP_WATCH + VICTORY_POP_ALL=1). A script counts frames where 16x16 blocks drop below 45% of both neighbours while those neighbours agree.

run switch flash frames result
baseline none 54 / 3300 (1.6%)
stand-ins VICTORY_NULL_RGBA=ff00ffff (null and neutral slots painted magenta) 65 / 3293 (2.0%) no magenta in any flash frame; the face is still black, so not stand-in/null slots
full waits every title barrier call becomes a global SYNC_ALL/ACCESS_COMMON wait (about 790 a frame) 61 / 2418 (2.5%) not a missing barrier inside a list
serial every submission sent ahead is waited for on the fence before anything else 93 / 1821 (5.1%) not GPU work overlapping, and worse
buffers every buffer refresh copied whole, write watch not asked 99 / 1633 (6.1%) not buffer copies
textures a texture is never re-read after its first upload 95 / 2784 (3.4%) not texture updates
denoiser VICTORY_SKIP_PIPELINES with all six CS_DenoiseShadowMask* (the log confirms the skip) 45 / 2419 (1.9%) the face is still black, so not the shadow denoiser here (unlike #287)

Log correlation across those runs:

  • All-zero uploads: 4.9 in the 8 frames before a flash, against 4.8 for any frame. No link.
  • Texture readbacks: 46% of flash frames are within 2 frames of one, against 41% of all frames. No link.
  • Slow frames that uploaded 5–50 MB of textures are followed by a flash 16–19% of the time, against 5% for slow frames that uploaded under 5 MB. That's a weak link, and the texture freeze above didn't change it.

The flash share rises as fps drops (1.6% at baseline, 6.1% in the slowest run). So flashes come at a roughly steady rate per second, not per frame.

A tool that may help others: shader hashes can be mapped to names. shaders.rpf stores its SGD5 records uncompressed, and blake3 of each unpacked DXBC container, first 16 hex digits, is exactly the hash VICTORY_SKIP_PIPELINES and VICTORY_SHADER_SAVE use (checked against a VICTORY_SHADER_SAVE run). So any shader can be found by name and skipped. The denoisers are:

04e36794ef6fdf63 CS_DenoiseShadowMask
a7ea75e2653e54d1 CS_DenoiseShadowMaskLDS
0ea6fac38d096770 CS_DenoiseShadowMaskLDSPacked
1963cfb471a3cf19 CS_DenoiseShadowMaskPacked
b1eb5db361c10621 CS_DenoiseShadowMaskPoissonDisc
c07823591d4c66c0 CS_DenoiseShadowMaskPoissonDiscPacked

I can share the full list of 26,503 names and the small extractor.

What's left: with every barrier a full wait, every submission serialised, buffers recopied and textures frozen, a material still goes black for one frame. So the black is computed by the title's own GPU work from inputs that look correct to us, such as a pass reading a target written by an earlier frame, or a value the title computes. Next, I'd take a GPU capture of a flash frame to see which pass writes her head black. I'm happy to run any switch or diagnostic build at this spot.

AI assistance: Claude Code (Claude Opus 5.5) built the switches, ran the analysis and wrote this report; the user played every run and saw the black face each time.

**@⁠LloydNicholson** on GitHub · 2026-12-03 20:28 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7391275708) Another data point, this time with every result measured on recorded frames rather than judged by eye. Eight things are ruled out. **Setup:** RX 9060 XT 16 GB, Nobara (kernel 7.3), Proton-CachyOS. Build is `main` + upstream `842767a` merged, Series X profile, `high` preset, diag build. **Repro:** the opening motel. Walk to door 10, knock, then hold LT on Vicki and click RS to zoom in and out. Her head goes black for exactly one frame, cut off sharply at the neck, while the shine on her eyes and lips stays. In some flashes her neck, arms and back go black in the same frame. One-frame black squares also show on the wall and on the chair next to the door. **Method:** every run starts from the same save copy, and every frame is saved at 640x360 (`VICTORY_POP_WATCH` + `VICTORY_POP_ALL=1`). A script counts frames where 16x16 blocks drop below 45% of both neighbours while those neighbours agree. | run | switch | flash frames | result | |---|---|---|---| | baseline | none | 54 / 3300 (1.6%) | | | stand-ins | `VICTORY_NULL_RGBA=ff00ffff` (null and neutral slots painted magenta) | 65 / 3293 (2.0%) | no magenta in any flash frame; the face is still black, so **not stand-in/null slots** | | full waits | every title barrier call becomes a global `SYNC_ALL`/`ACCESS_COMMON` wait (about 790 a frame) | 61 / 2418 (2.5%) | **not a missing barrier inside a list** | | serial | every submission sent ahead is waited for on the fence before anything else | 93 / 1821 (5.1%) | **not GPU work overlapping**, and worse | | buffers | every buffer refresh copied whole, write watch not asked | 99 / 1633 (6.1%) | **not buffer copies** | | textures | a texture is never re-read after its first upload | 95 / 2784 (3.4%) | **not texture updates** | | denoiser | `VICTORY_SKIP_PIPELINES` with all six `CS_DenoiseShadowMask*` (the log confirms the skip) | 45 / 2419 (1.9%) | the face is still black, so **not the shadow denoiser** here (unlike #287) | Log correlation across those runs: - All-zero uploads: 4.9 in the 8 frames before a flash, against 4.8 for any frame. **No link.** - Texture readbacks: 46% of flash frames are within 2 frames of one, against 41% of all frames. **No link.** - Slow frames that uploaded 5–50 MB of textures are followed by a flash 16–19% of the time, against 5% for slow frames that uploaded under 5 MB. That's a weak link, and the texture freeze above didn't change it. The flash share rises as fps drops (1.6% at baseline, 6.1% in the slowest run). So flashes come at a roughly steady rate per second, not per frame. **A tool that may help others:** shader hashes can be mapped to names. `shaders.rpf` stores its SGD5 records uncompressed, and blake3 of each unpacked DXBC container, first 16 hex digits, is exactly the hash `VICTORY_SKIP_PIPELINES` and `VICTORY_SHADER_SAVE` use (checked against a `VICTORY_SHADER_SAVE` run). So any shader can be found by name and skipped. The denoisers are: ``` 04e36794ef6fdf63 CS_DenoiseShadowMask a7ea75e2653e54d1 CS_DenoiseShadowMaskLDS 0ea6fac38d096770 CS_DenoiseShadowMaskLDSPacked 1963cfb471a3cf19 CS_DenoiseShadowMaskPacked b1eb5db361c10621 CS_DenoiseShadowMaskPoissonDisc c07823591d4c66c0 CS_DenoiseShadowMaskPoissonDiscPacked ``` I can share the full list of 26,503 names and the small extractor. **What's left:** with every barrier a full wait, every submission serialised, buffers recopied and textures frozen, a material still goes black for one frame. So the black is computed by the title's own GPU work from inputs that look correct to us, such as a pass reading a target written by an earlier frame, or a value the title computes. Next, I'd take a GPU capture of a flash frame to see which pass writes her head black. I'm happy to run any switch or diagnostic build at this spot. AI assistance: Claude Code (Claude Opus 5.5) built the switches, ran the analysis and wrote this report; the user played every run and saw the black face each time.
Author
Owner

@⁠Widget9337 on GitHub · 2026-12-03 22:02 UTC · original

More measurements of the one frame black flashes, from the same kind of pop watch runs as @⁠LloydNicholson's, with a few results that add to theirs. Same setup as my earlier comments (RX 9070 XT, 8585cd4 + local commits, Series X, 1080p with FSR 4 Balanced, 30 cap), render target copy back on.

A pop watch note

With VICTORY_UI_PLANE set, every frame is composed from two planes, and present skips the pop watch for composed frames (if composed { None }), so it never ran for me. I let it read the game's plane in that case (transition to COPY_SOURCE, popwatch::take, transition back), which also keeps the interface out of the counts. Anyone using the UI plane needs the same change.

Results

run frames frames with blips
baseline 16,835 705 (4.2%)
second baseline 11,348 443 (3.9%)
ray tracing off (VICTORY_BVH_BUILDER=0) 1,938 74 (3.8%)

It only happens while the character or camera is moving, and the rate per minute varies from 1% to 21% of frames with what's on screen.

Two things that may narrow it down

  • Surfaces often alternate between correct and black on consecutive frames. In an alley, a white dumpster is black, white, black, white, black over five frames, and oil barrels next to it do the same, also with ray tracing off. Over one run, 188 of 454 blip frames were followed by another blip on the very next frame (an alternating surface makes a blip on every frame), with 76 stretches of blips every other frame, the longest 12. That fits Lloyd's idea of a pass reading something written by an earlier frame, if what it reads is double buffered and one of the two is wrong.
  • Only the object's own surface goes black. A green dumpster's body turns pure black for one frame while the decals drawn on it ("NO PARKING", a sticker) stay at normal brightness, like the shine on Vicki's eyes and lips in Lloyd's repro.

Also ruled out here

These add to Lloyd's list:

  • Ray tracing: same blip rate with it off, and the barrels still alternate.
  • Stale slots (unmake_stale): with a local switch that leaves older views alone when a newer one starts at the same address with a different length (the same texture with more or fewer levels), stale slots went from about 10 to 35 per frame to about 0.2, and blips stayed at 4.5%.
  • Twin texture objects: there are about 2,500 groups of texture objects of one kind at one address (mostly a 3 level and a 7 level 256x256 BC1), and their host copies often disagree. But the stale ones never come up in the texture pass, and refreshing them made no difference. If you check this yourself: made_copy goes through hosted_for, which stamps host.used, so a diagnostic that looks up a copy marks it as used.
  • Late fills: of textures uploaded from memory that read all zeros, about half fill within 10 to 30 s, and the recheck's three windows see the fill in all but 1 of 887. Host copies that stayed stale belonged to slots the title had since rewritten, or the fill was in levels the view doesn't show yet.

Happy to run any switch or diagnostics build at the alley, and to repeat the pop watch runs to put a number on a fix.

**@⁠Widget9337** on GitHub · 2026-12-03 22:02 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7393665453) More measurements of the one frame black flashes, from the same kind of pop watch runs as @⁠LloydNicholson's, with a few results that add to theirs. Same setup as my earlier comments (RX 9070 XT, `8585cd4` + local commits, Series X, 1080p with FSR 4 Balanced, 30 cap), render target copy back on. ## A pop watch note With `VICTORY_UI_PLANE` set, every frame is composed from two planes, and `present` skips the pop watch for composed frames (`if composed { None }`), so it never ran for me. I let it read the game's plane in that case (transition to COPY_SOURCE, `popwatch::take`, transition back), which also keeps the interface out of the counts. Anyone using the UI plane needs the same change. ## Results | run | frames | frames with blips | |---|---|---| | baseline | 16,835 | 705 (4.2%) | | second baseline | 11,348 | 443 (3.9%) | | ray tracing off (`VICTORY_BVH_BUILDER=0`) | 1,938 | 74 (3.8%) | It only happens while the character or camera is moving, and the rate per minute varies from 1% to 21% of frames with what's on screen. ## Two things that may narrow it down - **Surfaces often alternate between correct and black on consecutive frames.** In an alley, a white dumpster is black, white, black, white, black over five frames, and oil barrels next to it do the same, also with ray tracing off. Over one run, 188 of 454 blip frames were followed by another blip on the very next frame (an alternating surface makes a blip on every frame), with 76 stretches of blips every other frame, the longest 12. That fits Lloyd's idea of a pass reading something written by an earlier frame, if what it reads is double buffered and one of the two is wrong. - **Only the object's own surface goes black.** A green dumpster's body turns pure black for one frame while the decals drawn on it ("NO PARKING", a sticker) stay at normal brightness, like the shine on Vicki's eyes and lips in Lloyd's repro. ## Also ruled out here These add to Lloyd's list: - **Ray tracing:** same blip rate with it off, and the barrels still alternate. - **Stale slots (`unmake_stale`):** with a local switch that leaves older views alone when a newer one starts at the same address with a different length (the same texture with more or fewer levels), stale slots went from about 10 to 35 per frame to about 0.2, and blips stayed at 4.5%. - **Twin texture objects:** there are about 2,500 groups of texture objects of one kind at one address (mostly a 3 level and a 7 level 256x256 BC1), and their host copies often disagree. But the stale ones never come up in the texture pass, and refreshing them made no difference. If you check this yourself: `made_copy` goes through `hosted_for`, which stamps `host.used`, so a diagnostic that looks up a copy marks it as used. - **Late fills:** of textures uploaded from memory that read all zeros, about half fill within 10 to 30 s, and the recheck's three windows see the fill in all but 1 of 887. Host copies that stayed stale belonged to slots the title had since rewritten, or the fill was in levels the view doesn't show yet. Happy to run any switch or diagnostics build at the alley, and to repeat the pop watch runs to put a number on a fix.
Author
Owner

@⁠Widget9337 on GitHub · 2026-12-03 22:14 UTC · original

@⁠Fran-co-F @⁠fish1917 here's the patch for VICTORY_TEXTURE_BACK_ALIASED, as one commit on current main (1152b9c). It applies cleanly and builds there, but I've only played it on 8585cd4, so a test on newer main would help.

Apply with git am victory-xmem-texture-back-aliased.patch from the repo root, rebuild (./setup.sh victory), and add to run.conf:

VICTORY_TEXTURE_BACK_ALIASED=2

=1 copies a target back each time it's drawn once a texture of another kind has been found over it; =2 also copies it back once right when it's found. Both are off by default, so nothing changes without the switch.

What to look for in the log:

  • targets with a placed texture of another kind over them are copied back into title memory (VICTORY_TEXTURE_BACK_ALIASED) mode=2 once at start
  • a target with a placed texture of another kind over it is copied back for each new kind of target it marks
  • texture readback landed ... not_tiled=0 (any could not be tiled would be worth reporting)

With it on, a big sign that flickered every time I passed it stopped, and a few small signs that were always black showed. They showed in every run since, about a dozen, except two. Both of those had a diagnostic of mine running that reads texture memory on its own thread and holds a lock the texture pass uses every 20 s, so I think that diagnostic disturbed the timing and the copy back works consistently in normal play. I haven't done a formal off and on comparison, though. The copy backs cost no frame rate I could measure. It doesn't touch textures placed inside a target (like @⁠UwUCammie's 960x540 view at an offset), and it doesn't stop the one frame black flashes.

It also brings back VICTORY_TEXTURE_BACK=<w>x<h>f<format>,... for adding kinds by hand, and adds the target's flags and layout to the alias_of warning. Before and after results on your saves would settle it: with it off and on, at a spot with black or flickering signs, a couple of runs each.

victory-xmem-texture-back-aliased.patch

**@⁠Widget9337** on GitHub · 2026-12-03 22:14 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7393927983) @⁠Fran-co-F @⁠fish1917 here's the patch for `VICTORY_TEXTURE_BACK_ALIASED`, as one commit on current `main` (`1152b9c`). It applies cleanly and builds there, but I've only played it on `8585cd4`, so a test on newer `main` would help. Apply with `git am victory-xmem-texture-back-aliased.patch` from the repo root, rebuild (`./setup.sh victory`), and add to `run.conf`: ``` VICTORY_TEXTURE_BACK_ALIASED=2 ``` `=1` copies a target back each time it's drawn once a texture of another kind has been found over it; `=2` also copies it back once right when it's found. Both are off by default, so nothing changes without the switch. What to look for in the log: - `targets with a placed texture of another kind over them are copied back into title memory (VICTORY_TEXTURE_BACK_ALIASED) mode=2` once at start - `a target with a placed texture of another kind over it is copied back` for each new kind of target it marks - `texture readback landed ... not_tiled=0` (any `could not be tiled` would be worth reporting) With it on, a big sign that flickered every time I passed it stopped, and a few small signs that were always black showed. They showed in every run since, about a dozen, except two. Both of those had a diagnostic of mine running that reads texture memory on its own thread and holds a lock the texture pass uses every 20 s, so I think that diagnostic disturbed the timing and the copy back works consistently in normal play. I haven't done a formal off and on comparison, though. The copy backs cost no frame rate I could measure. It doesn't touch textures placed inside a target (like @⁠UwUCammie's 960x540 view at an offset), and it doesn't stop the one frame black flashes. It also brings back `VICTORY_TEXTURE_BACK=<w>x<h>f<format>,...` for adding kinds by hand, and adds the target's flags and layout to the `alias_of` warning. Before and after results on your saves would settle it: with it off and on, at a spot with black or flickering signs, a couple of runs each. [victory-xmem-texture-back-aliased.patch](https://github.com/user-attachments/files/35838773/victory-xmem-texture-back-aliased.patch)
Author
Owner

@⁠Fran-co-F on GitHub · 2026-12-04 03:22 UTC · original

@⁠Widget9337 thanks for the patch. I tested it on current main (1152b9c), RX 9070 XT, Series X, ray tracing on, at the prison opening, and here it made things worse.

With VICTORY_TEXTURE_BACK_ALIASED=2 it marked one target, a 1920x1088 RGBA8 sRGB (format 29), because a 2048x2048 BC1 with 10 levels was placed at its address:

[2048, 2048, 71, 1920, 1088, 29], levels 10 and 1 ... target_flags=0xc00001 target_layout=0x0
a target with a placed texture of another kind over it is copied back kind=(1920, 1088, 29) bytes=8847360 marked=1

From then on the guard's arms showed multicolored block noise, Lucia's arms went flat grey-green, and an inmate's face was smeared with color. That is what BC1 decoding of a rendered RGBA8 image looks like. A screen-sized RGBA8 target and a 2048x2048 BC1 with mips cannot be two views of the same texels, so this looks like memory the title used for one and then the other: copying the target back on every draw overwrites the texture's own data. The same spot looked better with the switch off (I didn't record that run). The other pairs I've seen here are the same kind: BC7 2048x512 over RGBA8 1024x1024, BC7 2048x1024 over RGBA8 736x1280, BC1 2048x2048 over RGBA8 1024x1024.

A filter on top of your patch. Copy a target back only when the texture's blocks line up with the target's texels: same bytes per element, and the target's width and height are the texture's divided by the block size (a BC texture over an R32G32_UINT/R32G32B32A32_UINT target a quarter its size, or a same-size texture with other levels and as many bytes per texel). The alias_of warning also gets fits=:

diff --git a/crates/victory-gpu/src/resource.rs b/crates/victory-gpu/src/resource.rs
index 91194f2..009486d 100644
--- a/crates/victory-gpu/src/resource.rs
+++ b/crates/victory-gpu/src/resource.rs
@@ -1523,9 +1523,28 @@ pub(crate) fn alias_of(this: This) -> Option<This> {
             o.desc.height,
             o.desc.format,
         ];
+        // The texture reads the target's bytes as they are only when its
+        // blocks line up with the target's texels: a BC texture over an
+        // R32G32(B32A32)_UINT target a quarter its size, or a same-size
+        // texture of other levels with as many bytes per texel. Any other
+        // pair is memory the title used for one and then the other (a
+        // 2048x2048 BC1 over a 1920x1088 RGBA8 target): copying the target
+        // back would overwrite the texture's own texels.
+        let fits = match (element(r.desc.format), element(o.desc.format)) {
+            (Some((bytes, block)), Some((target_bytes, 1))) => {
+                bytes == target_bytes
+                    && o.desc.dimension == r.desc.dimension
+                    && o.desc.width == r.desc.width.div_ceil(block)
+                    && u64::from(o.desc.height) == u64::from(r.desc.height).div_ceil(block)
+                    && o.desc.depth_or_array_size == r.desc.depth_or_array_size
+            }
+            _ => false,
+        };
         // With VICTORY_TEXTURE_BACK_ALIASED the target goes back to
         // title memory, so this texture is filled with what was drawn.
-        if let Some(bytes) = footprint(&o.desc).map(|f| f.size as usize) {
+        if let Some(bytes) = footprint(&o.desc).map(|f| f.size as usize)
+            && fits
+        {
             crate::texback::aliased(
                 other,
                 (o.desc.width, o.desc.height, o.desc.format),
@@ -1539,6 +1558,7 @@ pub(crate) fn alias_of(this: This) -> Option<This> {
                 texture = ?other,
                 target_flags = format_args!("{:#x}", o.desc.flags),
                 target_layout = format_args!("{:#x}", o.desc.layout),
+                fits,
                 "a placed texture lies where a texture the host writes does, and is not like it (width, height, format of each): {pair:?}, levels {} and {}, layers {} and {}",
                 r.desc.mip_levels, o.desc.mip_levels, r.desc.depth_or_array_size, o.desc.depth_or_array_size
             );

With it, all four pairs above say fits=false and nothing is copied: no more noise, but also no change to the black materials or the one-frame flashes on this save. Could you check whether the pairs behind your fixed signs say fits=true? If they don't, the copy that fixed them overwrote something else that happened to help, and the patch needs another way to tell a real alias from reused memory.

AI assistance: Claude Code (Claude Opus 5.5) built and analyzed the runs and wrote this; I played them and saw the results.

**@⁠Fran-co-F** on GitHub · 2026-12-04 03:22 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7400001561) @⁠Widget9337 thanks for the patch. I tested it on current `main` (`1152b9c`), RX 9070 XT, Series X, ray tracing on, at the prison opening, and here it made things worse. **With `VICTORY_TEXTURE_BACK_ALIASED=2`** it marked one target, a 1920x1088 RGBA8 sRGB (format 29), because a 2048x2048 BC1 with 10 levels was placed at its address: ``` [2048, 2048, 71, 1920, 1088, 29], levels 10 and 1 ... target_flags=0xc00001 target_layout=0x0 a target with a placed texture of another kind over it is copied back kind=(1920, 1088, 29) bytes=8847360 marked=1 ``` From then on the guard's arms showed multicolored block noise, Lucia's arms went flat grey-green, and an inmate's face was smeared with color. That is what BC1 decoding of a rendered RGBA8 image looks like. A screen-sized RGBA8 target and a 2048x2048 BC1 with mips cannot be two views of the same texels, so this looks like memory the title used for one and then the other: copying the target back on every draw overwrites the texture's own data. The same spot looked better with the switch off (I didn't record that run). The other pairs I've seen here are the same kind: BC7 2048x512 over RGBA8 1024x1024, BC7 2048x1024 over RGBA8 736x1280, BC1 2048x2048 over RGBA8 1024x1024. **A filter on top of your patch.** Copy a target back only when the texture's blocks line up with the target's texels: same bytes per element, and the target's width and height are the texture's divided by the block size (a BC texture over an `R32G32_UINT`/`R32G32B32A32_UINT` target a quarter its size, or a same-size texture with other levels and as many bytes per texel). The `alias_of` warning also gets `fits=`: ```diff diff --git a/crates/victory-gpu/src/resource.rs b/crates/victory-gpu/src/resource.rs index 91194f2..009486d 100644 --- a/crates/victory-gpu/src/resource.rs +++ b/crates/victory-gpu/src/resource.rs @@ -1523,9 +1523,28 @@ pub(crate) fn alias_of(this: This) -> Option<This> { o.desc.height, o.desc.format, ]; + // The texture reads the target's bytes as they are only when its + // blocks line up with the target's texels: a BC texture over an + // R32G32(B32A32)_UINT target a quarter its size, or a same-size + // texture of other levels with as many bytes per texel. Any other + // pair is memory the title used for one and then the other (a + // 2048x2048 BC1 over a 1920x1088 RGBA8 target): copying the target + // back would overwrite the texture's own texels. + let fits = match (element(r.desc.format), element(o.desc.format)) { + (Some((bytes, block)), Some((target_bytes, 1))) => { + bytes == target_bytes + && o.desc.dimension == r.desc.dimension + && o.desc.width == r.desc.width.div_ceil(block) + && u64::from(o.desc.height) == u64::from(r.desc.height).div_ceil(block) + && o.desc.depth_or_array_size == r.desc.depth_or_array_size + } + _ => false, + }; // With VICTORY_TEXTURE_BACK_ALIASED the target goes back to // title memory, so this texture is filled with what was drawn. - if let Some(bytes) = footprint(&o.desc).map(|f| f.size as usize) { + if let Some(bytes) = footprint(&o.desc).map(|f| f.size as usize) + && fits + { crate::texback::aliased( other, (o.desc.width, o.desc.height, o.desc.format), @@ -1539,6 +1558,7 @@ pub(crate) fn alias_of(this: This) -> Option<This> { texture = ?other, target_flags = format_args!("{:#x}", o.desc.flags), target_layout = format_args!("{:#x}", o.desc.layout), + fits, "a placed texture lies where a texture the host writes does, and is not like it (width, height, format of each): {pair:?}, levels {} and {}, layers {} and {}", r.desc.mip_levels, o.desc.mip_levels, r.desc.depth_or_array_size, o.desc.depth_or_array_size ); ``` With it, all four pairs above say `fits=false` and nothing is copied: no more noise, but also no change to the black materials or the one-frame flashes on this save. Could you check whether the pairs behind your fixed signs say `fits=true`? If they don't, the copy that fixed them overwrote something else that happened to help, and the patch needs another way to tell a real alias from reused memory. AI assistance: Claude Code (Claude Opus 5.5) built and analyzed the runs and wrote this; I played them and saw the results.
Author
Owner

@⁠abomalocaris on GitHub · 2026-12-04 04:14 UTC · original

Data from an RX 9070 XT 16 GB: how early copies are let go, and a label that is black in half of all launches

Setup: RX 9070 XT 16 GB, Ryzen 7 9800X3D, 32 GB RAM, CachyOS (kernel 7.3.7), proton-cachyos-slr, this repo's patched Mesa 26.3.1 and vkd3d-proton. Series X profile, 2560x1440 output with FSR 4 quality, ray tracing on, VICTORY_PAGES=0, VICTORY_PLACED_COPIED=1.

1. Objects that go black for a moment and come back. On 8fd0a70 the card settles at about 13.1 of 15.4 GB in free roam, which is inside the band where vram_keep lets go of copies idle for 4 s (from 80 % of the budget). Looking away from something for a few seconds and back is enough. A diagnostics build's stats: textures line over a scripted 10 minute walk-and-pan:

copies let go made again card in use
defaults 140,315 25,260 12.9 GB
VICTORY_VRAM_BUDGET_MB=17000, room 87 %, room cap 87 % 107,815 4,688 14.2 GB

Raising the budget only moves the lines up (the room settings keep admissions near 14.8 GB), so it is a workaround, but "made again" fell by 81 % at the same frame rate, and by eye a plant's shadow that used to pop in and out stopped doing so. With #342's card memory changes on current main the same test lets go of almost nothing (see my comment there).

2. A decal that is black for a whole session, decided at load. In the opening cutscene on the boat, the neck label of the beer bottle is either drawn or solid black for the whole scene. Classified from screenshots at a fixed time over 44 scripted launches of the same save: black in 23, drawn in 21. It does not follow ray tracing (builder off: black in 3 of 4), paging on or off, the texture room setting, the FSR mode or the frame interval, and none of the counters I compared differs between the two groups (zero-memory uploads, "filled later", bake sources failed or not mapped, alias_of warnings, placed-view copies). Builds that changed asset read timing were black more often (12 of 15), so it looks like a race at load. A US flag prop in free roam does the same: solid black for a whole session in some launches, fine in others. Still the case on main at 00aa4d3 + #342 + #344 (2 black, 2 drawn in 4 launches).

3. Black triangles on the player's elbows. While walking, patches of the arm mesh near the elbow are black for one or two frames (captured with VICTORY_CAPTURE_FRAMES; I can attach the frames). They look like whole triangles or meshlets, not texels. Still there with VICTORY_BVH_BUILDER=0, with VICTORY_PLACED_COPIED=0, with VICTORY_HW_RT=1, and with #344 merged.

I tried to trace the label's pixel with VICTORY_RECORD and replay --pixel; a capture of that frame is 28 GB here, which does not fit in this machine's memory to replay. If a smaller capture is possible I will try again.

Written with AI assistance (Claude Code); the runs and observations are from my own machine.

**@⁠abomalocaris** on GitHub · 2026-12-04 04:14 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7400987154) **Data from an RX 9070 XT 16 GB: how early copies are let go, and a label that is black in half of all launches** Setup: RX 9070 XT 16 GB, Ryzen 7 9800X3D, 32 GB RAM, CachyOS (kernel 7.3.7), `proton-cachyos-slr`, this repo's patched Mesa 26.3.1 and vkd3d-proton. Series X profile, 2560x1440 output with FSR 4 quality, ray tracing on, `VICTORY_PAGES=0`, `VICTORY_PLACED_COPIED=1`. **1. Objects that go black for a moment and come back.** On `8fd0a70` the card settles at about 13.1 of 15.4 GB in free roam, which is inside the band where `vram_keep` lets go of copies idle for 4 s (from 80 % of the budget). Looking away from something for a few seconds and back is enough. A diagnostics build's `stats: textures` line over a scripted 10 minute walk-and-pan: | | copies let go | made again | card in use | |---|---|---|---| | defaults | 140,315 | 25,260 | 12.9 GB | | `VICTORY_VRAM_BUDGET_MB=17000`, room 87 %, room cap 87 % | 107,815 | 4,688 | 14.2 GB | Raising the budget only moves the lines up (the room settings keep admissions near 14.8 GB), so it is a workaround, but "made again" fell by 81 % at the same frame rate, and by eye a plant's shadow that used to pop in and out stopped doing so. With #342's card memory changes on current `main` the same test lets go of almost nothing (see my comment there). **2. A decal that is black for a whole session, decided at load.** In the opening cutscene on the boat, the neck label of the beer bottle is either drawn or solid black for the whole scene. Classified from screenshots at a fixed time over 44 scripted launches of the same save: **black in 23, drawn in 21.** It does not follow ray tracing (builder off: black in 3 of 4), paging on or off, the texture room setting, the FSR mode or the frame interval, and none of the counters I compared differs between the two groups (zero-memory uploads, "filled later", bake sources failed or not mapped, `alias_of` warnings, placed-view copies). Builds that changed asset read timing were black more often (12 of 15), so it looks like a race at load. A US flag prop in free roam does the same: solid black for a whole session in some launches, fine in others. Still the case on `main` at `00aa4d3` + #342 + #344 (2 black, 2 drawn in 4 launches). **3. Black triangles on the player's elbows.** While walking, patches of the arm mesh near the elbow are black for one or two frames (captured with `VICTORY_CAPTURE_FRAMES`; I can attach the frames). They look like whole triangles or meshlets, not texels. Still there with `VICTORY_BVH_BUILDER=0`, with `VICTORY_PLACED_COPIED=0`, with `VICTORY_HW_RT=1`, and with #344 merged. I tried to trace the label's pixel with `VICTORY_RECORD` and `replay --pixel`; a capture of that frame is 28 GB here, which does not fit in this machine's memory to replay. If a smaller capture is possible I will try again. _Written with AI assistance (Claude Code); the runs and observations are from my own machine._
Author
Owner

@⁠Widget9337 on GitHub · 2026-12-04 05:25 UTC · original · edited 2026-12-04 05:32 UTC

@⁠Fran-co-F thanks for testing it, and for the filter. I checked every pair from my runs against it: none fit. Over 33 logs since 8585cd4, the targets the automatic mode marked were:

target marked placed over it
1024x1024 RGBA8 (28) BC1 2048x2048 (71, 72), BC4 and BC5 (80, 83), BC7 1024x1024, 2048x1024, 1024x2048, 2048x2048 (98, 99), and once an RGBA8 512x512 with 8 levels
1024x1024 RGBA8 sRGB (29) BC1 2048x2048, BC7 1024x1024 and 2048x1024
512x512 RGBA8 sRGB (29) a 16x20 RGBA16F (10), one level
1920x1088 RGBA8 sRGB (29) BC1 and BC7, 1024x1024 and 2048x2048

The last one is the same target that gave you the block noise, and it was marked in 4 of my runs. None of these pairs can be two views of the same texels, so I agree with you: it's memory the title used for one and then the other, and the copy back was writing over the texture's own data. Please treat the patch as withdrawn. I wouldn't add it upstream, even with the filter, since nothing here fits.

That also changes how I read my results. @⁠abomalocaris's beer bottle label, black in 23 of 44 launches and decided at load, matches my small signs: they showed in most runs and were black in a few, and I'd put that down to a diagnostic of mine. A load race explains it better, so the small signs are probably not the copy back's doing. The other result was a large building sign that flickered every time I passed it and stopped with the copy back on. I've now done the off run I should have done before posting: with the copy back off, the big sign doesn't flicker and the small signs show. So neither result came from the copy back, and I have nothing left in its favor.

**@⁠Widget9337** on GitHub · 2026-12-04 05:25 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7402373332) · edited 2026-12-04 05:32 UTC @⁠Fran-co-F thanks for testing it, and for the filter. I checked every pair from my runs against it: none fit. Over 33 logs since `8585cd4`, the targets the automatic mode marked were: | target marked | placed over it | |---|---| | 1024x1024 RGBA8 (28) | BC1 2048x2048 (71, 72), BC4 and BC5 (80, 83), BC7 1024x1024, 2048x1024, 1024x2048, 2048x2048 (98, 99), and once an RGBA8 512x512 with 8 levels | | 1024x1024 RGBA8 sRGB (29) | BC1 2048x2048, BC7 1024x1024 and 2048x1024 | | 512x512 RGBA8 sRGB (29) | a 16x20 RGBA16F (10), one level | | 1920x1088 RGBA8 sRGB (29) | BC1 and BC7, 1024x1024 and 2048x2048 | The last one is the same target that gave you the block noise, and it was marked in 4 of my runs. None of these pairs can be two views of the same texels, so I agree with you: it's memory the title used for one and then the other, and the copy back was writing over the texture's own data. Please treat the patch as withdrawn. I wouldn't add it upstream, even with the filter, since nothing here fits. That also changes how I read my results. @⁠abomalocaris's beer bottle label, black in 23 of 44 launches and decided at load, matches my small signs: they showed in most runs and were black in a few, and I'd put that down to a diagnostic of mine. A load race explains it better, so the small signs are probably not the copy back's doing. The other result was a large building sign that flickered every time I passed it and stopped with the copy back on. I've now done the off run I should have done before posting: with the copy back off, the big sign doesn't flicker and the small signs show. So neither result came from the copy back, and I have nothing left in its favor.
Author
Owner

@⁠Widget9337 on GitHub · 2026-12-04 16:37 UTC · original · edited 2026-12-04 21:11 UTC

More on the one frame flashes: four lighting stages switched off with VICTORY_SKIP_PIPELINES, none of which changed them, and an observation that may point somewhere else. Same setup as before (RX 9070 XT, Series X, 1080p with FSR 4 Balanced, ray tracing on), build 8585cd4 with #216, #344 and #428 on top, diagnostics build, on foot at the alley where flashes are frequent.

Shader names

I made the name list the way @⁠LloydNicholson described (blake3 of each unpacked container in shaders.rpf, first 16 hex digits): 26,503 records, and his denoiser hashes match. The frame report's drop lines (dropped N/frame without a host pipeline: skipped shader <hash>) show which of the skipped shaders actually run, which made it easy to check each skip took effect.

What was switched off

test skipped what ran (dropped every frame) flashes
1 GI temporal resolve, indirect_diffuse_lighting:CS_ScreenProbes_TemporalResolve* (6) only ..._ReflectiveCaustics_a911b49c, 1 a frame no change
2 TAA_Utilities:CS_ReconstructSurfaces, CS_FilterShadingChange CS_ReconstructSurfaces, 1 a frame (the other never runs) no change
3 all 77 indirect_diffuse_lighting:* (GI off entirely) 21 shaders: the screen probe chain, CS_FinalGather_*, CS_ScreenSpaceBentCones* no change
4 all 20 ambient_map:* 8: CS_AmbientMap, the classify and sky passes, CS_LightMap* no change

With GI or the ambient map off, shaded areas look very different, but surfaces still flash for a frame and come back, same as before. Earlier, outside VIctory: radv_split_fma=true with RADV_DEBUG=nodcc,nohiz,nofastclears left the flashes per frame unchanged (103 vs 108 blip blocks per 1,000 frames), and #344 didn't change them either.

Sharp cutoffs along materials

The flashes aren't only black. Often a material goes black for a frame, but sometimes it goes bright for a frame, close to white. It's too fast to be sure which each time, but it looks as if the material just isn't shown for that frame. Either way the change is always cut sharply along a material boundary, never a soft falloff: the green dumpster's body goes black while the decals on it stay lit, and in Lloyd's repro Vicki's head goes black cut at the neck while the shine on her eyes stays (the eyes have their own decal material, ped_standard_eye_cap_decal). That looks like a step that works per material and loses one material for a frame, not a light source.

This renderer shades by material tile: tiled_lighting:CS_GenerateMaterialMasks, CS_MaterialTilesInitial and CS_MaterialTiles sort the screen into tiles by material, CS_ResetMaterialTilesIndirectArgs resets the per material arguments, and the lighting then runs per material through those GPU written arguments (VS_TiledLighting). If one material's tile list or argument count is wrong or stale for a frame, that whole material would go unshaded while its neighbours are fine, showing whatever the lighting target held there (black when cleared, something bright when not), and since the tiles change as the camera moves, it would mostly happen in motion. I can't skip those without losing all lighting, so I can't test it from here, but it fits everything above better than the lighting stages did.

One cause in that direction is ruled out: #445's VICTORY_IN_PLACE_ALONE=all (every indirect execution whose arguments are read in place clamped alone, so none can read an earlier frame's record from a batch opened too early; the log confirmed kinds="all") didn't stop the flashes. They looked a little rarer, but the game was down to 15 to 17 fps, and in an earlier run at about 17 fps (a GPU slowdown, not a switch) the flashes per frame were the same as at 28 fps (103 vs 108 blip blocks per 1,000 frames), so fewer of them a second is likely just the frame rate. So if a material's tile count or list is wrong for a frame, it isn't from a stale clamp; it would have to be the count itself, or how the lighting reads it.

One more thing in that direction, weaker: Lloyd's "buffers" test (every buffer refresh copied whole) had the highest flash share (6.1% against 1.6%), though it was also his slowest run. If a refresh from the CPU side can overwrite indirect arguments the title's own compute pass wrote earlier in the frame, that would make exactly this kind of failure, and recopying more would make it worse. I haven't been able to confirm that in the code.

I tried a frame capture to trace a flashing pixel, but a capture here can't be replayed on 64 GB (details in #441). A note for counting these: the pop watch's own blip count takes any block that differs from both neighbours while they agree, so it counts the bright flashes too, but a script that only looks for blocks dropping below 45% of their neighbours (like the one in Lloyd's runs) would miss them. Happy to run any switch or diagnostics build at the alley.

**@⁠Widget9337** on GitHub · 2026-12-04 16:37 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/69#issuecomment-7417713604) · edited 2026-12-04 21:11 UTC More on the one frame flashes: four lighting stages switched off with `VICTORY_SKIP_PIPELINES`, none of which changed them, and an observation that may point somewhere else. Same setup as before (RX 9070 XT, Series X, 1080p with FSR 4 Balanced, ray tracing on), build `8585cd4` with #216, #344 and #428 on top, diagnostics build, on foot at the alley where flashes are frequent. ## Shader names I made the name list the way @⁠LloydNicholson described (blake3 of each unpacked container in `shaders.rpf`, first 16 hex digits): 26,503 records, and his denoiser hashes match. The frame report's drop lines (`dropped N/frame without a host pipeline: skipped shader <hash>`) show which of the skipped shaders actually run, which made it easy to check each skip took effect. ## What was switched off | test | skipped | what ran (dropped every frame) | flashes | |---|---|---|---| | 1 | GI temporal resolve, `indirect_diffuse_lighting:CS_ScreenProbes_TemporalResolve*` (6) | only `..._ReflectiveCaustics_a911b49c`, 1 a frame | no change | | 2 | `TAA_Utilities:CS_ReconstructSurfaces`, `CS_FilterShadingChange` | `CS_ReconstructSurfaces`, 1 a frame (the other never runs) | no change | | 3 | all 77 `indirect_diffuse_lighting:*` (GI off entirely) | 21 shaders: the screen probe chain, `CS_FinalGather_*`, `CS_ScreenSpaceBentCones*` | no change | | 4 | all 20 `ambient_map:*` | 8: `CS_AmbientMap`, the classify and sky passes, `CS_LightMap*` | no change | With GI or the ambient map off, shaded areas look very different, but surfaces still flash for a frame and come back, same as before. Earlier, outside VIctory: `radv_split_fma=true` with `RADV_DEBUG=nodcc,nohiz,nofastclears` left the flashes per frame unchanged (103 vs 108 blip blocks per 1,000 frames), and #344 didn't change them either. ## Sharp cutoffs along materials The flashes aren't only black. Often a material goes black for a frame, but sometimes it goes bright for a frame, close to white. It's too fast to be sure which each time, but it looks as if the material just isn't shown for that frame. Either way the change is always cut sharply along a material boundary, never a soft falloff: the green dumpster's body goes black while the decals on it stay lit, and in Lloyd's repro Vicki's head goes black cut at the neck while the shine on her eyes stays (the eyes have their own decal material, `ped_standard_eye_cap_decal`). That looks like a step that works per material and loses one material for a frame, not a light source. This renderer shades by material tile: `tiled_lighting:CS_GenerateMaterialMasks`, `CS_MaterialTilesInitial` and `CS_MaterialTiles` sort the screen into tiles by material, `CS_ResetMaterialTilesIndirectArgs` resets the per material arguments, and the lighting then runs per material through those GPU written arguments (`VS_TiledLighting`). If one material's tile list or argument count is wrong or stale for a frame, that whole material would go unshaded while its neighbours are fine, showing whatever the lighting target held there (black when cleared, something bright when not), and since the tiles change as the camera moves, it would mostly happen in motion. I can't skip those without losing all lighting, so I can't test it from here, but it fits everything above better than the lighting stages did. One cause in that direction is ruled out: #445's `VICTORY_IN_PLACE_ALONE=all` (every indirect execution whose arguments are read in place clamped alone, so none can read an earlier frame's record from a batch opened too early; the log confirmed `kinds="all"`) didn't stop the flashes. They looked a little rarer, but the game was down to 15 to 17 fps, and in an earlier run at about 17 fps (a GPU slowdown, not a switch) the flashes per frame were the same as at 28 fps (103 vs 108 blip blocks per 1,000 frames), so fewer of them a second is likely just the frame rate. So if a material's tile count or list is wrong for a frame, it isn't from a stale clamp; it would have to be the count itself, or how the lighting reads it. One more thing in that direction, weaker: Lloyd's "buffers" test (every buffer refresh copied whole) had the highest flash share (6.1% against 1.6%), though it was also his slowest run. If a refresh from the CPU side can overwrite indirect arguments the title's own compute pass wrote earlier in the frame, that would make exactly this kind of failure, and recopying more would make it worse. I haven't been able to confirm that in the code. I tried a frame capture to trace a flashing pixel, but a capture here can't be replayed on 64 GB (details in #441). A note for counting these: the pop watch's own blip count takes any block that differs from both neighbours while they agree, so it counts the bright flashes too, but a script that only looks for blocks dropping below 45% of their neighbours (like the one in Lloyd's runs) would miss them. Happy to run any switch or diagnostics build at the alley.
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#69
No description provided.