d3d12: every light disappears at close range (no visible flicker); the temporal resolves' 1280x720 HDR pair is empty on alternate frames #3021
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by ajussak on 2026-12-02T00:02:58Z.
What happens
A street lamp lit at a distance disappears as the camera approaches, and comes back when stepping back. Symmetric, steady — the reporter sees the light go away and stay away while close, not a flicker. It affects every light in the world (street lamps, vehicle lights, lit windows).
Both the pool on the ground and the glow in the air go with it, which is why this looked at first like a volume or a shading problem rather than a light's data.
A measured alternation that may or may not be this fault
Captures along the approach show something else as well, and I am reporting it without claiming it is the cause:
The lamp lives in two 1280x720
R9G9B9E5textures,0xfde97d1700and0xfde97d1800(in the lamp's region: mean 0.00876 and 0.00672, max 0.55 and 0.52). They alternate exactly and swap every frame:0xfde97d17000xfde97d1800The same alternation appears in two other capture groups on the same approach (3208-3211: 0.00545 / 0.00000 / 0.00563 and inverse) and (3323-3326: 0.01354 / 0.00000 / 0.01357 and inverse). It is absent in an earlier group further away (3099-3102).
Four programs write one member per frame, wholesale, and the member flips as a block between frames:
34fb51b8a0312e82(CS_ScreenProbes_TemporalResolve_ReflectiveCaustics)s1+152,s1+2001700180071883e40620a567a(temporal resolve)s1+128,s1+144170018006fad2980c2774c90s1+40,s1+4817001800dce085c07b9414b6s1+40,s1+4818001700No
Srvand noUavtable entry in the recorded operations of those frames names either address as a read — only the writes above. So the consumer of the pair does not read it through a recorded descriptor table.Why this may or may not be the reported fault: a consumer taking one fixed member would lose the light on half the frames, which the temporal upscaler could average into a steady-looking loss rather than a visible strobe. But the reporter sees no flicker at all, and no captured frame yet shows the lamp steadily dark, so this link is unproven.
Commit
b9fbb7b0aonintegration/upstream-pending(2026-12-01). Not checked againstmain— if this is a regression of the integration branch, this report should say so.System
Fedora Linux 45, kernel 7.3.4-300.fc45.x86_64, NVIDIA GeForce RTX 3060 Ti (GA104), NVIDIA driver 620.73.4,
leonida.exediagnostics build under Wine + VKD3D-Proton launched byscripts/play-linux.sh, Series S profile.Command and steps
Then, standing at the lamp,
printf 4 > "$HOME/leonida-capture/dump"; walk straight towards it without moving sideways and write the file again. Each write captures four frames.Note for the Linux path:
LEONIDA_CAPTUREmust be aZ:\...path. The runtime is a Windows process and nothing converts a Unix path, soLEONIDA_CAPTURE=~/dirsilently captures nothing — neither F9 nor thedumpfile, since both are behindif folder().is_some()(crates/leonida-gpu/src/capture.rs:139and:161).What it is not
Each of these was a run of its own; none of them changes the symptom:
LEONIDA_AMBIENT_FLOOR,LEONIDA_AMBIENT_NEAR,LEONIDA_AMBIENT_AIR, and the whole stand-in by turns (LEONIDA_AB=5,LEONIDA_AMBIENT_ON).LEONIDA_BVH_BUILDER=1(the title's own ray tracing, stand-in offcrates/leonida-gpu/src/ambient.rs:151) leaves it unchanged, so it is not what the rays find.LEONIDA_PORT_DESCRIPTORS=0changes nothing.CS_ClusterLightsWorldSpace(d3e5b737ea7cc150, 2),CS_FinalGather_0_1_1_0(2dc364df5d3278b8, 3),CS_FinalGather_1_1_1_0(940c2635dc1312f4, 3) andCS_Tiling_Generate_Opaque(2cc4c197ee29e291, 3).Not measured
Impact
Every light in the world goes out once the camera is close enough for it to cover a visible area; from a distance the same view is fine, which is why it reads as "the light goes out as you approach".
Captures and logs stay on the machine that produced them, per
docs/linux_d3d12.md; the frames above are our own renders (no game content). AI-assisted: diagnosis and capture analysis with Mistral Vibe (agent), on the machine and driver above.Imported from ubiquitarianism/leonida. Originally posted by ajussak on 2026-12-02T00:08:54Z.
Correction to the section "Not measured": the captures did contain the steady dark frame, and the extinction is measured. I had only sampled a few frames and wrongly reported that no captured frame shows it. It is frames 4067 -> 4068, one frame apart, same camera, same pole.
The extinction
A red lamp on a utility pole, region around it, frames 4067 -> 4068. Everything else in that region is stable to 0.004:
0xe249b01f00R9G9B9E50xdfff2110000xe24cd0be00It reaches exactly zero, not a lower value: the light is gone from that target, in one frame, with no return.
The writers and the readers swap members wholesale
0xe249b01f00and its twin0xe249b01e00are two 1280x720R9G9B9E5textures. Between the two frames their roles are exchanged:71883e40620a567a(s1+128,s1+144),34fb51b8a0312e82(s1+152,s1+200), and a third record (s1+40,s1+48) — all into…1f00…1e00(71883e40620a567a,s1+80)dce085c07b9414b6writes…1f00(s1+40,s1+48)…1e00:2dc364df5d3278b8,940c2635dc1312f4(the twoCS_FinalGather),71883e40620a567a,dce085c07b9414b6,63381c3250b287fa,6d7fe7745ab9c6d8,7168dd781ca7efb9The frame where the readers bind
…1e00is the frame where…1f00stops being written by the resolves and the light goes to zero in it.dce085c07b9414b6writes whichever member the resolves are not writing, in both frames.The same quartet in a different run, a different address pair
In an earlier run the same four programs show the same wholesale swap on a different pair,
0xfde97d1700/0xfde97d1800(frames 3384 / 3385, group 3383-3386), with each member empty on the frame the other is written: 0.01153 / 0.00001 / 0.01126 and 0.00001 / 0.00894 / 0.00001. So the pattern reproduces across runs and across resource addresses — it is the schedule, not one resource.What is still not observed
Which heap slot each reader binds, and whether the index it uses follows the parity of the frame. The operations list records descriptor tables and root views, not the heap slot a bindless read goes through — that is the one link between "the roles swap" and "the light goes out".
The rest of the report stands: the stand-in family, the ray-traced path (
LEONIDA_BVH_BUILDER=1) andLEONIDA_PORT_DESCRIPTORS=0all leave the symptom unchanged; no light-related pass is dropped.Imported from ubiquitarianism/leonida. Originally posted by ajussak on 2026-12-02T00:14:37Z.
Where it happens. Straight out of Jason's house in chapter one: the crossing at the end of that street, the lamp on the pole and its pool on the road. Nothing special has to be done — walk down that street and the light goes out before you reach it, and comes back if you step back up it.
The two screenshots are captured frames, bit for bit. They match two frames of the capture above with a mean absolute difference of 0.0:
Both frames have their full target dumps on disk (the
frame-3100-*andframe-3323-*files), so the comparison this report describes can be replayed from exactly these two frames rather than taken on trust.Imported from ubiquitarianism/leonida. Originally posted by ajussak on 2026-12-02T00:35:57Z.
One more negative result, and the aliased-view path is where this report stops.
The aliased-view transfer is not the cause
The light's targets come in two families, 0x100 apart, and both alternate between the two frames:
0xe249b01d00,0xe249b01e00R32_UINT(f87)f0c91b4d2578f5bf(s1+24)0xe249b01f00,0xe249b02000R9G9B9E5(f42)71883e40620a567a(s1+128,s1+144),34fb51b8a0312e82(s1+152,s1+200),6fad2980c2774c90(s1+40,s1+48)That is the montage
d3d12/docs/findings.mddescribes for this title — anR9G9B9E5view placed over anR32_UINTtexture the compute programs write — and the two families swap member in the same frame. Note also thatf0c91b4d2578f5bfwrites0xdfff211000(f10), the second target whose region dims with the lamp: 0.055 -> 0.008.Run:
LEONIDA_AB=5,LEONIDA_ALIAS_CAST— no change to the symptom.That run is meaningful rather than inert, and the code says why:
alias_cast()reads throughcrate::toggled!per call (crates/leonida-gpu/src/texture.rs:313-320), soLEONIDA_ABreaches it at run time;descriptor/host.rs:286-290(last_cast_on) exists precisely to remake a view heap's placedR9G9B9E5slots whenLEONIDA_ABflips the switch;resource.rs:1752(cast_alias_of) returnsNoneand the copy path runs (alias_direct,=1fromscripts/play-linux.sh:265,texture.rs:273-289).So in a single run both transfer paths were exercised — in place, and the copy — and neither changes the picture.
LEONIDA_ALIAS_CAST=0as a whole-run setting would add nothing this run did not already cover.Where it narrows to
Both paths share the same decision about which resource a read reaches. If that decision is wrong, turning either transfer path off cannot help — which is what is measured. The remaining question is therefore no longer how the texel travels but which texture the binding lands on.
The operations list cannot answer it: it records descriptor tables and root views, not the heap slot a bindless read resolves through. Two frames would settle it with a
tracing::debug!at the point a slot resolves (descriptor/host.rs,view_at), compared onframe-4067andframe-4068: does the index follow the frame's parity, or is it fixed.Every negative result so far, each a run on the machine above
LEONIDA_AMBIENT_FLOOR,LEONIDA_AMBIENT_NEAR,LEONIDA_AMBIENT_AIR, and the stand-in by turns (LEONIDA_AB=5,LEONIDA_AMBIENT_ON);LEONIDA_BVH_BUILDER=1(the title's own ray tracing);LEONIDA_PORT_DESCRIPTORS=0;LEONIDA_ALIAS_CASTby turns (both paths, above);LEONIDA_*setting has moved the symptom by any amount.This report stops here: the reporter is not running further tests, and the next step needs code rather than a setting — the slot-resolution print above, or a maintainer reading
descriptor/host.rsanddraw.rswith these two frames.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T16:00:44Z.
Triage Notes
What we've established so far:
b9fbb7b0a) was onintegration/upstream-pendingand was not checked againstmain.What we still need from you (@ajussak):
mainusing the stated route and Series S profile? Please report the tested commit and whether the effect remains; no screenshots, dumps, or game files are needed.