Trees and props vanish for a single frame on RX 6750 GRE (RDNA2) — the CPU occlusion image read as 0? #263

Open
opened 2026-12-04 09:17:22 +00:00 by Daytz · 6 comments

When driving/walking through vegetation, trees and bushes flicker for a frame; buildings and vehicles do it occasionally too; jaxe also reproduces it (different lineage) → likely a common bug

When driving/walking through vegetation, trees and bushes flicker for a frame; buildings and vehicles do it occasionally too; jaxe also reproduces it (different lineage) → likely a common bug
Author

The long version is in the attached txt; here is the short one, with the reason I think it is the CPU occlusion image.

The title's CPU occlusion image is 128x72 R32_FLOAT (~1 to 2,300 linear depth). It is read by depth_pyramid_cpu_occlusion (CS_InitDepthPyramidWithCpuOcclusion3x3) into the depth pyramid that feeds CS_BatchCull*. When its texture is still waiting (streamed in late — more often on a 10 GB card), the view resolves null and a null R32_FLOAT view reads 0, i.e. an occluder nearer than everything, so the GPU culls most of the scene for that one frame. That is the blink: it comes back the next frame when the texture is there.

VIda (Zelbrad/VIda, crates/victory-gpu/src/descriptor/host.rs, near OCCLUSION_SIZE) fixes it with a stand-in and no extra cost worth mentioning:

const OCCLUSION_SIZE: (u64, u32) = (128, 72);
const OCCLUSION_FAR_DEPTH: f32 = 1.0e6;
// a view that would be null gets a 1x1 R32_FLOAT of depth 1e6:
// no CPU occluders that frame, so nothing is culled

gated by VICTORY_OCCLUSION_FAR (on by default) and detected by view shape (is_occlusion_image: 2D, R32_FLOAT, 128x72).

Questions, in case it helps you decide:

  1. Does Darner substitute something for a null view of that image today? I could not find a DARNER_OCCLUSION_* switch.
  2. Is a far-depth stand-in acceptable in your design, or does something rely on the null?
  3. Is there a switch/log level that counts views resolving null? I can run ten minutes and count, before and after a fix, on this card.

Repro on my side: RX 6750 GRE 10 GB (RDNA2), 32 GB, Win11 26200, --series-s --res 1080to1440 --fg-type auto, texture quality half, v2026.12.03.02, 18-22 fps, several blinks a minute in dense vegetation; eikkapine/jaxe shows the same blink.

The long version is in the attached txt; here is the short one, with the reason I think it is the CPU occlusion image. The title's CPU occlusion image is 128x72 R32_FLOAT (~1 to 2,300 linear depth). It is read by `depth_pyramid_cpu_occlusion` (`CS_InitDepthPyramidWithCpuOcclusion3x3`) into the depth pyramid that feeds `CS_BatchCull*`. When its texture is still waiting (streamed in late — more often on a 10 GB card), the view resolves null and a null R32_FLOAT view reads **0**, i.e. an occluder nearer than everything, so the GPU culls most of the scene for that one frame. That is the blink: it comes back the next frame when the texture is there. VIda (Zelbrad/VIda, `crates/victory-gpu/src/descriptor/host.rs`, near `OCCLUSION_SIZE`) fixes it with a stand-in and no extra cost worth mentioning: ```rust const OCCLUSION_SIZE: (u64, u32) = (128, 72); const OCCLUSION_FAR_DEPTH: f32 = 1.0e6; // a view that would be null gets a 1x1 R32_FLOAT of depth 1e6: // no CPU occluders that frame, so nothing is culled ``` gated by `VICTORY_OCCLUSION_FAR` (on by default) and detected by view shape (`is_occlusion_image`: 2D, R32_FLOAT, 128x72). Questions, in case it helps you decide: 1. Does Darner substitute something for a null view of that image today? I could not find a `DARNER_OCCLUSION_*` switch. 2. Is a far-depth stand-in acceptable in your design, or does something rely on the null? 3. Is there a switch/log level that counts views resolving null? I can run ten minutes and count, before and after a fix, on this card. Repro on my side: RX 6750 GRE 10 GB (RDNA2), 32 GB, Win11 26200, `--series-s --res 1080to1440 --fg-type auto`, texture quality half, v2026.12.03.02, 18-22 fps, several blinks a minute in dense vegetation; `eikkapine/jaxe` shows the same blink.

I checked the Darner code for v2026.12.03.02. The current fallback is generic: neutral_for uses the SRV dimension to choose a gray R8G8B8A8_UNORM stand-in, and uses a null view when it cannot supply one. There is no dedicated far-depth substitute for the reported 128×72 R32_FLOAT image in that path.

The texture slots shown a gray stand-in since the start, by kind log line counts all 2D, 1D, 3D and cube stand-ins separately. The 2D total combines every 2D texture, so a longer run with that counter alone cannot identify this image. DARNER_QUERIES controls a separate visibility-query path.

The missing occlusion image is a plausible lead. The useful next evidence is whether the suspect binding was absent or substituted on the flickering frame. A shape match by itself would also include unrelated views with that shape and format.

I checked the Darner code for v2026.12.03.02. The current fallback is generic: neutral_for uses the SRV dimension to choose a gray R8G8B8A8_UNORM stand-in, and uses a null view when it cannot supply one. There is no dedicated far-depth substitute for the reported 128×72 R32_FLOAT image in that path. The texture slots shown a gray stand-in since the start, by kind log line counts all 2D, 1D, 3D and cube stand-ins separately. The 2D total combines every 2D texture, so a longer run with that counter alone cannot identify this image. DARNER_QUERIES controls a separate visibility-query path. The missing occlusion image is a plausible lead. The useful next evidence is whether the suspect binding was absent or substituted on the flickering frame. A shape match by itself would also include unrelated views with that shape and format.
Author

I built an instrumented Darner from the v2026.12.03.02 source and ran it for a session, so here is the answer to your question: on the flickering frames the suspect binding is substituted, never absent.

What I added (nothing else changed): a counter in descriptor::host, incremented in neutral_for when a view is 2D and its SRV description format is R32_FLOAT (41), and in null_for for the same shape. It logs every 64th hit with the frame number and the running count (DARNER_OCCLUSION_PROBE=0 would turn it off).

Result (one session, ~2h40m of play in dense vegetation, RX 6750 GRE 10 GB, Series S, 1080to1440, FSR auto):

occlusion probe: 2D R32_FLOAT view shown the gray stand-in  gray=true frame=3       n=1
occlusion probe: 2D R32_FLOAT view shown the gray stand-in  gray=true frame=20123   n=64
occlusion probe: 2D R32_FLOAT view shown the gray stand-in  gray=true frame=5783478 n=128
occlusion probe: 2D R32_FLOAT view shown the gray stand-in  gray=true frame=5783478 n=192

192 hits logged (the counter prints every 64th; the session ended before the next multiple, so the true total is at or just above 192), all gray, zero null — roughly one a minute on average, and they arrive in bursts (two in the same frame above). The "gray stand-in by kind" line never fired for this image, so the kind counter does not see it either.

Why I think gray is still the problem, and not only "absence"
The image is a depth image: 128x72 R32_FLOAT, linear depth about 1 to 2,300. The stand-in is a 1x1 R8G8B8A8_UNORM gray (~0.5). For a depth read, 0.5 is nearer than every real occluder in that range — so the CPU occlusion seed is "something huge right in front of the camera" and CS_BatchCull* drops the scene for that frame, exactly the blink. It is the same failure as reading 0, just a different near value. (Whether the SRV format change itself is legal here is a second question: an R8G8B8A8_UNORM SRV on a view the shader samples as R32_FLOAT is a format-family mismatch the debug layer would flag; in release it may read something arbitrary.)

So the fix that would settle it is a stand-in whose value is far in the image's own format, which is what VIda does:

const OCCLUSION_SIZE: (u64, u32) = (128, 72);
const OCCLUSION_FAR_DEPTH: f32 = 1.0e6;
// 1x1 R32_FLOAT of depth 1e6 for a view that would otherwise be null
// or gray: no CPU occluders that frame, nothing culled

Offer: I can build a test binary that, for exactly this shape, substitutes a 1x1 R32_FLOAT of 1e6 instead of the gray, and run the same route for the same length of time on this card, reporting how many blinks I can count before and after. Same for a variant that keeps gray but logs when the culling dispatch reads that slot, if you would rather separate "substituted" from "read that frame". Tell me which is more useful and I will run it.

The whole session log is 134 MB; say the word and I will upload only the lines around the probe hits (frame numbers above) instead of the file, or attach the file if the tracker takes it.

I built an instrumented Darner from the v2026.12.03.02 source and ran it for a session, so here is the answer to your question: on the flickering frames the suspect binding is **substituted, never absent**. **What I added** (nothing else changed): a counter in `descriptor::host`, incremented in `neutral_for` when a view is 2D and its SRV description format is `R32_FLOAT` (41), and in `null_for` for the same shape. It logs every 64th hit with the frame number and the running count (`DARNER_OCCLUSION_PROBE=0` would turn it off). **Result** (one session, ~2h40m of play in dense vegetation, RX 6750 GRE 10 GB, Series S, 1080to1440, FSR auto): ``` occlusion probe: 2D R32_FLOAT view shown the gray stand-in gray=true frame=3 n=1 occlusion probe: 2D R32_FLOAT view shown the gray stand-in gray=true frame=20123 n=64 occlusion probe: 2D R32_FLOAT view shown the gray stand-in gray=true frame=5783478 n=128 occlusion probe: 2D R32_FLOAT view shown the gray stand-in gray=true frame=5783478 n=192 ``` 192 hits logged (the counter prints every 64th; the session ended before the next multiple, so the true total is at or just above 192), **all gray, zero null** — roughly one a minute on average, and they arrive in bursts (two in the same frame above). The "gray stand-in by kind" line never fired for this image, so the kind counter does not see it either. **Why I think gray is still the problem, and not only "absence"** The image is a *depth* image: 128x72 `R32_FLOAT`, linear depth about 1 to 2,300. The stand-in is a 1x1 `R8G8B8A8_UNORM` gray (~0.5). For a depth read, 0.5 is **nearer than every real occluder in that range** — so the CPU occlusion seed is "something huge right in front of the camera" and `CS_BatchCull*` drops the scene for that frame, exactly the blink. It is the same failure as reading 0, just a different near value. (Whether the SRV format change itself is legal here is a second question: an R8G8B8A8_UNORM SRV on a view the shader samples as R32_FLOAT is a format-family mismatch the debug layer would flag; in release it may read something arbitrary.) So the fix that would settle it is a stand-in whose value is *far* in the image's own format, which is what VIda does: ```rust const OCCLUSION_SIZE: (u64, u32) = (128, 72); const OCCLUSION_FAR_DEPTH: f32 = 1.0e6; // 1x1 R32_FLOAT of depth 1e6 for a view that would otherwise be null // or gray: no CPU occluders that frame, nothing culled ``` **Offer:** I can build a test binary that, for exactly this shape, substitutes a 1x1 R32_FLOAT of 1e6 instead of the gray, and run the same route for the same length of time on this card, reporting how many blinks I can count before and after. Same for a variant that keeps gray but logs when the culling dispatch reads that slot, if you would rather separate "substituted" from "read that frame". Tell me which is more useful and I will run it. The whole session log is 134 MB; say the word and I will upload only the lines around the probe hits (frame numbers above) instead of the file, or attach the file if the tracker takes it.

Thanks for running the instrumentation. It narrows this to a gray substitute being used for an R32_FLOAT view, with no null substitute recorded for that class. The shape alone still leaves other R32_FLOAT views in the sample, so I would keep any occlusion-specific replacement out of the general fallback for now.

A short excerpt around one visible blink is enough. The frame number, the closest probe hit, and the corresponding texture-upload or view decision would help connect the substitute to the flicker.

Thanks for running the instrumentation. It narrows this to a gray substitute being used for an R32_FLOAT view, with no null substitute recorded for that class. The shape alone still leaves other R32_FLOAT views in the sample, so I would keep any occlusion-specific replacement out of the general fallback for now. A short excerpt around one visible blink is enough. The frame number, the closest probe hit, and the corresponding texture-upload or view decision would help connect the substitute to the flicker.
Author

A/B on one RX 6750 GRE 10 GB (RDNA2), same save, same spot, standing still and panning the camera slowly left-right for 60 s each, same settings file (Series S, 1280x720 -> 2560x1440 output, FSR, textures half, v2026.12.03.02 + this PR rebuilt from 4f54eb1):

build single-frame blinks counted far-plane stand-in taken
.02 (gray stand-in) 7 in 60 s n/a
this PR (far-plane 1e6) 5 in 60 s 1 time in the whole session

So the direction is right, but the lever looks small: the image's slot was replaced once, while the blink happened about every 9 seconds. It would take a 7x change in substitute frequency to explain the difference, and we do not see that here.

Two more observations that may narrow it:

  1. It is not only vegetation. Trash cans and other environment props blink too, exactly one frame, same as the trees. Props are not textures waiting — they are instances whose batch suddenly is not drawn, which reads more like the cull's output being stale for one frame than like a texture stand-in.
  2. With logging off (Darner's play default) the counter cannot be read after the fact; the "1 time" above is from a session where I turned DARNER_LOG=info on, so it is a real count, not a startup line.

If the cull output is the thing going stale, the shape of that bug is the one VIda fixes with VICTORY_SNAPSHOT_UAV_TABLES: tables that hold writable views (the title's GPU culling output) are copied when the list is recorded, instead of being read from the title's slots frames later when the card runs the list; between recording and execution the title rewrites those slots for its next frame, so the cull writes into next frame's buffer or a null view, and what it culled for is drawn from an empty list — trees, terrain pieces, props and shadows gone for a frame. Does Darner already snapshot those tables at record time, or does it read them at submit time like the unfixed VIda? If it reads them late, that switch (copy the written-view tables when recording) is the one I would test next, and I can build and A/B it the same way.

For completeness: with the probe build, 2D R32_FLOAT views got the gray stand-in about once a minute (192 hits in 2h40m) and never a null, on this card.

A/B on one RX 6750 GRE 10 GB (RDNA2), same save, same spot, standing still and panning the camera slowly left-right for 60 s each, same settings file (Series S, 1280x720 -> 2560x1440 output, FSR, textures half, v2026.12.03.02 + this PR rebuilt from 4f54eb1): | build | single-frame blinks counted | far-plane stand-in taken | |---|---|---| | .02 (gray stand-in) | **7 in 60 s** | n/a | | this PR (far-plane 1e6) | **5 in 60 s** | **1 time in the whole session** | So the direction is right, but the lever looks small: the image's slot was replaced once, while the blink happened about every 9 seconds. It would take a 7x change in substitute frequency to explain the difference, and we do not see that here. Two more observations that may narrow it: 1. **It is not only vegetation.** Trash cans and other environment props blink too, exactly one frame, same as the trees. Props are not textures waiting — they are instances whose batch suddenly is not drawn, which reads more like the cull's output being stale for one frame than like a texture stand-in. 2. With logging off (Darner's play default) the counter cannot be read after the fact; the "1 time" above is from a session where I turned DARNER_LOG=info on, so it is a real count, not a startup line. If the cull output is the thing going stale, the shape of that bug is the one VIda fixes with `VICTORY_SNAPSHOT_UAV_TABLES`: tables that hold writable views (the title's GPU culling output) are **copied when the list is recorded**, instead of being read from the title's slots frames later when the card runs the list; between recording and execution the title rewrites those slots for its next frame, so the cull writes into next frame's buffer or a null view, and what it culled for is drawn from an empty list — trees, terrain pieces, props and shadows gone for a frame. Does Darner already snapshot those tables at record time, or does it read them at submit time like the unfixed VIda? If it reads them late, that switch (copy the written-view tables when recording) is the one I would test next, and I can build and A/B it the same way. For completeness: with the probe build, 2D R32_FLOAT views got the gray stand-in about once a minute (192 hits in 2h40m) and never a null, on this card.

Thanks for running the same-scene A/B. The far-plane substitute was used once, while the patched run still showed five blinks in 60 seconds, affecting trees and other props. This establishes that the symptom can still occur with the substitute in place. The 7 versus 5 count from a single pair leaves the size of any improvement uncertain.

Thanks for running the same-scene A/B. The far-plane substitute was used once, while the patched run still showed five blinks in 60 seconds, affecting trees and other props. This establishes that the symptom can still occur with the substitute in place. The 7 versus 5 count from a single pair leaves the size of any improvement uncertain.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
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
TrustNo1/Darner#263
No description provided.