Shaders: PS_PedTex* fails with "a hardware SGPR input is not supported" — characters' skin and faces are missing #923
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/fxceless--victory-fork#923
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?
@acrumbybread on GitHub · 2026-11-25 12:57 UTC · original
Shaders:
PS_PedTex*fails with "a hardware SGPR input is not supported" — characters' skin and faces are missingSummary
On the Series S profile the title renders, but characters' skin and faces are black / missing: the
PS_PedTex*pixel shaders do not translate, so their draws are dropped. A full offline precompile of thepackage shows this class clearly, together with a few other failure classes.
I am not the only one seeing it:
vitutu1/victory-perfandBelobug/VIctory-Belobug-AMDboth run the worldand both still show characters without skin, so this is upstream, not a fork's regression.
Environment
Windows 11 Pro (build 26200), Intel Core Ultra 9 275HX, NVIDIA RTX 5070 Laptop 8 GB (driver 32.0.16.1692),
15.4 GB RAM, page file system managed.
Game: Xbox Series package
1.0.2.1.Profile:
--console series-s(the same happens on the default Series X profile).Builds tried:
Build Result
fxceless/victory-forkmainf85101b(clean clone) world runs, ~2.3–2.5 fps, characters' skin missingmainf85101b+ the Series S tree (0864e87) merged, plus#798world runs, ~3.7–3.9 fps, characters' skin missingvitutu1/victory-perf97c3aa2(+VICTORY_OWN_UPSCALER=1,VICTORY_RENDER_SCALE=0.5) world runs, ~3.0–5.1 fps, characters' skin missingBelobug/VIctory-Belobug-AMD4cbe9d7(Series X on a 15.4 GB machine) world runs very slowly, characters' skin missingSo the symptom is the same across four trees.
How it was measured
victory precompile(fromvitutu1/victory-perf, which adds that command) over the whole package:The interesting part is the failure classes (top 15 of the report):
and the compute pipeline refusals:
What I think matters most
The 10
PS_PedTex*failures are the user-visible one: those are the pedestrian/character skin pixelshaders, and a failed shader drops all of its draws, so the characters' faces and skin never appear. It is
not a lighting problem —
VICTORY_AMBIENT_STUB=1/VICTORY_SHADOWMASK_STUB=1(the stand-ins thatvictory-perfand the Belobug fork add) do not change it, because nothing is drawn at all.The error comes from
crates/victory-shader/src/emit/lower.rs(Val::Missing("a hardware SGPR input")):a
Reg::S(n)read whose value is not inio_inputs, and which is not covered by the"above the initialized SGPRs" zero path, so the translator refuses.
Questions:
Which SGPR do these
PS_PedTex*programs read (s_tg_size / s_tid / s_wave_id / s_flat_scratch …)?If it is one the hardware initializes, it ought to be modelable the way
initialized_sgprsalreadyhandles the higher ones.
Is this related to #629 ("reject hybrid root layouts and s16+ hardware-initialized SGPR overrides")?
Also seen (may be one root cause each)
27 compute pipeline refusals with
E_INVALIDARG, all onGpuParticleEmit:CS_Emit_Dynamic_Model_AttachMesh.These match the "6–7 compute pipelines refused" I see in a normal run's log, and they are the same
shaders the precompile refuses. Particles / attached-mesh emitters are therefore missing.
One
E_OUTOFMEMORYonweatherParticle:CS_BeginUpdate— on an 8 GB card this may be expected, butworth a look.
198 containers "without a vertex, pixel, compute or mesh program" — these may simply not be shader
containers; if
precompileshould skip them, the failure count is misleading by 198.Notes on the run itself (in case they help)
Dropped draws in a world frame settle at ~290–330 of 5,500–6,900 with
making=0, i.e. they are not"pipelines still compiling" — they never get one. Doubling the dynamic descriptor slots (
2aad398in theBelobug fork) did not change that.
The texture queue drains completely once
VICTORY_FILL_WAIT=1is set (18,598 due / oldest 287 frames→ 163 due / oldest 0), so that part is fine.
All runs show
host pipeline refused 0x800700576–7 times, matching the compute refusals above.Request
A hint on which SGPR the
PS_PedTex*programs read would be enough for me to try a patch; alternatively aswitch that makes such a read zero (the way unwritten VGPRs read zero) would at least let the character
shaders through.
@tippythetaidum on GitHub · 2026-11-25 13:04 UTC · original
Which SGPR:
s18, the POPS collision-wave ID. #721 traced it: all ten failures arePS_PedTexturedCutOutTint_Zero(two code variants, stopping at0x2dbcand0x3014), which use ordered pixel shading. The open #215 lowers the ordered section as rasterizer-ordered views and translates all ten.Whether they're the missing skin: in the first scenes, no. I had three runs here (RTX 5080, Series X profile,
f85101banda253706, from the opening cutscene into the prison, 8 to 11 minutes each). The log names each shader that fails to translate the first time the title needs it, and none of the ten came up. The only program that failed wasf133e35efed2a48a(cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaCBPPPC). Characters' faces drew with skin in those runs. Where they were dark it was the side the sun doesn't reach (#512). Faces also sometimes come up black for the first seconds of a scene and get their skin a little later; I haven't traced that part yet.Not checked: the Series S profile, and scenes after the prison.
AI-assisted (Claude Code, Claude Opus 5.5): log and census reading and this text. Counts and log lines only, nothing from the game attached.
@HLVM04 on GitHub · 2026-11-25 13:21 UTC · original
Data from an RTX 5070 Ti (wave32, NVIDIA 616.64), Series S profile. It supports the reply above: on this machine the missing skin is not the
PS_PedTex*translation failure, and it is intermittent.What is missing.
VICTORY_DUMP_TARGETSdump of such a frame shows the G-buffer's colour target (1280x720, the first of the three RGBA8 targets) black over her neck. In the normals target the neck is there, with valid normals. The NPCs' skin has its colour in the same target.926c46bab3b86bd6(compute), the same in both.It is intermittent, and seems to depend on timing. Counts of single runs, most of them from the same restored save with the same scripted input:
9376fd6+ #798 #783 #799, with #770 in part or whole, #780 (VICTORY_INDIRECT_KEEP=1) and/or #827,VICTORY_CARD_WINDOWS_MB=4096; about 150 ms a frameVICTORY_INDIRECT_WINDOW=1(#780's windows)f85101b+ #798 #783 #799 #770 #827 #845 (#780 left out, main's indirect changes kept), with or withoutASYNC_SUBMIT/QUEUE2/INDIRECT_WINDOW/TEXTURE_NO_WAIT; about 115 ms a framef85101btree, none of these on their own made it reliably lit (one run each, all black):VICTORY_INDIRECT_CARD_BUDGET=0,VICTORY_FILL_WAIT=1,VICTORY_STAGING_POOL=0, no indirect windows, default switches only.STAGING_POOL=0 + FILL_WAIT=1 + INDIRECT_CARD_BUDGET=0 + MERGE_RUNS=1, and one with only a switch that has no effect without the profiler. So I read them as the race going the other way, not as a fix.My reading: something the skin's colour pass reads (a texture or its record) is sometimes not ready yet when the frame runs. Faster configurations lose that race far more often. #89 (missing character skin with
VICTORY_RELAY=2) may be the same race. I haven't found which read it is yet.@HLVM04 on GitHub · 2026-11-25 20:10 UTC · original
Follow-up to my data above: we found one cause of the black face, so "timing-related" was at most part of it. RTX 5070 Ti, Series S, a local build of fork main plus PRs.
crates/victory-gpu/src/descriptor/host.rs(unchanged on main at79cfdd9),SpanswithRule::Start, the defaultVICTORY_STALE_TEXTURESrule, treats any placed-texture view written within 4 KiB (HEAD) of an older view's start as replacing it.VICTORY_STALE_TEXTURES=0didn't change those.It's not a PR yet, and it's two runs each, so treat it as a lead. The same staleness could be behind other texture-side black surfaces, such as the limbs in #1022 or slots in #1080, but we haven't checked those.
@Exopus-0x65f7ad0 on GitHub · 2026-11-25 20:42 UTC · original
Data point on the black faces, RTX 5060 Ti 8 GB (Windows 11, 16 GB RAM), Series S. Tree: fork
maind510ee4plus #911, #1006, #936, #868, #1014, #1043, #1058, #1059, #1067, #1007, #188, #917 and #927.VICTORY_DUMP_TARGETS=1) of a cutscene frame with Lucia's face black. Her face is black in the first G-buffer colour target (1280x720, the one the skin colour goes to), while the normals target has her face with valid normals. So, as you found, the geometry is drawn and the colour is missing; it is not lighting. In that frame the queue line said "9405 slots, 135 due, 9301 waiting for their memory".Rule::Start, so packed tint palettes don't make each other stale): I implemented it with a unit test. On its own it did not bring back the face in the opening cutscene here.VICTORY_LEVELS_ON_DEMAND=1. With it, the bar close-up shows Lucia's face fully textured and lit. Skin, brows and hair detail are all there, in the shot that was black in every earlier run. An earlier shot, the parking lot right after the cut, is still black: her textures have not arrived by then. Also: VRAM 7.2 → 6.9 GB, title-side mapped memory 13.1 → 11.1 GB, first room ~8 fps as before. So on 8 GB at least, a good part of the black skin seems to be fine mip levels that are not resident and are sampled as zeros. #1031's "select a contiguous run of initialized resident levels" fixes exactly that.🤖 Generated with Claude Code
@HLVM04 on GitHub · 2026-11-26 07:36 UTC · original · edited 2026-11-26 08:25 UTC
Found and fixed the main cause of our black skin (RTX 5070 Ti, Series S, fork main plus PRs and local changes). It's not the palette head fix from my comment above, and it's not translation.
Mechanism (seen only with
VICTORY_TEXTURE_NO_WAIT=1):Change (in the texture staging refresh,
Staging::refresh_unlockedintexture.rson our tree): when the kernel read fails and the staging buffer was never filled, fall back to the copy path that the normal partly-mapped case already uses, where missing pages read as zeros and the mapped pages get their real bytes. On our build,VICTORY_NO_WAIT_FILL=0turns it off for A/B.Result: the neck was lit in 4 of 4 runs, against 1 of 4 before. We scored this on the base-colour G-buffer target (render target 0, 1280x720, the first of the six), not on screenshots. It's a small sample. A rarer second mode, where the skin draw is missing from the G-buffer entirely, didn't show up in those 4 runs, so it may still exist.
This is a local commit, not a PR yet. If you run with
TEXTURE_NO_WAIToff and still see black skin, it's probably a different cause.Caveat (2026-11-26): this fix is shown at the G-buffer stage only: base colour (render target 0) at the neck is right in 4 of 4 runs, and the host copies match title memory. In the final frame of that backlit window shot her neck looks dark both before and after the fix (no ray-traced indirect light in those runs), so an on-screen improvement in that shot is not yet shown.
@stem23456-coder on GitHub · 2026-11-26 11:08 UTC · original
Diagnostic patch and capture guide for the intermittent black neck in the window scene, based on
06702fe. Download the raw patch and apply it withgit apply skin-draw-trace.patch. The guide is indocs/skin-draw-trace.md.For one graphics draw,
VICTORY_TRACE_DRAWrecords the resource in each observed slot at recording and submission, the staged texel sample, and the fence and order of its copy. It also rereads candidate material indices at submission. The comparison script can distinguish a changed material index from different uploaded bytes at the same index.The Windows target type-check and six comparison tests passed. The comparison was exercised on synthetic inputs. A lit/black pair from the same save on the RTX 5070 Ti is still needed. Pixel history on the neck in the first colour target should identify the draw in both captures. AI-assisted with Codex.
@regiumlepidi on GitHub · 2026-11-26 11:38 UTC · original
Data point from an RTX 5070 Ti 16 GB (32-lane, Windows 11), Series X profile, fork main
f6a09d3+ the pipeline pre-build (#1226), opening cutscene into the first window shot, 20-minute runs. Only switches changed between rows; a single run each, so treat as leads.LEVELS_ON_DEMAND=1,TEXTURE_NO_WAIT=1,INDIRECT_WINDOW=1,HEAP_WORKER=1,LOOKUP_CACHE=1LEVELS_ON_DEMAND,TEXTURE_NO_WAIT,INDIRECT_WINDOW(and without the two opt-ins)LEVELS_ON_DEMAND=1+VICTORY_TILES_SMALL_WHEN_FULL_MB=1024+HEAP_WORKER=1+LOOKUP_CACHE=1C repeated on a later tree (+#927, +#1189) gave the same picture: head present, 0 blank textures, 8.7 fps.
What this suggests, matching HLVM04's table above:
INDIRECT_WINDOW=1+TEXTURE_NO_WAIT=1the head was missing; without them it was there (A vs B/C). I didn't separate the two.VICTORY_TILES_SMALL_WHEN_FULL_MB(off by default) fixes that: they show from their small levels instead. It may be worth a default on cards that fill up.Still wrong in C: hair renders orange-blonde instead of dark brown in that backlit shot (none of the refused compute programs is the hair mask one here), a thin blocky strip along the bottom edge, and stair-stepped shoulder edges.
AI-assisted (Claude Code, Claude Opus 5.5): runs, log reading and this text. Counts and log lines only, nothing from the game attached.
@HLVM04 on GitHub · 2026-11-26 12:26 UTC · original
On separating
INDIRECT_WINDOWfromTEXTURE_NO_WAITin your A vs B: on our RTX 5070 Ti (Series S, fork main plus PRs, an older tree than yours) the indirect windows were not the cause of the black neck.VICTORY_INDIRECT_WINDOW_CHECK=1checked 1.3M window draws against a fresh clamp: 0 differed, and the face was still black in that run.TEXTURE_NO_WAIT=1side (mechanism and fallback): with the fallback, the neck was lit in 4 of 4 runs against 1 of 4, scored on the G-buffer base colour only.Your Series S run that lost the head without
TEXTURE_NO_WAITdoesn't fit that mechanism, so it may be another path, such as the rarer mode where the skin draw is missing from the G-buffer altogether. It's intermittent here, so judge it over several runs.