[AMD/Linux] Faces of story characters deform and flicker (neural face rig), Proton + RADV — translations clean #110
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp#110
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?
@texx2818 on GitHub · 2026-12-05 18:48 UTC · original
Build:
iceboerg00/larp-amdat05e4140(built from source; replacement shaders compiled fromshaders/replace, same 154 files asv2026.12.05-amd-3)What happens
Lighting, textures, water, hair, clothes and background characters all render correctly. The faces of main / story characters (Lucia, named inmates in the prison, etc.) are wrong:
This looks like the same symptom as #39 (closed after
750aabb), but it remains on Linux with750aabband everything after it applied.System
radv 26.3.1)v3.1-102-g020fc9441-GE-Proton, DXVK dxgiwave_lanesRelevant log lines (default settings):
No
does not translateand noshader replacement not usedlines.The face shaders translate
The four programs from #39 (
b22a16a178976e1b,a26a38d61f256901,926c46bab3b86bd6,6871d6e4b3ac9a10) all translate. The two face ones arecompute_graph_ops:CS_TransposeVecMatMulAlignedOperation/CS_TransposeVecMatMulOperation; the rig is thecompute_graph_ops:family (65 programs: MatMul, Dot, Add/Mult/Div broadcast, LeakyRelu, Exp, Reduce*, Quantize*, ...).An offline
larp.exe translate shaders.rpf --listat 32 lanes: 2677 of 2682 compute programs emitted (the 5 not emitted areshadowmask:CS_TraceShadowRays_*, which have replacements), everycompute_graph_ops:program among the emitted ones.What was tried (each in-game, Lucia close up)
750aabbfallbacks,WaveSize(32)replacements)LARP_HOST_MAX_WAVE=32only (driver still runs wave64 by default)LARP_HOST_MAX_WAVE=32+RADV_PERFTEST=cswave32,pswave32,gewave32(everything really runs wave32, as on NVIDIA)VKD3D_CONFIG=no_descriptor_heap(descriptor buffer path instead ofVK_EXT_descriptor_heap)LARP_ONE_QUEUE=1+ a null UAV barrier after every title Dispatch / indirect dispatch (local patch, wave32 as above)image_heap_*/ bindless image loads) — tested before the view-heap fixNotes:
VKD3D_CONFIG=breadcrumbs_syncdoes nothing on GE's release vkd3d-proton (breadcrumbs are compiled out), so the dispatch barriers above were done in larp instead.Guesses (unverified)
compute_graph_ops(halves moved asuint, 16-bit wave sums): dxil-spirv → ACO may treat fp16 denormals / rounding / packed math differently from AMD's Windows driver.WaveSize(32)only on the four replacements).Can test
Happy to run a diagnostics build, dump translations (
LARP_EMIT_DUMP), try a patch, or send logs and screenshots of the face across consecutive frames.@tmalik1116 on GitHub · 2026-12-05 19:53 UTC · original
Same symptom on RDNA2 / Linux, plus two data points that may narrow it down.
System: RX 6800 XT (Navi 21), CachyOS, kernel 7.3.5, Mesa 26.3.1 RADV, Proton (proton-cachyos-slr), vkd3d-proton 3.2 (
71cae091). Series X, 4K output, title's own upscaler, ray tracing on. Log:wave lanes min=32 max=64,buffer views by byte offset ... supported=true(so the RX 6000 Windows crash paths don't apply here, and it never crashes).What I see: Jason's mouth hangs open in idle and in close-ups (porch idle at the start of a save, and a walk through the house). It never closes, even when other parts of the face move.
Builds tested, same save and spot:
57b0877(+ local changes, 2026-12-05 05:57), replacements off so lighting is right on AMDv2026.12.05-amd-fix(45cc4f6)v2026.12.05-amd-2(3f3763a), defaultsLARP_HOST_MAX_WAVE=32LARP_SHADER_REPLACEpointing at an empty folderSo the replacement shaders aren't the cause, and it was already there before the AMD fork; amd-2 made it milder. With amd-fix the log still had 4 untranslated programs and
14 without a host pipelineper frame; with amd-2 it's 0. So the remaining fault is in programs that do translate, which matches your findings.A different translator on the same driver stack gets it right: VIctory-xmem (lobomfz) renders the same scene on the same machine, Mesa build and vkd3d-proton, and Jason's mouth is closed in every capture. That makes a generic RADV/ACO fp16 or denormal problem less likely to be the whole story. Either larp's translation of the
compute_graph_opsrig hits something RADV runs differently, or it's missing a barrier or ordering between the rig and its consumers that xmem keeps.Happy to test a build, dump translations (
LARP_EMIT_DUMP), or compare against xmem on the same frames.@tib1rgitta-eng on GitHub · 2026-12-05 20:07 UTC · original
Another RDNA2 / Linux data point — and on a 12 GB card where VRAM is saturated, which may help separate "rig maths" from "memory pressure".
System
Mesa 25.2.8-0ubuntu0.24.04.5, Vulkan 1.4.3187.3.2-070302-generic, X11version1796087067), umu-launcher 1.4.4, steamrt4mainat30b2fd3(2026-12-06) vialinux/build.sh, 85 replacement DXILs, launched withlinux/run.shtexture_detail = 1 level down,bvh_quality = low,directional_shadow_quality = low,motion_blur = offSymptom
Matches the "torn block hanging below the jaw" description in @tmalik1116's comment rather than the frame-to-frame flicker in the original report:
Log, this build (
play.log)Four compute programs do not translate, and none of them is a face program — both are the water volumetrics ones:
6871d6e4b3ac9a10—CS_TransmissionVolumetrics926c46bab3b86bd6—CS_TransmissionVolumetricsSubmergedGFX10 code at 0x22c / 0x360: a wave sum of 16-bit floats where not every lane runs is not supported,at 0x13c8 / 0x1f98: a lane mask holding lanes elsewhere read as data is not supportedSo this build reproduces the same
14 without a host pipelinemarker that @tmalik1116 saw onamd-fix, while the untranslated programs are only water. That again points at programs which do translate, consistent with both of your findings — and with xmem rendering the same scene correctly on the same driver stack.VRAM note (may be unrelated)
12.80 / 12.87 GB VRAM used (99.5 %), GPU 98–99 %, 10–13 fps in the prison corridor scene at 1440p with RT on;
14draws dropped per frame, rising to28in the heaviest spots. If it would help separate memory pressure from rig maths I can re-test withtexture_detail = 2 levels downand lower RT shadow quality and report whether the chin changes.Also, for whatever it is worth: the two untranslated water programs are the only thing this build refuses, so if a build that emits them would help isolate the rig, I am happy to test it.
Can test
Happy to run a diagnostics build,
LARP_EMIT_DUMP, dump translations, send consecutive-frame screenshots of the chin, or A/B against VIctory-xmem on this machine.PS — separate issue, unrelated to the face bug:
docs/setup-and-quickstart.md/linux/setup.shinstall the natived3dcompiler_47.dllvia winetricks, and that DLL is the 2013 build (6.3.9600), which only supports shader model 5.0. larp's own host shaders are compiled asvs_5_1 / ps_5_1 / cs_5_1, so on Linux they all fail witherror X3506: unrecognized compiler target, the present/composite path breaks (whole screen renders in blocky tiles) andhost ray tracingswitches itself off. Swapping in the Windows 10 SDKd3dcompiler_47.dll(4.7 MB, hasvs_5_1) fixes it — verified by A/B with a standaloneD3DCompiletest in the same prefix. If you want I can file that one separately with the details.@thiagonl on GitHub · 2026-12-05 20:27 UTC · original
Same symptom here on a different card, plus a lead on the cause from another fork.
Setup:
iceboerg00/larp-amd(built from source; first05e4140, nowf6954fc), Series X and Series S, 30/60 fps. Arch-based Linux, Mesa 26.3.1 RADV (GFX1200), RX 9060 XT 16 GB (RDNA4), GE-Proton11-7 wine with vkd3d-proton 3.2.0. Replacement shaders as shipped inlarp-amd-fix-3.What I see: faces of story characters now render (eyes, hair, skin, teeth), but the inside of the mouth is wrong while talking: a dark hole, no teeth or tongue, and the lips look torn. Background characters are fine. Not flickering as in the report above, but the same family of symptom.
What does not change it:
wave_lanes = 32(full re-translation): same.shader replacements: ... refused=0and no translation errors, so this is not a refused program.Probable cause (from the cool_fox fork, not verified on larp): its
docs/proton.md, section "Faces still, eyes glowing, or faces torn", describes exactly this ("mouths agape, teeth under the nose") on RADV through vkd3d-proton. In compute programs that store to UAVs and uses_barrier, a typed (texel buffer) 16-bit integer load after the group barrier can return the value from before another wave's store that preceded the barrier. A raw (storage buffer) load of the same bytes sees the store. They traced it to the face network's interpreter, program0aa7934094794dbf(1,024 threads keep a register file in anR16_UINTview, a barrier between its 12 stages): replayed alone, typed loads diverged from a CPU model from stage 2, while one dispatch per stage or raw loads matched at every stage. They also tried globally coherent views and RADV's LLVM backend, with no change. Their fix is commit01878eein the cool_fox repository (switchVICTORY_RAW_TYPED_LOADS): for_d16typed UAV loads of 1, 2 or 4 channels in such programs, also load through the slot's raw view and select at run time for views marked 16-bit integer.This also fits the table above: turning async compute off helps because it removes some cross-queue ordering, but the values stay wrong because the stale typed load is inside one dispatch.
Where it would go in larp: the face network views are already
R16_UINT/R16G16B16A16_UINT, whichcrates/larp-gpu/src/halves.rsuses as they are (no twin is made for unsigned formats). A raw twin of those slots (seetwin_entry/half_twinsindraw.rs) plus arawBufferLoadin thehalfbranch of the typed buffer load inlarp-shader/src/emit/lower.rs, only for compute programs with UAV stores ands_barrier, would be the equivalent. Stores through the raw view would need dword-safe 16-bit writes. I have not tried it: the host has to create the raw view in the same list entry.Can test: a patch, a diagnostics build or
gpu_debuglogs on RDNA4 + RADV, and screenshots of the mouth (I can attach them).@gamingwithhomie on GitHub · 2026-12-05 20:52 UTC · original
Please retest on v1.1.1 [Linux/Proton] (FULL zip in the v1.1.1 release). It includes #142s wave64 stall-guard retry, #135s Wine fixes and #147. If faces still deform on RADV, also try forcing the wave32 translation path (
LARP_HOST_WAVE=32/LARP_HOST_MAX_WAVE=32) and tell us whether the flicker changes - that separates 'rig maths at wave64' from memory pressure. zip-logs output welcome.@tmalik1116 on GitHub · 2026-12-05 20:57 UTC · original
Follow-up: a driver-side workaround fixes it here (RX 6800 XT, Mesa 26.3.1 RADV, vkd3d-proton 3.2). This confirms the barrier/visibility lead from the cool_fox fork above.
RADV runs compute shaders that use no LDS in WGP mode (
radv_should_use_wgp_mode). In that mode one workgroup's waves can be spread over both CUs of a WGP, each CU with its own L0. A local, env-gated one-liner that returnsfalsethere for compute (CU mode, one L0 per workgroup) makes the face rig come out right:Same build, save and spot, Mesa shader cache disabled for both runs (RADV's cache key doesn't include the env var, so a fresh larp cache and Mesa cache are needed when switching):
iceboerg00/larp-amdv2026.12.05-amd-4(d444d19)RADV_CS_NO_WGP=1So the stale value is a cross-CU L0 visibility problem within one workgroup. A store from a wave on the other CU before
s_barrierisn't seen by the following typed_d16load. That fits the typed-vs-raw difference described above. Either the translated program's barrier needs device- or workgroup-coherent semantics that cover the texel-buffer loads (so ACO emits thebuffer_gl0_inv), or RADV/ACO misses the L0 invalidate for typed buffer loads in WGP mode. I haven't checked which side is at fault. A raw-load path in larp (as cool_fox did) or forcing CU mode only for thecompute_graph_opsprograms would avoid it without a driver patch.Not tested on RDNA3/4, but the WGP/L0 layout is the same there, so it's worth a try with a patched Mesa.
@dev-kreg on GitHub · 2026-12-05 21:01 UTC · original
Confirmed fix on Linux / RX 9070 (RDNA4) / RADV / GE-Proton11-14: prologue faces render correctly (mouths no longer stuck open, no stretched lips/teeth/jaw).
This follows the lead above (stale
_d16typed UAV loads afters_barrieron RADV) and is ported from VIctory-xmem'sraw_typed_loads. Behind an env switch,LARP_RAW_HALF_LOADS=raw, which is keyed into the shader cache (added tolarp_shader::SWITCHES). It applies to compute programs that write UAVs, wait at a group barrier and dobuffer_load_format_d16_*. For each 1/2/4-channel d16 typed UAV load at a half place, the same bytes are also read through a raw handle of the same heap slot. The raw result is selected at run time where the raw view's byte size equals typed elements × 2 × channels, and the typed result is used otherwise. No host-side changes were needed: vkd3d-proton exposes the raw view of the typed UAV slot. There is alsoLARP_RAW_HALF_LOADS=coherent(globallycoherent typed handles instead), which I haven't tested.Patch (against main around v1.1.0)
@gamingwithhomie on GitHub · 2026-12-05 21:18 UTC · original
Update: PR #183 (wide-heap lighting/water/facial replacements + FP16 wave-sum facial fix) is merged to the AMD/Linux branches and shipped in v1.1.2-amd and v1.1.2 [Linux/Proton] - use the UPDATE zip (it carries the new
bin\shader-replace\heap-2097152shaders, exe-only wont). Please retest the prison/Lucia scenes and tell us if faces are stable now.@St5sz2Jk on GitHub · 2026-12-05 21:34 UTC · original
RDNA4 data point for the Mesa
RADV_CS_NO_WGPworkaround from @tmalik1116: it works here too.System: RX 9070 XT (RADV GFX1201), Mesa 26.3.1 with the env-gated one-liner in
radv_should_use_wgp_mode(), Wine 11 + vkd3d-proton, larp built from source at v1.1.1 (8e166ad) withamd-testandlinux-testmerged. Series X, 1080p,LARP_FRAME_RATE=60.RADV_CS_NO_WGP=1, fresh larp pipeline cache and Mesa cacheThere was no fps cost that I could see (median 47.9 fps at the 60 cap, GPU about 81% busy). As noted above, RADV's cache key ignores the env var, so the old pipeline blobs and the Mesa cache have to be moved aside or the fix silently does nothing.
I haven't tried
LARP_RAW_HALF_LOADS=rawor v1.1.2 yet. I'll report back if either one fixes the leftovers without the driver patch.@thiagonl on GitHub · 2026-12-05 22:01 UTC · original
Confirmed on RDNA4 / RX 9060 XT 16 GB: PR #183 on top of
iceboerg00/larp-amdfixes the faces here.Build:
larp-amdf6954fc(the base ofv2026.12.05-amd-4.2) with the diff of PR #183 applied (it applied cleanly, one hunk with a small fuzz), built from source for Windows x86-64 MSVC on Linux.shader-replacecompiled with Microsoft'sdxc1.10.2611, including the new0aa7934094794dbfand6d7fe7745ab9c6d8replacements. Mesa 26.3.1 RADV (GFX1200), GE-Proton11-7 wine, vkd3d-proton 3.2.0, Series X, 60 fps cap.larp-amdstockv1.1.1-amd, defaults (wave64)larp-amd+ PR #183So this matches the PR description (the facial rig replacement plus the FP16 partial-wave sum handling) and answers the request to retest the prison/Lucia scenes: the faces are stable now on this card.
A note for people on a 16 GB machine: at 1440p the game process grew to about 6.6 GB and was killed at the end of a session by my own 8 GB memory cap, so I am retrying at 1080p. This is a memory limit of my setup, not a faces problem.
Thanks @gamingwithhomie and @iws322112 for the fix, and @dev-kreg and @tmalik1116 for narrowing it down. I can test follow-ups on this card.
@Luislariosss on GitHub · 2026-12-05 22:06 UTC · original
Confirming on Windows 11 + RX 9060 XT (RDNA4), native D3D12 driver (not Proton/RADV): the masked FP16 wave-sum change in
half_sum(the same change that is in44b6a8d/ PR #183) fixes the faces here too.amd-testatf0d4e50+ only thehalf_sumchange incrates/larp-shader/src/emit/lower.rs(lanes that are elsewhere read as +0 via a ballot and the first lane of each partner run, as the console masks them).b22a16a178976e1banda26a38d61f256901(compute_graph_ops:CS_TransposeVecMatMul*) were refused at 64 lanes witha wave sum of 16-bit floats where not every lane runs. The baby at the end of the prologue scene had a melted eye, a shifted upper lip, dark patches in the mouth and displaced teeth; Lucia's eyes and brows were also off.926c46bab3b86bd6and6871d6e4b3ac9a10(water_shading:CS_TransmissionVolumetrics*),a lane mask holding lanes elsewhere read as data. These are water, not face, and I haven't yet checked whether the new.interfacereplacements in44b6a8dcover them.@St5sz2Jk on GitHub · 2026-12-05 22:23 UTC · original
Follow-up from the RX 9070 XT (RDNA4, RADV 26.3.1, Wine 11 + vkd3d-proton). Faces look right on current code. One caveat: this run had three face fixes on at once, so I can't say which one did it.
Build: from source,
amd-testatc07ed28(v1.1.3 batch, includes PR #183) +linux-test+ @dev-kreg'sLARP_RAW_HALF_LOADSpatch from the comment above (applied with small offsets).Switches:
RADV_CS_NO_WGP=1(patched Mesa),LARP_RAW_HALF_LOADS=raw,LARP_FRAME_RATE=60, Series X, 1080p.RADV_CS_NO_WGPonly) still had a deformed baby's face and an unnatural eye close.does not translatelines any more; the four water volumetrics programs from #39 now translate. No faults.Since #183 alone fixes faces for others above,
LARP_RAW_HALF_LOADSand the Mesa patch may not be needed any more. If it would help, I can do A/B runs (each fix off in turn) on this card.Off-topic for this issue, but useful for Linux testers: on a 16-core CPU, larp's defaults (
LARP_PRELOAD_THREADS75%,LARP_DSTORAGE_WORKERS= all logical cores) gave 1–6 s freezes with the GPU idle. The valueslinux/run.shuses (18 / 16 workers / 128 MB staging) removed every freeze over 1 s here.@tmalik1116 on GitHub · 2026-12-05 22:28 UTC · original
Retested on v1.1.2-amd (FULL zip, sha256 checked): faces are fixed here with stock Mesa, no driver patch and no
LARP_RAW_HALF_LOADS.System: RX 6800 XT (RDNA2, RADV), Mesa 26.3.1, vkd3d-proton 3.2, Wine/Proton on Linux. 4K output, 2560x1440 internal. Fresh larp pipeline cache and Mesa cache.
RADV_CS_NO_WGP=1(Mesa patch)LARP_RAW_HALF_LOADS=rawpatch0 exceptions and 0 dropped dispatches in the v1.1.2-amd run. I can only check the outdoor porch scene from our save, so I haven't verified the prison or Lucia scenes.
Thanks @dev-kreg for the patch. It confirmed the cause independently of the driver.
@texx2818 on GitHub · 2026-12-05 22:31 UTC · original
RDNA3 confirmation for
LARP_RAW_HALF_LOADS=raw(the patch from @dev-kreg above): it fixes the faces here.System: RX 7900 XT (Navi 31), Arch, Mesa 26.3.1 RADV (stock, no WGP patch), GE-Proton11-16 (vkd3d-proton
v3.1-102-g020fc9441), Series X, 4K output with FSR Quality, 30 fps cap + FSR frame generation 2x.Build:
iceboerg00/larp-amdf6954fc+gamingwithhomie/larpv1.1.0merged, plus the patch applied unchanged (applied cleanly with offsets). Fresh larp shader cache, since the switch is keyed in it.Offline check (
translate --listwithLARP_EMIT_DUMP, the switch off vs.raw): exactly 11 emitted programs differ, allcompute_graph_ops:(MatMul / TransposeMatMul / VecMatMul, the Aligned variants, Formula, QuantizeU8, NLargestU8, FindThresholdU8, BuildHistogramU8). All 25,692 dumps are present both ways, and the failure summary is identical, so there are no new failures.In game: the story characters' faces that deformed and flickered in my original report now render correctly, with no other visual problems.