You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LEONIDA_TWIN_BIAS (1bb188cf, on by default) breaks the picture on an RX 7900 XT (RDNA 3) #2702
Since 1bb188c ("d3d12: raw twins off 16 bytes kept with a bias the shaders add (LEONIDA_TWIN_BIAS)"), the d3d12 runtime renders badly on an RX 7900 XT: stretched triangles across the screen, whole frames black, white, yellow or magenta, blocky noise, and a blown-out window. LEONIDA_TWIN_BIAS=0 on the same build makes every frame clean again.
Setup
AMD Radeon RX 7900 XT (RDNA 3), driver 32.0.32029.2010, Resizable BAR on
Ryzen 7 5800X3D, 32 GB, Windows 11 (build 26200)
d3d12 diag build (--features diagnostics,mimalloc), Series X profile, 2560x1440 output, ray tracing off
Settings: play-nvidia.ps1's Series X set (-SeriesX -NoDlss -NoFrameGen), plus LEONIDA_SHADER_LOOP_LIMIT=4096
Scene: the opening cutscenes into the prison cell (Continue from the save), standing
How it was narrowed down
Each step: build, leonida shaders + warm --used, a run with LEONIDA_CAPTURE + LEONIDA_CAPTURE_WORLD=1, the prison-cell frames looked at.
left: 1bb188c (TWIN_BIAS) and ff1874c (helper counts by turns)
bbd45f5 with LEONIDA_TWIN_BIAS=0: clean, so 1bb188c is the one.
The broken builds also had the card busier: about 36-38 ms a frame, against about 30 on 32b9f4a in the same scene.
Possibly relevant
The commit message says the change was made for an RX 6800, where move_raw never applied. On this RDNA 3 card the biased twins (or the stride-word bias bits 24..27 the translated programs add) seem to give wrong reads, which would explain geometry stretched to infinity and whole frames of garbage. Untested idea: limit the bias to cards where move_raw cannot apply, or default it off until checked on RDNA 3.
Opened #2757 fixing three bugs in the LEONIDA_TWIN_BIAS (1bb188c) path (sub-dword �y % 4 != 0 raw twins accepted by settle_twin, 32-bit unsigned wrap-around on sentinel offset + bias wrapping into the 16-byte pre-view prefix of the preceding suballocation, and stale twin-bias bits on recycled dynamic slots).
Activity
zmasi commentedon Nov 30, 2026
Opened #2757 fixing three bugs in the LEONIDA_TWIN_BIAS (1bb188c) path (sub-dword �y % 4 != 0 raw twins accepted by settle_twin, 32-bit unsigned wrap-around on sentinel offset + bias wrapping into the 16-byte pre-view prefix of the preceding suballocation, and stale twin-bias bits on recycled dynamic slots).
AI-assisted: Gemini 4 Carbon (High), reviewed with Gemini 4 Neon (XHigh).
fix(d3d12): guard biased raw twins against sub-dword offsets and 32-b…