Repository navigation
Shaders, GPU: 16-bit buffer accesses keep their bits (the face network computed zeros: mouths now move) - #927
tippythetaidum wants to merge 6 commits into
Conversation
|
I found a descriptor range case on
For a statically addressed table load, the relevant offset is the resolved address plus the descriptor's first dword. Runtime-selected descriptors also need format handling for the slot actually picked. Synthetic probe · Windows verification AI-assisted using Codex. |
|
Ran this on a 5080 (Win11, native D3D12, Series X profile) on top of 0b0074e plus a few PRs, with relay 2, async submit and queue2. Cost is nothing I can see. First cell, median 155 ms a frame, vs 154-156 ms in the runs right before without it. Copies and copy-back are about the same, no device loss, no new refusals in the log. Only the first launch was slower to get going while the changed programs recompiled. |
…nge's start Review on fxceless#927 (avt0m4t48): half_views took the place from used_kind, whose entry gives where a range of descriptors starts. With one entry for a range from dword 0 and the load at byte 0x20, the place was dword 0 and the host looked at the wrong slot for a 16-bit float view to show as its unsigned twin. The place is now the load's own (the traced offset in dwords plus the first dword read), for a descriptor loaded from a fixed place in a table. A descriptor picked at run time names nothing and keeps the float path: its slot, and so its format, is known only then. The title's 65 programs with d16 typed buffer accesses load all 231 of their descriptors from fixed places, each at the start of its own entry, so what they name is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, you're right:
For the title nothing changes: its 65 programs with d16 typed buffer accesses load all 231 of their descriptors from fixed places, each at the start of its own entry (checked against the programs' code), so they name the same places as before. And thanks for the numbers from the other 5080, Ym1r1710. AI-assisted (Claude Code, Claude Opus 5.5). |
|
Confirmed that your new The WARP probe goes through Adding the current root parameter's AI-assisted using Codex. |
|
We independently reproduced tippythetaidum's facial-network output result on a native RTX 5080 Astral 16 GB (617.14, Windows 11 Pro 25H2 build 26200.9974, Ryzen 9 5900X, 32 GB, Series X profile). Both arms used the same diagnostic executable ( For avt0m4t48's displaced-SRV report, our synthetic RTX 5080 and WARP readbacks passed 128/128 at the range start on the original PR. The displaced case went from 1/128 at We also extended avt0m4t48's fresh-table allocation reproduction through production binder dispatch and readback. At November 25 follow-up — extractor type mismatch. After tippythetaidum's RTX 5080 skin A/B, we checked the saved translation of extractor November 25 follow-up — exhaustive finite coordinate inputs. On the unmodified The earlier DXIL/view mismatch still occurs in the live trace. In this isolated sequence, a float-annotated ordinary load through the UINT view nevertheless produced the expected arithmetic on both adapters. We also observed localized skin mottling on an outdoor officer on the earlier build with the facial change off. That is a different scene and character from the reported waitress regression. A matched visual A/B remains open. Pinned fixture, results, and scope |
|
Holding this back as a draft: a side effect found in testing. With this branch some faces show small rainbow-coloured squares on the skin (the opening cutscene's waitress, every time); without it, in the same build and scene, her skin is clean. One A/B each way on an RTX 5080. Likely cause, from the head program's code: I'm extending the change to that case (a format load whose every use reads one half as a half float is moving 16-bit integers) and will mark this ready again once the skin is clean in the game. AI-assisted (Claude Code, Claude Opus 5.5). |
buffer_load_format_d16_* and buffer_store_format_d16_* moved each channel by way of 32-bit floats (bufferLoad.f32 then legacyF32ToF16; legacyF16ToF32 then bufferStore.f32). The title's face network keeps half floats, and 16-bit indices beside them, in buffers it views as R16G16B16A16_UINT and R16_UINT, and on the console each channel's 16 bits go as they are. A float access through an integer view is outside what D3D12 defines: on an RTX 5080 the network read zeros and no mouth moved. Each channel's 16 bits now go as an unsigned integer (bufferLoad.i32, bufferStore.i32, a u32 typed handle), packed and unpacked two to a register as before. Ported from fxceless/victory-fork#927 (5dc9e63f04) by tippythetaidum, the translator's part only: XTP shows the shader the title's views as they are (16-bit unsigned for this title), so the fork's host twin of 16-bit float views, and with it the place fix of befaf3b5aa, have nothing to do here (docs/analysis/face-animation.md). shortcut: a 16-bit float or signed view is read through the unsigned handle all the same; a wider, normalised or 8-bit one is read as its integers. Tests (buffer16_tests.rs, WARP and hardware): every kind of half and integer pattern through R16G16B16A16_UINT and R16_UINT views, and a descriptor loaded 0x20 bytes into a range is the one moved.
…integers The extraction (container 970c4fbb3b017c0e) reads the face network's output with plain buffer_load_format_x through an R16_UINT view and takes the low half of each result as a half (v_fma_mix_f32 with that half selected). The translator kept those loads as float loads through an integer view, which D3D12 leaves undefined. While the network computed zeros that read zero; once it computes, the fork saw rainbow squares on faces on an RTX 5080 (tippythetaidum on fxceless/victory-fork#927, which went back to draft for it; the view measured there by tippythetaidum and iGoldenNinja). shortcut (this title only): the plain typed loads of the programs in INTEGER_LOAD_PROGRAMS, named by FNV-1a 64 of their native code, take the d16 path's unsigned handle (bufferLoad.i32), each register holding the element's 16 bits zero-extended. The list holds the extraction alone (0x4a229537a8657146, 2,112 bytes). A general rule (every use reads one half as a half) misses this program, whose loads sit in partial EXEC masks, and would change 658 other programs whose view formats are known only when bound (docs/analysis/face-animation.md). Tests: a listed program's format load read as a half gives each half's value (fails with the shortcut cut, on its count of integer loads), the same loads elsewhere keep their float path, and the fingerprint is FNV-1a 64. Lowered::integer_loads counts the loads lowered as 16-bit integers (tests only).
…nge's start Review on fxceless#927 (avt0m4t48): half_views took the place from used_kind, whose entry gives where a range of descriptors starts. With one entry for a range from dword 0 and the load at byte 0x20, the place was dword 0 and the host looked at the wrong slot for a 16-bit float view to show as its unsigned twin. The place is now the load's own (the traced offset in dwords plus the first dword read), for a descriptor loaded from a fixed place in a table. A descriptor picked at run time names nothing and keeps the float path: its slot, and so its format, is known only then. The title's 65 programs with d16 typed buffer accesses load all 231 of their descriptors from fixed places, each at the start of its own entry, so what they name is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit befaf3b)
Review on fxceless#927 (avt0m4t48): a table made afresh because of a half view took its span from the used-resource entries' starts and the slots picked by index. With one entry for a range from dword 0 and the half view at dword 8, the table took one dynamic slot; the next allocation got the slot the shader reads that view from. The table's half places are added to the selected slots, as the slots picked by index are: the table reaches them and they are made readable like the others. The title's d16 programs name each of their descriptors with its own entry, so their tables are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Two more commits, and ready for review again. b6bf651, the fresh table's span (@avt0m4t48, right again, thanks): a fresh table's half places are added to the selected slots before the sort, as you suggested, so the table reaches them and they go through the same readable path as the slots picked by index. I wrote a test of my own for it rather than taking the probe across (I don't run code from other branches on this machine): b9c3781, the specks on faces (the regression I reported above):
New test In the game (diagnostics build of this branch on
@iGoldenNinja, thanks for the independent reproduction on another RTX 5080 (face output 0/76 -> 69/69 non-zero, the displaced case 1/128 -> 128/128), and @Ym1r1710 for the cost measurement. AI-assisted (Claude Code, Claude Opus 5.5). Counts and log lines only, nothing from the game attached. |
|
Independent RTX 5070 result at Four targeted tests passed both on the PR head and on our integrated build. In The runtime recorded two dispatches each for |
|
Thank you, @sawetco: a second card, a backport into another tree and scenes well past the prologue are a lot more than I could test here. For the waitress shot: on the RTX 5080 her skin is clean again at AI-assisted (Claude Code, Claude Opus 5.5). |
|
Tested on RX 7900 XT (CachyOS Linux, Wine 11.22 + vkd3d-proton + RADV). Merged cleanly onto a 3973179-based stack, all |
…for a remap, by default From the measured parts of fxceless#929 (AlexMiu) that PalmVIDev fxceless#238 turned on: VICTORY_TEXTURE_NO_WAIT is on by default (=0 waits as before). A texture refresh that finds the runtime remapping title memory reads through the kernel instead of waiting for the mapping lock, and leaves the texture for its next refresh if a page is not there. The author measured a level load going from 4-9.5 s a frame of texture refresh to under 200 ms. Not taken from fxceless#238: VICTORY_INDIRECT_WINDOW on by default. PalmVIDev turns it on only together with its driver watch (fxceless#233), which switches windows off at the first driver event: every loss of the card in a run with windows was announced that way. This tree has no driver watch, so the switch stays opt-in. fxceless#238's other parts (fxfork fxceless#927 16-bit buffer halves, ~900 lines across the translator; fxceless#930/fxceless#932 diagnostics and descriptor runs) are not ported here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017V7WBA8CxPD68KngjiMeJb
… eyes not, grey blotches new) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A second RX 7900 XT data point for the deformation @UwUCammie describes, on Linux too. Setup: RX 7900 XT 20 GB, Arch, Wine (GE-Proton10-34) + vkd3d-proton master, Mesa RADV, Ryzen 9 5900X. Tree: avatarmanz/VIctory-7900XTX main at Result, new game, prison scene, gameplay (not a cutscene):
So on RDNA 3 under vkd3d-proton the network now runs and moves the faces, but on some faces the blend-shape output comes out too large. That fits a difference in the values the network computes there, rather than in where they go. I have not isolated a dispatch either. Happy to run a diagnostics build or a hash of the arena and output on this setup if that helps compare with an NVIDIA run. |
…n (fxceless#927) The tree as built and played here: - avatarmanz main from b0cfe2b to 9c23e8d (13 commits: the frame meter's thread, the 32-bit graphics heap used in place, and others; see that repository for their authors). - fxceless/victory-fork#927 by tippythetaidum, six commits (323a2a0, 4c7626d, 6aac62f, 01c9f93, 896aa4c, d4b786f): 16-bit buffer accesses keep their bits, so the network that animates faces computes values, not zeros. avatarmanz already had VIctory 4243a96a for views picked from the heap (integer_view); kept for those, #927's path for views in tables. - Three comments of the new code name no game.
…nge's start Review on fxceless#927 (avt0m4t48): half_views took the place from used_kind, whose entry gives where a range of descriptors starts. With one entry for a range from dword 0 and the load at byte 0x20, the place was dword 0 and the host looked at the wrong slot for a 16-bit float view to show as its unsigned twin. The place is now the load's own (the traced offset in dwords plus the first dword read), for a descriptor loaded from a fixed place in a table. A descriptor picked at run time names nothing and keeps the float path: its slot, and so its format, is known only then. The title's 65 programs with d16 typed buffer accesses load all 231 of their descriptors from fixed places, each at the start of its own entry, so what they name is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review on fxceless#927 (avt0m4t48): a table made afresh because of a half view took its span from the used-resource entries' starts and the slots picked by index. With one entry for a range from dword 0 and the half view at dword 8, the table took one dynamic slot; the next allocation got the slot the shader reads that view from. The table's half places are added to the selected slots, as the slots picked by index are: the table reaches them and they are made readable like the others. The title's d16 programs name each of their descriptors with its own entry, so their tables are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it moves halves Both the access site and the descriptor-as-data site let a d16 access name its table place in half_views without the half-only check, so a place a program also read as a whole float would show that float read the unsigned twin (review on fxceless#927 by ThomasHFWright). d16 accesses now take the same places_read_as_halves() gate as format loads read as halves; mixed places and places in tables the program also picks from at run time take the float path, as before half views. On the shader pack this changes no program: all 65 with d16 places keep them. Tests: a d16 load alone still names its place; beside a whole float read of the same place it names nothing (fails without the change); the run-time pick case now names nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ported to my line (Wine, RTX 3080 Ti, vkd3d-proton One thing it does not fix here, in case someone expects it to: the face. The head is still a black void with the eyes and mouth floating in it ( ( No action needed here — just the cross-reference. |
…yped loads The tree as built and played here: - avatarmanz main from 9c23e8d to 9576c45 (113 commits: codec_d's cool_fox work, 33 merged pull requests, the renderer patches, the shader cache keyed by a translator version; see that repository for their authors). - This repository's changes merged onto it: the VirtualQuery hole fallback (Kayotic1337, #59), the first-lane shortcut in the structure builder only, fxceless/victory-fork#927 (tippythetaidum) with the table plan. - avatarmanz#166 (Beqren): the compute wait, bounded; it replaces #129's unbounded one, which held a frame past the title's watchdog on a cold cache. - avatarmanz#151 (AugustoZFJ, gomeaw): the pipeline library with a null blob. - avatarmanz#114 (avatarmanz, secure-silicon): table views' kinds. - Beqren's raw typed loads (#129), taken only where the view's word says a 16-bit integer view of the loaded size. - VICTORY_FAULT_PAGES; translator version and cache format of this tree's own. - Comments name no game. run.sh: renderer patch 2 on, WINE_CPU_TOPOLOGY from the CPU's sibling pairs, the invalid VICTORY_SKIP_PIPELINES default dropped.
|
@slauko, on the two refused programs: by name, neither is the face network.
On an RTX 5080 (Windows, native D3D12, also 32-lane only), all three were refused the same way in our 25 Nov build (fork One candidate that matches the symptom: HLVM04's finding on #923. With AI-assisted (Claude Code, Claude Opus 5.5). |
|
A third AMD data point for the over-driven mouths that @UwUCammie and @bordersky describe, and what it is not, in case it saves someone time. Setup: RX 9070 XT (RDNA 4), Mesa 26.3.1 RADV, GE-Proton11-14 with vkd3d-proton master, CachyOS. Tree: avatarmanz/VIctory-7900XTX main (9576c45f1) with bordersky's Linux fixes and this PR's six commits. Same result with the commits taken through bordersky's conflict resolution and with a hand port. Without this PR the mouths stay at rest. With it they move, but the upper lip lifts toward the nose and the teeth show, as in the diner dialogue described above. Ruled out on our side (each checked on the card in the diner close-ups):
The open question: every report of correct mouths I can find in this thread is from NVIDIA on Windows with native D3D12, and every report of over-driven mouths is from AMD under Proton. So vendor and platform are confounded. @avatarmanz, your tree runs on a 7900 XTX under Windows: if you have tried this PR's commits there, did the mouths look right? A report from NVIDIA under Wine with faces drawing would also settle it. That would tell us whether to look in RADV or in the Linux vkd3d-proton path. AI-assisted (Claude Code, Claude Opus 5.5). Counts and hashes only; nothing from the game attached. |
|
@ThomasHFWright, a direct question, since your LinVxtory AI-assisted (Claude Code, Claude Opus 5.5). |
…y are (pull request #927), SDWA sign extension of 16-bit results (upstream VIctory #3124); two switches off by default (clamp windows, occlusion queries) and offline tools - #927 (tippythetaidum): a buffer_load_format whose every use takes a half as f16, and d16 typed loads and stores at a table's fixed places, move 16-bit integers bit-exactly through unsigned twin views (HostShader::half_views). The face network reads its indices this way: mouths open and move (confirmed in a test run on an RTX 4070). Thank you, tippythetaidum. - upstream #3124: SDWA dst_unused 1 (sext) with WORD_0 copies bit 15 upward; the reserved dst_unused 3 is refused. - VICTORY_CLAMP_WINDOW=1|alt (after upstream #3197): indirect draws clamped a window at a time. Measured on this layer: 1.0 draw a pass (nothing joins): stays off. - VICTORY_OCCLUSION=1|alt (after upstream #3138): the title's occlusion queries answered by the card; a counter of queries by kind (the title begins thousands). Not yet measured: off. - translate: VICTORY_NATIVE_HEADS lists each container program's first bytes; an ignored test decodes a raw GFX10 code file; the native pipeline dump writes root signatures. (Device methods 0x1c8 / 0x218 turned out to be a precompiled-pipeline cache the title falls back from.) The shader translator changed: delete both shader caches before the first run.
|
A native-Windows NVIDIA data point for the over-drive question, as a baseline (it can't split vendor from platform on its own, since both differ): Setup: RTX 5080 (Blackwell, 32-lane only), Windows 11, native D3D12, no Wine. Tree: fork Result: mouths move and look natural. I looked at the speaking close-ups among the captured frames (one frame in 96) of the diner and the counselor's office, the first ~3,300 frames of a 25-minute run:
None shows the upper lip lifted toward the nose or the teeth bared. So over-drive doesn't appear on NVIDIA with native D3D12. Whether it follows RADV or vkd3d-proton still needs @ThomasHFWright's 5090-under-Proton run. If the 5090 under Proton over-drives, the platform is the likelier cause; if it doesn't, RADV is. Caveat: these are sparse frames from a played run, not a targeted A/B of the diner dialogue. A visemes-heavy shot could still show it and I wouldn't have caught it. AI-assisted (Claude Code, Claude Opus 5.5). |
Two commits of the fork since ceb9e1f: - a20809d Meters for the card and the page mappings, and a dump of the console's native pipelines (VICTORY_CARD_METER_CLAMPS, VICTORY_REMAP_METER, VICTORY_REMAP_SPLIT, VICTORY_CLAMP_LEAN, VICTORY_NATIVE_PSO_DUMP; all off by default). - 58de9bf Mouths move: 16-bit values moved through a table's typed views as they are (pull request fxceless#927, no switch: it changes the translation for everyone), SDWA sign extension of 16-bit results (upstream VIctory #3124, no switch); VICTORY_CLAMP_WINDOW and VICTORY_OCCLUSION off by default; offline tools (VICTORY_NATIVE_HEADS, VICTORY_HEADS_ONLY, the VICTORY_DECODE test). README.md and .github/workflows/ci.yml stay ours; README.upstream.md is the fork's README at 58de9bf. The fork's own fxceless#927 replaces our port of it (refs/local/g-m-927-m4, VICTORY_SHADER_D16_HALVES), which was never merged here. Conflicts: crates/victory-gpu/src/indirect.rs: the window's counted table (bit 4) read with our group-relative record index (`index`, not id.x). crates/victory-gpu/src/list.rs: our DispatchX shape diagnostic kept beside the fork's BeginQuery/EndQuery (the empty query_mark goes). crates/victory-hle/src/modules/xmem.rs: the fork's frame-log timings of temporary views and its split/map of placeholders, on our View::Temporary/View::Persistent and Section { handle, .. }. crates/victory-shader/src/emit/host.rs: HalfUintUav joins our raw views (RawUavData, NullRawUav). crates/victory-shader/src/emit/lower.rs: halves.rs beside our child modules; the fork's changes to code we moved out applied there: buffer halves in emit/image_buffer.rs, the format view's unsigned twin in emit/descriptor_data.rs. crates/victory-shader/src/emit/mod.rs: our edge-quad test's HostShader names no half views. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mended, heap identity, and the switches brought from other projects Forty-one commits, compiled and tested as 9ef09c2 (victory-shader 267, victory-gpu 325, victory-loader 51, victory-hle 128, no warnings; build 9ef09c2-diagnostics). On by default: - the original's two commits up to 58de9bf: fxceless#927 (half-precision values through 16-bit buffer views keep their bits) and the sign extension of the original project's #3124; the translator changes, so shaders are translated anew once; - the leak of placed-view shapes mended (TaynanGT/Vice-Tay PR fxceless#27); - fxceless#1324 (VICTORY_HEAP_IDENTITY, =0 goes back), fxceless#1333 (VICTORY_REMAP_PER_HEAP, =0 goes back) and fxceless#1336. Off by default: VICTORY_NAN_SCRUB, VICTORY_SHADER_LOOP_LIMIT_CS, VICTORY_SHADER_EARLY_DEPTH, VICTORY_UNMAKE_QUIET, VICTORY_PATCH_WAITS, VICTORY_PATCH_CLZERO, VICTORY_PATCH_CLWB, VICTORY_BVH_NAMED_WRITES, VICTORY_BVH_BOUNDS, VICTORY_BVH_FENCES, VICTORY_PIPELINE_COMPUTE_WAIT, VICTORY_CARD_AWAKE, VICTORY_GUARD_OUTSIDE, VICTORY_HEAP_RESCAN_SPREAD, VICTORY_LAND_ASIDE, VICTORY_GUARD_RUNS, VICTORY_RT_SKIN_SKIP, VICTORY_WINDOW_SKIP_SAME, VICTORY_MERGE_SUBMISSIONS, VICTORY_MESH_LAUNCH and the capture switches; =alt for four of them. Measured by Codex on build 9ef09c2, the ten switches of Status, the scripted manoeuvre, a quiet machine, one session: 1,819 frames in 274.0 s, 6.64 fps, median frame 144 ms (95th percentile 197), against 6.69 fps and 141 ms on the code of main before it (-0.7 %, one session each). Private memory in the room 16.8 GiB against 16.1 to 16.7 in six sessions of main that day; the layer's windows 3,252 MB against 2,844 to 3,336. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ort 6 likely the plastic uniforms With RADV_EXPERIMENTAL=transfer_queue (avatarmanz/VIctory-7900XTX#111) and VICTORY_PORT_GUARD off: 57-62 ms at the bunk at ~2,400-3,300 draws, copy-back 24-27 ms. Belobug 5d6bd84 (Belobug#279) took the logo videos' jumping away. Port 6 and port 7 to be left off (avatarmanz/VIctory-7900XTX#270). Mouths: avatarmanz/VIctory-7900XTX#114, Belobug#231 and fxceless/victory-fork#927 noted as open. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ug#114, fxceless#927, raw typed loads) Mouths stayed shut and eyes were flat bright patches in close-ups (avatarmanz/VIctory-7900XTX#231): the face network's _d16 accesses went through float views, so its result was all zeros. Three pieces, as bordersky/victory-linux carries them (ca214f7a9 and edc36f4e2, taken as its diff against avatarmanz 9576c45 for these files only): - avatarmanz/VIctory-7900XTX#114 (41f93b7e): d16 accesses ask the kind of a view in a table too; tables made afresh write their slots' stride words. - fxceless/victory-fork#927 (323a2a0b, 4c7626da, 6aac62f6, 01c9f936, 896aa4c7, d4b786fe, tippythetaidum): halves moved through 16-bit buffer views keep their bits (HostShader::half_views, an unsigned twin view). - Beqren's raw typed loads (1711cd1c2, from avatarmanz/VIctory-7900XTX#129; VICTORY_RAW_TYPED_LOADS, on; 0 off). On Radeon under Proton Belobug#114 alone tears the mouths; all three together give moving mouths on the jaw and irises (Fedalv on Belobug#114, RX 7900 XTX, RADV). TRANSLATOR_VERSION and the shader cache format change (bordersky's 0x4c00_0002 / VSL3): every shader is translated again on the first run. victory-shader tests: 209 passed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…surable frame cost avatarmanz/VIctory-7900XTX#114, fxceless/victory-fork#927 and the raw typed loads (1711cd1c2) together; 72.5-76 ms at ~7,000 draws, as in run 45. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…aces move) Frame times from runs 45-46, the logo videos and faces fixed, transfer_queue and the switches to leave off; credits for Belobug e942896/5d6bd84/cd8dfc0, avatarmanz/VIctory-7900XTX#114, fxceless/victory-fork#927, bordersky/victory-linux. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… of threads a piece, 4 KiB dirty tracking, gather segments, DispatchX thread counts, remapping meters, translator fixes Conflicts resolved keeping both sides: heap ids on dynamic slot release with this tree's layout (dyn_start, guards); the 4 KiB dirty tracking (VICTORY_DIRTY_4K) on this tree's 64-part written-page map, with the kernel's 4 KiB finds passed out of the asking done outside the journal lock; the clamp's counted-table bit in hlsl/clamp.hlsl; xmem's metering beside this tree's native page views; DispatchX with the record span; the sweep's grace before the no-room check. Duplicated copies of the 16-bit view tests (pull request fxceless#927, already here) and of with_wave_wide dropped.
The title keeps half floats, and indices beside them, in buffers it views as R16G16B16A16_UINT and R16_UINT, and its programs move them with buffer_load_format_d16_* and buffer_store_format_d16_*: on the console each channel's 16 bits go as they are, whatever kind the view's format is. The DXIL moved them by way of 32-bit floats (load as float, legacyF32ToF16; legacyF16ToF32, store as float), which only a float view carries. Through the integer view every value read came out 0. The network that drives the faces (compute_graph_ops, about 2,650 dispatches a frame, then ped_standard_head_cs) works in such buffers: its 24 MB of tensors and its output were all zeros for whole runs, and no character's mouth moved. - victory-shader: such an access through a view of a table moves the 16 bits as unsigned integers (bufferLoad.i32, bufferStore.i32), and HostShader::half_views names the table descriptors it is done through. - victory-gpu: a table with a 16-bit float or signed buffer view at one of those places is made afresh for the draw, with that view in the unsigned format of the same layout (descriptor::host::half_view). The title's own slot keeps the title's format for other programs. shortcut: through a view of wider, normalised or signed 8-bit channels, whose values the console converts to and from halves, the integers are read and written unconverted (logged once, with the format; the title's are 16-bit unsigned). Views reached another way than through a table keep the float path. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Original author: tippythetaidum, fxceless/victory-fork#927 (in victory-fork main as 58de9bf4c), commit 5dc9e63f0. (cherry picked from commit 5dc9e63f04cac3e508d8a5e9cb6edd72a23ca175)
…nge's start Review on #927 (avt0m4t48): half_views took the place from used_kind, whose entry gives where a range of descriptors starts. With one entry for a range from dword 0 and the load at byte 0x20, the place was dword 0 and the host looked at the wrong slot for a 16-bit float view to show as its unsigned twin. The place is now the load's own (the traced offset in dwords plus the first dword read), for a descriptor loaded from a fixed place in a table. A descriptor picked at run time names nothing and keeps the float path: its slot, and so its format, is known only then. The title's 65 programs with d16 typed buffer accesses load all 231 of their descriptors from fixed places, each at the start of its own entry, so what they name is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Original author: tippythetaidum, fxceless/victory-fork#927 (in victory-fork main as 58de9bf4c), commit befaf3b5a. (cherry picked from commit befaf3b5aa91966d2569985eeba808d4d8017026)
Review on #927 (avt0m4t48): a table made afresh because of a half view took its span from the used-resource entries' starts and the slots picked by index. With one entry for a range from dword 0 and the half view at dword 8, the table took one dynamic slot; the next allocation got the slot the shader reads that view from. The table's half places are added to the selected slots, as the slots picked by index are: the table reaches them and they are made readable like the others. The title's d16 programs name each of their descriptors with its own entry, so their tables are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Original author: tippythetaidum, fxceless/victory-fork#927 (in victory-fork main as 58de9bf4c), commit b6bf65167. (cherry picked from commit b6bf65167f4407684bccfe201b30d084102d8862)
…integer The head program reads the face network's output with buffer_load_format_x (not d16) and uses only the low 16 bits of each result, as a half (v_fma_mix_f32 with sel_lo): on the console that view is 16-bit unsigned and the load gives the zero-extended integer. Lowered as a float load through the title's R16_UINT view it read garbage once the network's output was no longer all zero (specks on some faces with this branch). Such a load now loads the unsigned integer and names its place for the host, as d16 accesses do, where every access through that place moves halves (d16, or a format load read only as halves) and the program picks nothing from that table at run time. A place also read as numbers keeps the float path. Uses are operand reads: a later write of the register under EXEC reads the value only to keep it in the lanes it leaves alone, and a phi carries it on (the head program's loads are behind a branch). In the title's shader pack 77 programs name half places: the 65 network programs, the head program and 11 lighting and water compute programs that read those views as halves alone. Without the two conditions the rule named 724, among them hundreds of pixel programs that read one value of a view as a half and the rest as numbers. The helpers are in emit/halves.rs, a child module of the emitter like intersect.rs (lower.rs would pass the repository's 512 KiB file limit). Also puts used_kind's doc comment back above it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Original author: tippythetaidum, fxceless/victory-fork#927 (in victory-fork main as 58de9bf4c), commit b9c378134. (cherry picked from commit b9c378134968f93739a9f5864052f293ed67bf4c)
…ty check on dynamic slot release) Cherry-picked commit 2609085 from refs/pr/1324 to avoid pulling 58de9bf shader translator changes before Wave L3. Resolve conflicts in descriptor.rs and descriptor/host.rs: - descriptor.rs: omit fxceless#927 half_view test not yet present before 58de9bf (keep release_dynamic id parameter and existing test updates) - descriptor/host.rs: keep fxceless#1293 FLAG_* constants and fxceless#770 tiled_shown fields alongside NEXT_ID / id: u64 Co-Authored-By: Antigravity <noreply@anthropic.com>
…to exp/rtx3060-m Combines exp/rtx3060-l (L1 wave, fxceless#854 paired form, fxceless#864, fxceless#812, fxceless#768, LEVELS_ON_DEMAND, RAM_SAFE) with fxceless main e4245f3 (fxceless#927, fxceless#646, DIRTY_4K, GATHER_SEGMENTS, PAGE_WRITES, group-budget indirect clamp, WAVE_WIDE_ONLY) and PR fxceless#1352 SPREAD_LEAN (bit 32, LEAN_RECORDS=64, spread budget counters 3-5). Co-Authored-By: Antigravity <noreply@anthropic.com>
No character's mouth moved when they talked: the network that animates faces computed zeros, because 16-bit buffer accesses lost their bits through the title's integer views. With this change the faces animate, mouths included. I couldn't find this reported in the issues or PRs here.
Problem
Faces are driven by a network that runs on the GPU every frame:
compute_graph_ops:*programs (about 2,650 dispatches a frame in the opening cutscene:CS_ZeroOperation,CS_SiluOperation,CS_GatherAlignedOperation,CS_VecMatMulAlignedOperation,CS_SmallMatMulOperation,CS_ScatterOperation, ...), whose outputped_standard_head_cs:CS_BlendshapeTranslationsHSSGraphOutputExtract(970c4fbb3b017c0e) turns into blend-shape offsets, thenCS_ReconstructBlendshapeNormals(e4a7e088c7780ce8).Those programs move every tensor with
buffer_load_format_d16_x,buffer_load_format_d16_xyzwandbuffer_store_format_d16_xyzw(616, 99 and 441 instructions; all of the d16 typed buffer instructions in the title's shader pack are in these programs). The tensors live in buffers the title views asR16G16B16A16_UINTandR16_UINT(524 and 13 views onto the 24 MB arena in one frame of the opening cutscene): half floats, and plain 16-bit integers (indices) beside them. On the console each channel's 16 bits go as they are.The translator lowered those accesses as floats:
bufferLoad.f32thenlegacyF32ToF16, andlegacyF16ToF32thenbufferStore.f32(emit/lower.rs: "shortcut: d16 data is taken as f16 (integer formats would keep 16 bits)"). A float access through an integer view is outside what D3D12 defines. On an RTX 5080 the load gave 0 for every value.Measured with a diagnostics build that hashes the title memory behind each view of these programs every 4th frame, from the opening cutscene into the prison (frames 1,388 to 3,928 without the change, 1,724 to 3,712 with it, one run each on
f85101b):The zeros were the same with
VICTORY_CARD_BUFFERS=0,VICTORY_LATE_WAIT=0andVICTORY_SHADER_OPT=0(one run each), so it isn't the copies, the flights or the clean-up passes.Change
bufferLoad.i32/bufferStore.i32, the handle annotated asu32), packing and unpacking the halves as before.HostShader::half_viewsnames those descriptors (root parameter, the dword the program loads the descriptor from); the shader cache stores it.State::tables, a table that has a 16-bit float or signed buffer view at one of those places is made afresh for the draw, with that view in the unsigned format of the same layout (descriptor::host::half_view). The title's own heap slot keeps the title's format for other programs. The title's own views here are already 16-bit unsigned, so for this title no extra table is made.emit/halves.rs):CS_BlendshapeTranslationsHSSGraphOutputExtractreads the network's output with plainbuffer_load_format_xthrough the sameR16_UINTviews and uses only the low half of each result as a half float (v_fma_mix_f32 ... sel_lo). Lowered as a float load it read garbage once the output was no longer all zero: specks on some faces' skin with the first version of this branch. A format load whose every channel is read only as a half float (v_cvt_f32_f16, or av_fma_mix*source with itsop_sel_hibit; uses are operand reads, through phis) now takes the same unsigned-integer path and names its place, where every access through that place moves halves and the program picks nothing from that table at run time. In the title's shader pack that adds the head program and 11 lighting and water compute programs that read those views as halves alone: 77 programs name half places in all, 65 of them the network's.State::tables).descriptor::host::half_inexact). It did not appear in the run below.Why integers rather than a float view: I first showed the integer views as their 16-bit float twins and kept the float path. Some characters' mouths started moving, others didn't, and the player's face twitched. The network also moves plain 16-bit integers in these buffers, and the patterns that are not-a-number as halves don't survive the float round trip (1 of the 2,046 did on this card). As integers, all 65,536 patterns go through.
Tested
Windows 11 (26200), NVIDIA RTX 5080 16 GB, driver 621.14, Rust from
rust-toolchain.toml, Series X profile.a253706(8 minutes, cutscene into the prison): the arena, the output and the blend-shape translations changed in 752 of 752, 408 of 408 and 580 of 580 samples; the once-logged format case did not appear.0b0074ewith GPU: constant buffer views of at most 64 KiB #24, shader cache rebuilt): in the opening cutscene the waitress's skin is clean again and mouths move, by eye. (The first version left specks on her face and neck; a first form of the format-load rule, without the every-access condition, reached 724 programs and turned her skin grey. Neither form was pushed.) The once-logged format case did not appear; no errors.mainloses the device at world entry on this card (my report is there), and a local diagnostics patch for the trace above (not in this PR).victory-gpuhalves_cross_an_unsigned_buffer_view_unchanged, on the host device: every 16-bit pattern through anR16G16B16A16_UINTbuffer view comes back unchanged moved as unsigned integers (65,536 of 65,536). Moved by way of floats as before, 1 did; that number is printed, not asserted.victory-gpuonly_16_bit_float_and_signed_buffer_views_get_an_unsigned_twinandviews_whose_values_the_console_would_convert_are_named(no device).victory-shaderhalves_go_through_a_table_as_they_are_and_name_their_views: a synthetic program (abuffer_load_format_d16_xyzwfrom a table's first view, abuffer_store_format_d16_xyzwto its second) names both places, passesdxil.dllvalidation, and on the hardware adapter and on WARP stores exactly the halves it loaded, not-a-number patterns and integers above0x7bffincluded.victory-shaderhalf_places_are_the_descriptors_the_program_loads: a range from dword 0 whose program loads its descriptors at dwords 8 and 16 names (1, 8) and (1, 16); with the first descriptor picked at run time instead, only (1, 16).victory-shadera_format_load_read_as_halves_loads_the_integer, on the hardware adapter and on WARP:0x3c00read withbuffer_load_format_xthrough anR16_UINTview and used throughv_cvt_f32_f16comes through as 1.0, both straight and behind a branch with a later masked rewrite of the register; a whole-float use names nothing, and neither does a half load beside a whole-float load of the same view.victory-gpua_fresh_table_holds_the_half_views_past_its_range_starts: fails without the span fix (the next dynamic allocation landed inside the table), passes with it.shader_cacheround trip extended to the new field.cargo test --workspace --lockedon the branch (on0b0074e): 573 passed, 0 failed, 12 ignored; merged with currentmain(3973179;draw.rsis the one file both change, and it merges cleanly): 582 passed, 0 failed, 12 ignored. The device tests ran on the RTX 5080.cargo clippy -p victory-shader --all-targets --lockedon the branch: no warning.cargo clippy --workspace --all-targets --lockedand with--all-features(ona253706, before the later commits): no warning in the lines this changes. Both report 4 warnings in code this doesn't touch, whichmainhas too (draw.rssort_unstable_by,indirect.rsdepth_written,resource.rsplaced_filler_twins,shadow.rsis_multiple_of), so CI's-D warningsstep will stop on those.Not shown
translated_compute_matches_pcneeds the console's compiler and was not run. Its "16-bit and 64-bit arithmetic" case stores halves withbuffer_store_format_d16; the translated program is now shown theR16G16B16A16_UINTtwin of that buffer (View::HalfUintUav), the PC program keeps the float view.AI-assisted (Claude Code): the investigation, the first change and its tests by Claude Fable 5.2; the review fixes, the format-load rule, their tests and this text by Claude Opus 5.5. I ran the game and checked the faces by eye. Counts and log lines only, nothing from the game attached.
🤖 Generated with Claude Code