Skip to content

Shaders, GPU: 16-bit buffer accesses keep their bits (the face network computed zeros: mouths now move) - #927

Open
tippythetaidum wants to merge 6 commits into
fxceless:mainfrom
tippythetaidum:gpu/half-views
Open

tippythetaidum wants to merge 6 commits into
fxceless:mainfrom
tippythetaidum:gpu/half-views

Conversation

@tippythetaidum

@tippythetaidum tippythetaidum commented Nov 25, 2026 •

Copy link
Copy Markdown

Status (2026-11-25, 15:5x UTC): ready for review. The face specks reported in the comments below are fixed in b9c3781: in the game the waitress's skin is clean and mouths move. The review fixes are in befaf3b and b6bf651. Details under Change and Tested.

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 output ped_standard_head_cs:CS_BlendshapeTranslationsHSSGraphOutputExtract (970c4fbb3b017c0e) turns into blend-shape offsets, then CS_ReconstructBlendshapeNormals (e4a7e088c7780ce8).

Those programs move every tensor with buffer_load_format_d16_x, buffer_load_format_d16_xyzw and buffer_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 as R16G16B16A16_UINT and R16_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.f32 then legacyF32ToF16, and legacyF16ToF32 then bufferStore.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):

without this change with it
the network's 24 MB arena all zeros in 557 of 557 samples changing in 1,074 of 1,074
its 1,064,960-byte output all zeros in 559 of 559 changing in 539 of 539
the blend-shape translations (2.8 MB) changing in 69 of 584 changing in 824 of 824

The zeros were the same with VICTORY_CARD_BUFFERS=0, VICTORY_LATE_WAIT=0 and VICTORY_SHADER_OPT=0 (one run each), so it isn't the copies, the flights or the clean-up passes.

Change

  • victory-shader: a d16 typed buffer access through a descriptor loaded from a fixed place in a descriptor table moves each channel's 16 bits as an unsigned integer (bufferLoad.i32 / bufferStore.i32, the handle annotated as u32), packing and unpacking the halves as before. HostShader::half_views names those descriptors (root parameter, the dword the program loads the descriptor from); the shader cache stores it.
  • victory-gpu: in 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.
  • victory-shader, format loads read as halves (emit/halves.rs): CS_BlendshapeTranslationsHSSGraphOutputExtract reads the network's output with plain buffer_load_format_x through the same R16_UINT views 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 a v_fma_mix* source with its op_sel_hi bit; 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.
  • victory-gpu, a fresh table's span (review): the half places are among the slots a fresh table selects, so it reaches a half view past its range's start (State::tables).
  • A view at such a place in a format the integers don't carry exactly (wider channels, normalised, signed 8-bit, structured or raw) is logged once with its format (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.

  • In the title, diagnostics builds, default settings, shader cache rebuilt for the new translation. By eye, in the prologue's cutscenes and the walk through the prison: the player character's mouth moves with her lines and her face makes expressions. (With the first version described above, the waitress's and the escorting guard's mouths already moved; the player's twitched.) A confirming run of this commit on 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.
  • With all four commits (diagnostics build on 0b0074e with 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.
  • No device loss in those runs. They also carried GPU: constant buffer views of at most 64 KiB #24, without which current main loses 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).
  • Unit tests (new):
    • victory-gpu halves_cross_an_unsigned_buffer_view_unchanged, on the host device: every 16-bit pattern through an R16G16B16A16_UINT buffer 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-gpu only_16_bit_float_and_signed_buffer_views_get_an_unsigned_twin and views_whose_values_the_console_would_convert_are_named (no device).
    • victory-shader halves_go_through_a_table_as_they_are_and_name_their_views: a synthetic program (a buffer_load_format_d16_xyzw from a table's first view, a buffer_store_format_d16_xyzw to its second) names both places, passes dxil.dll validation, and on the hardware adapter and on WARP stores exactly the halves it loaded, not-a-number patterns and integers above 0x7bff included.
    • victory-shader half_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-shader a_format_load_read_as_halves_loads_the_integer, on the hardware adapter and on WARP: 0x3c00 read with buffer_load_format_x through an R16_UINT view and used through v_cvt_f32_f16 comes 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-gpu a_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_cache round trip extended to the new field.
  • cargo test --workspace --locked on the branch (on 0b0074e): 573 passed, 0 failed, 12 ignored; merged with current main (3973179; draw.rs is 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 --locked on the branch: no warning. cargo clippy --workspace --all-targets --locked and with --all-features (on a253706, before the later commits): no warning in the lines this changes. Both report 4 warnings in code this doesn't touch, which main has too (draw.rs sort_unstable_by, indirect.rs depth_written, resource.rs placed_filler_twins, shadow.rs is_multiple_of), so CI's -D warnings step will stop on those.

Not shown

  • translated_compute_matches_pc needs the console's compiler and was not run. Its "16-bit and 64-bit arithmetic" case stores halves with buffer_store_format_d16; the translated program is now shown the R16G16B16A16_UINT twin of that buffer (View::HalfUintUav), the PC program keeps the float view.
  • Only one vendor and card. What the old float path gave through an integer view elsewhere (zeros or other values) I don't know.
  • A d16 access through a view reached other than from a fixed place in a table (a root view, a view picked from the heap by index, a descriptor picked at run time) keeps the float path: its slot, and so its format, is known only then. The title's 65 programs with these accesses load all 231 of their descriptors from fixed places.
  • The format-load rule reads the program's code, not the view: a place qualifies only when every access through it reads halves and the program picks nothing from that table at run time. A format load read as halves elsewhere keeps the float path.
  • Through a view of wider, normalised or signed 8-bit channels, which the console would convert to and from halves, the integers are read and written unconverted (the once-logged case above).

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

@avt0m4t48

Copy link
Copy Markdown

I found a descriptor range case on 5dc9e63 where the translator records the wrong slot for the host view. The range starts at byte 0. The synthetic shader loads its SRV descriptor at byte 32 and its UAV descriptor at byte 64. Lowering records half_views = [(1, 0), (1, 16)]. The SRV is actually at dword 8, so the expected metadata is [(1, 8), (1, 16)]. The range-base control from this PR, which reads at byte 0, still passes and executes on WARP.

used_kind returns the enclosing UsedResource, whose table_offset_dwords specifies the start of the range. The emitted heap index already includes the actual load's byte displacement. The host compares half_views against the individual slot, so an R16*_FLOAT SRV at byte 32 would keep its float view while the shader requests an unsigned load. The assertion verifies the metadata mismatch. I did not measure the result of dispatching through that mismatched view.

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.

@Ym1r1710

Copy link
Copy Markdown
Contributor

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.

tippythetaidum added a commit to tippythetaidum/victory-fork that referenced this pull request Nov 25, 2026
…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>
@tippythetaidum

Copy link
Copy Markdown
Author

Thanks, you're right: used_kind gives where the range starts, and the host checks the exact slot. Fixed in befaf3b:

  • 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, since its slot (and so its format) is known only then. It's listed with the other shortcuts in the description now.
  • New test half_places_are_the_descriptors_the_program_loads: your case (one entry for a range from dword 0, loads at 0x20 and 0x40) names [(1, 8), (1, 16)]; with the first load's offset taken at run time (from an SGPR), only [(1, 16)].

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. cargo test --workspace --locked with the fix: 571 passed, 0 failed, 12 ignored (RTX 5080).

And thanks for the numbers from the other 5080, Ym1r1710.

AI-assisted (Claude Code, Claude Opus 5.5).

@avt0m4t48

Copy link
Copy Markdown

Confirmed that your new half_places_are_the_descriptors_the_program_loads test passes on befaf3b. I found a remaining case on the host side when the half descriptor is the last descriptor the shader reads.

The WARP probe goes through State::tables. It binds a two-slot table with one used-resource range starting at dword 0 and an RGBA16_FLOAT view at dword 8. The half_views entry (1, 8) makes the table fresh, but the reservation still ends at dword 0 because n only uses the range starts and runtime-selected slots. Fresh allocation starts at host slot 2. The next allocation gets slot 3, which the shader needs for its second view. It should get slot 4.

Adding the current root parameter's half_views offsets to selected before the sort/dedup makes the WARP probe pass. This both extends the copied span and includes those views in the existing refresh path for a fresh table. The probe checks allocation on WARP, with no shader dispatch in this test. Probe source · Windows run

AI-assisted using Codex.

@iGoldenNinja

iGoldenNinja commented Nov 25, 2026 •

Copy link
Copy Markdown

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 (b055481, integrating 5dc9e63 on 92a72df) with VICTORY_FACE_PROBE=1 and VICTORY_D16_TYPED_BITS=0 or 1. At the blend-shape extractor's 1,064,960-byte R16_UINT input (root 0, dword 16), we saw 0/76 → 69/69 nonzero reads and 0/75 → 59/68 changes across successive comparable reads. In the first 15 seconds at the matched prison camera, nonzero reads went from 0/12 to 13/13. The treatment camera later turned. The local captures leave mouth motion and lip sync open. Pinned Series X A/B report

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 5dc9e63 to 128/128 on both adapters with tippythetaidum's translator correction in befaf3b.

We also extended avt0m4t48's fresh-table allocation reproduction through production binder dispatch and readback. At befaf3b the allocator reserved one slot where our fixture required three. At efd753e, both adapters preserved the slot-0 FLOAT values and the slot-2 UINT half words in the fresh-table case and when refreshing an existing UINT heap. Our audit found 425/425 typed 16-bit access sites in the 24 observed facial-network producers at their declared range starts. The interior-slot fixture covers a separate path. Pinned descriptor report and tests

November 25 follow-up — extractor type mismatch. After tippythetaidum's RTX 5080 skin A/B, we checked the saved translation of extractor 970c4fbb3b017c0e against the runtime bindings in our two Series X runs. Three ordinary buffer_load_format_x instructions read root table 0, dword 16. The emitted DXIL declares a four-component FLOAT buffer and uses three bufferLoad.f32 calls, each bitcasting component 0 to an integer and converting its low half to float. Both runs bound a 1,064,960-byte R16_UINT view there. That confirms the load/view mismatch the author suspected. The colored squares were observed in the author's A/B, and our evidence leaves their pixel-level cause open. Updated pinned report

November 25 follow-up — exhaustive finite coordinate inputs. On the unmodified befaf3b production translator plus our synthetic fixture, ordinary format X through R16_FLOAT, ordinary format X through R16_UINT, and explicit D16 format X through R16_UINT each matched 190,464 of 190,464 expected FP32 coordinate sums on both the RTX 5080 (617.14, Windows 11 Pro 25H2 build 26200.9974) and WARP. Each case puts all 63,488 finite binary16 patterns into each of three low-half extract/FMA positions. The valid FLOAT and UINT references differ in 190,454 sums. The fixture uses table parameter 1, dword 16. The live extractor uses parameter 0, dword 16.

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

@tippythetaidum
tippythetaidum marked this pull request as draft November 25, 2026 14:01
@tippythetaidum

Copy link
Copy Markdown
Author

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: ped_standard_head_cs:CS_BlendshapeTranslationsHSSGraphOutputExtract (970c4fbb3b017c0e) also reads the network's output with plain buffer_load_format_x (not d16) through the same 16-bit unsigned view, and uses only the low half of each result as a half float (v_fma_mix_f32 ... sel_lo). The translator still lowers that load as a float load, which through an integer view gives garbage. Before this branch the output was all zeros, so the garbage was zero too; now it's added to some vertices of the face.

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).

simnJS added a commit to MiamiGame/XTP that referenced this pull request Nov 25, 2026
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.
simnJS added a commit to MiamiGame/XTP that referenced this pull request Nov 25, 2026
…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).
wolfattack199 pushed a commit to wolfattack199/victory-fork that referenced this pull request Nov 25, 2026
…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)
tippythetaidum added a commit to tippythetaidum/victory-fork that referenced this pull request Nov 25, 2026
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>
@tippythetaidum
tippythetaidum marked this pull request as ready for review November 25, 2026 15:49
@tippythetaidum

Copy link
Copy Markdown
Author

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): a_fresh_table_holds_the_half_views_past_its_range_starts builds your case (one entry for a range from dword 0, an R16G16B16A16_FLOAT placed view at dword 8, half_views (1, 8)) and checks that the next dynamic allocation lands after the table's second slot. It fails without the change (the next allocation got slot 3, inside the table) and passes with it. The title's 65 network programs name each of their descriptors with its own used-resource entry, so their tables are the same as before.

b9c3781, the specks on faces (the regression I reported above): CS_BlendshapeTranslationsHSSGraphOutputExtract (970c4fbb3b017c0e) reads the network's output with plain buffer_load_format_x through the same R16_UINT view and uses only the low half of each result as a half float (v_fma_mix_f32 ... sel_lo). Lowered as a float load, that read garbage once the output was no longer all zero. A format load whose every channel is read only as a half float (v_cvt_f32_f16, or a v_fma_mix* source with its op_sel_hi bit) now takes the same unsigned-integer path and names its place, but only where every access through that place moves halves and the program picks nothing from that table at run time. Two things I got wrong on the way, both caught before pushing:

  • A first form named a place on any one such load. In the title's shader pack that reached 724 programs, among them hundreds of pixel programs that read one value of a view as a half and the rest as numbers; in the game, the waitress's skin went grey. With the every-access condition it's 77: the 65 network programs, the head program, and 11 lighting and water compute programs that read those views as halves alone.
  • The head program's loads are behind a branch, and the IR has every later VGPR write read the register's old value (for the lanes EXEC leaves alone). So uses are now operand reads (ir::operand_reads), and phis carry the value on.

New test a_format_load_read_as_halves_loads_the_integer (hardware and WARP): 0x3c00 through an R16_UINT view comes through as 1.0, 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. The helpers are in emit/halves.rs, a child module like intersect.rs (lower.rs would pass the repository's 512 KiB file limit).

In the game (diagnostics build of this branch on 0b0074e with #24, RTX 5080, shader cache rebuilt): the opening cutscene's waitress's skin is clean again and mouths move, by eye; the log has no once-logged format line (the 11 lighting and water programs met only views that carry the integers exactly), no errors, no device loss.

cargo test --workspace --locked on the branch: 573 passed, 0 failed, 12 ignored; merged with current main (3973179, draw.rs merges cleanly): 582 passed, 0 failed, 12 ignored (RTX 5080). cargo clippy -p victory-shader --all-targets: clean. PR description updated.

@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.

@sawetco

sawetco commented Nov 25, 2026

Copy link
Copy Markdown

Independent RTX 5070 result at b9c3781 (Windows 11, NVIDIA 621.24, native D3D12). In a Series S playthrough with this revision backported to vitutu1/victory-perf@97c3aa2, the player could see mouths moving during dialogue and reported that faces and mouths looked correct in the scenes played through the Gone Fishing camp. We also had the boat readback change enabled. The opening waitress shot would still need its own comparison on this card.

Four targeted tests passed both on the PR head and on our integrated build. In halves_cross_an_unsigned_buffer_view_unchanged, the integer-view path preserved 65,536 of 65,536 distinct 16-bit patterns. The float control preserved 1 of 65,536. The fresh-table span, format-load-as-halves, and table half-view metadata tests also passed in both builds.

The runtime recorded two dispatches each for 970c4fbb3b017c0e (blendshape output extraction) and e4a7e088c7780ce8 (reconstruction) in frame 2304 of the Lucia dialogue. The dispatch counts come from the renderer. Mouth movement was observed by the player, with no lip-sync timing measurement.

@tippythetaidum

Copy link
Copy Markdown
Author

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 b9c3781 and the mouths move, by eye in the opening cutscene (the regression I reported above, and its fix, are both described in my comment before yours).

AI-assisted (Claude Code, Claude Opus 5.5).

@UwUCammie

Copy link
Copy Markdown

Tested on RX 7900 XT (CachyOS Linux, Wine 11.22 + vkd3d-proton + RADV). Merged cleanly onto a 3973179-based stack, all victory-shader unit tests pass, and ran 480–540 s gameplay passes to frame 4600 with no artifacts or crashes.

triippywhale pushed a commit to triippywhale/victory-fork that referenced this pull request Nov 25, 2026
…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
oz-stanislav-zhukov added a commit to oz-stanislav-zhukov/victory-fork that referenced this pull request Nov 25, 2026
… eyes not, grey blotches new)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bordersky

Copy link
Copy Markdown

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 9c23e8d with this PR's six commits cherry-picked. avatarmanz already carried the heap-picked half of the fix (VIctory 4243a96a, integer_view), so lower.rs and draw.rs conflicted. I kept both: table views take this PR's halves path, and heap-picked views keep integer_view (typed && !halves). Settings: play.ps1 with VICTORY_FETCH_CHECK=1 (needed on vkd3d-proton for relay stage 2, avatarmanz#138).

Result, new game, prison scene, gameplay (not a cutscene):

  • Before: no mouth moved in gameplay; cutscenes animated.
  • After: mouths and faces animate, and the other characters look right.
  • The main female character opens her mouth far too wide as soon as she speaks, well past any natural shape. It is the same kind of over-driven blend shape as the diner case above, on a different character and scene.
  • No new translation or pipeline errors in the log, and no measurable frame cost (~58 ms a frame at ~4,300 draws in that scene).

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.

bordersky added a commit to bordersky/victory-linux that referenced this pull request Nov 26, 2026
…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.
SPOOKEXE pushed a commit to SPOOKEXE/victory-fork that referenced this pull request Nov 26, 2026
…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>
SPOOKEXE pushed a commit to SPOOKEXE/victory-fork that referenced this pull request Nov 26, 2026
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>
SPOOKEXE pushed a commit to SPOOKEXE/victory-fork that referenced this pull request Nov 26, 2026
… 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>
@slauko

slauko commented Nov 26, 2026

Copy link
Copy Markdown

Ported to my line (Wine, RTX 3080 Ti, vkd3d-proton ec20719, uiliannn's base) and it applies and works as written — HostShader::half_views, the unsigned twin in descriptor::host::half_view, the table made afresh at those places; the frame time did not move (266 to 275 ms a frame in the cell, as before).

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 (m12, m13). What the log shows instead is a missing pass, not a wrong value:

warn:  vkd3d-proton: Required WaveSize range [64, 64], but supported range is [32, 32].
warn:  victory_gpu::pipeline::host: host pipeline refused ... shaders=[compute 02384a60fda6f2d0]
warn:  victory_gpu::draw: a dispatch without a host pipeline dropped pipeline=0x70d06160

(2da4beb386509b77 the second one; I wrote this up on #1176.) If the face network is one of those two dispatches, no 16-bit fix can reach it. On a host whose waves are 64 both passes run and this port is what makes their values right.

No action needed here — just the cross-reference.

bordersky added a commit to bordersky/victory-linux that referenced this pull request Nov 26, 2026
…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.
@tippythetaidum

Copy link
Copy Markdown
Author

@slauko, on the two refused programs: by name, neither is the face network. victory shader-info on the Series X shaders.rpf gives:

  • 02384a60fda6f2d0: vfx_triangleClip:CS_DefragHeap_ComputeRelocations
  • 6b82bc7d22016cb5: vfx_triangleClip:CS_CollectTriangles_Meshlets
  • 2da4beb386509b77: alphaResolve:CS_AlphTransmissionPrefilterMip

On an RTX 5080 (Windows, native D3D12, also 32-lane only), all three were refused the same way in our 25 Nov build (fork main d827419 + this PR + #1147 + #823). Faces still had skin in the café flashback and the cell. So a black head with the eyes and mouth floating needs another cause.

One candidate that matches the symptom: HLVM04's finding on #923. With VICTORY_TEXTURE_NO_WAIT=1, a skin texture can stay zero after the runtime remaps its memory, so the head goes black while the eyes and mouth (other textures) draw. Curry-976 confirmed it with an A/B on #1022. If your line runs with NO_WAIT=1, a run with VICTORY_TEXTURE_NO_WAIT=0 would tell.

AI-assisted (Claude Code, Claude Opus 5.5).

@Anzymanz

Copy link
Copy Markdown

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 port itself: all 65 face-network programs translate the same as upstream main plus this PR, apart from a wave-wide 16-bit sum in 2 programs that comes from the base line;
  • the readers' decoding of the network output;
  • the wave-64 form (forcing the 32-lane translation changes nothing);
  • ACO's optimiser and scheduler (RADV_DEBUG with them off, cold caches);
  • f32→f16 rounding: RADV rounds the conversion toward zero where lavapipe rounds to nearest even (263,179 of 589,824 test inputs differ), but rounding every scalar, packed and convert result to nearest in the translated code changes nothing on screen;
  • the vkd3d-proton build (Proton's own and vkd3d-proton master both deform).

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.

@Anzymanz

Copy link
Copy Markdown

@ThomasHFWright, a direct question, since your LinVxtory faces-hair notes put you on an RTX 5090 under Proton on CachyOS: have you run this PR's commits there with faces drawing, and if so, do the mouths move naturally, or over-drive (upper lip lifted toward the nose) the way they do on the three AMD cards under Proton above? That single data point would tell us whether the over-drive follows the vendor (RADV) or the platform (Wine/vkd3d-proton).

AI-assisted (Claude Code, Claude Opus 5.5).

fxceless added a commit that referenced this pull request Nov 26, 2026
…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.
@tippythetaidum

tippythetaidum commented Nov 26, 2026 •

Copy link
Copy Markdown
Author

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 main d827419 + this PR's commits + #1147 + #823 (our 25 Nov build). Series X, diagnostics build.

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:

  • Lucia talking in the diner close-up;
  • the waitress smiling;
  • the counselor mid-sentence in her office.

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).

KomanderDG88 added a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 26, 2026
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>
KomanderDG88 added a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 26, 2026
…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>
anoyarou added a commit to anoyarou/VIctory-RDNA4-linux that referenced this pull request Nov 26, 2026
…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>
anoyarou added a commit to anoyarou/VIctory-RDNA4-linux that referenced this pull request Nov 26, 2026
…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>
anoyarou added a commit to anoyarou/VIctory-RDNA4-linux that referenced this pull request Nov 26, 2026
…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>
anoyarou added a commit to anoyarou/VIctory-RDNA4-linux that referenced this pull request Nov 26, 2026
…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>
SPOOKEXE added a commit to SPOOKEXE/victory-fork that referenced this pull request Nov 26, 2026
… 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.
pr0vId3nce added a commit to pr0vId3nce/VIctory-NVIDIA that referenced this pull request Nov 26, 2026
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)
pr0vId3nce added a commit to pr0vId3nce/VIctory-NVIDIA that referenced this pull request Nov 26, 2026
…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)
pr0vId3nce added a commit to pr0vId3nce/VIctory-NVIDIA that referenced this pull request Nov 26, 2026
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)
pr0vId3nce added a commit to pr0vId3nce/VIctory-NVIDIA that referenced this pull request Nov 26, 2026
…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)
grosterr added a commit to grosterr/victory-fork that referenced this pull request Nov 26, 2026
…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>
grosterr added a commit to grosterr/victory-fork that referenced this pull request Nov 26, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.