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

Open
github-bot wants to merge 6 commits from github-bot/gh-927 into main AGit
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 13:02 UTC · original
tippythetaidum:gpu/half-views → main · +1249 −22 · 14 files · 6 commits · open

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 #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 #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

**@⁠tippythetaidum** on GitHub · 2026-11-25 13:02 UTC · [original](https://github.com/fxceless/victory-fork/pull/927) `tippythetaidum:gpu/half-views` → `main` · +1249 −22 · 14 files · 6 commits · open > **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 #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 #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](https://claude.com/claude-code)
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 #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 <[email protected]>
The test came to main with c36971b, after this branch began; HostShader
has half_views here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:53:58 +00:00
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 13:14 UTC · original

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.

**@⁠avt0m4t48** on GitHub · 2026-11-25 13:14 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7163487358) 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](https://github.com/avt0m4t48/victory-fork/commit/1498b6c4b582ba6fb77a473a8f00e1ea8f4c9dea) · [Windows verification](https://github.com/avt0m4t48/victory-fork/actions/runs/45621081260) AI-assisted using Codex.
Author
Owner

@⁠Ym1r1710 on GitHub · 2026-11-25 13:14 UTC · original

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.

**@⁠Ym1r1710** on GitHub · 2026-11-25 13:14 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7163492688) 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.
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 13:37 UTC · original

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

**@⁠tippythetaidum** on GitHub · 2026-11-25 13:37 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7164043623) 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).
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 13:44 UTC · original

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.

**@⁠avt0m4t48** on GitHub · 2026-11-25 13:44 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7164227485) 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](https://github.com/avt0m4t48/victory-fork/commit/6d65a930c21eb2bc9b98a300d58b746f2bf38aee) · [Windows run](https://github.com/avt0m4t48/victory-fork/actions/runs/45625883149) AI-assisted using Codex.
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 14:01 UTC · original

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

**@⁠tippythetaidum** on GitHub · 2026-11-25 14:01 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7164653246) 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).
Author
Owner

@⁠iGoldenNinja on GitHub · 2026-11-25 13:59 UTC · original · edited 2026-11-25 14:55 UTC

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

**@⁠iGoldenNinja** on GitHub · 2026-11-25 13:59 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7164600895) · edited 2026-11-25 14:55 UTC 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](https://github.com/iGoldenNinja/victory-fork/blob/3bcf5d577a96d2fb13de76a7c71cb93b5bbfe112/docs/rtx5080-pr927-facial-output.md) For avt0m4t48's [displaced-SRV report](https://git.gtahub.st/github/fxceless--victory-fork/pulls/927), 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`](https://git.gtahub.st/github/fxceless--victory-fork/pulls/927). We also extended avt0m4t48's [fresh-table allocation reproduction](https://git.gtahub.st/github/fxceless--victory-fork/pulls/927) 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](https://github.com/iGoldenNinja/victory-fork/blob/094ed30187a6c75c06343d3cf3fbf80b5b2e1288/docs/rtx5080-pr927-range-offset.md) **November 25 follow-up — extractor type mismatch.** After [tippythetaidum's RTX 5080 skin A/B](https://git.gtahub.st/github/fxceless--victory-fork/pulls/927), 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](https://github.com/iGoldenNinja/victory-fork/blob/977b8dfb82826d00a65ae4ff01a91b84b00a3c24/docs/rtx5080-pr927-facial-output.md) **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](https://git.gtahub.st/github/fxceless--victory-fork/pulls/927). A matched visual A/B remains open. [Pinned fixture, results, and scope](https://github.com/iGoldenNinja/victory-fork/blob/dc3d783f9e3dca93a3ec17b0663f4f9496859375/docs/rtx5080-pr927-extractor-arithmetic.md)
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 15:54 UTC · original

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.

**@⁠tippythetaidum** on GitHub · 2026-11-25 15:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7167415728) 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.
Author
Owner

@⁠sawetco on GitHub · 2026-11-25 16:23 UTC · original

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.

**@⁠sawetco** on GitHub · 2026-11-25 16:23 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7167907197) 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.
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 16:29 UTC · original

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

**@⁠tippythetaidum** on GitHub · 2026-11-25 16:29 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7168064310) 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).
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-25 16:59 UTC · original

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.

**@⁠UwUCammie** on GitHub · 2026-11-25 16:59 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7168839062) 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.
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-25 17:52 UTC · original

Mouths move on an RTX 3070 8 GB in Series S; skin clean on a warm cache

The four commits (through b9c3781) cherry-picked onto our tree, which has its own handling of fresh tables' dynamic
slots (RecompLive 6b44e423's span) and a split dynamic ring. Conflicts were in tests only; in descriptor.rs the
PR's fresh-table test had to ask for two slots where it asks for one, because our ring hands single slots out from
the top.

  • Mouths move in cutscene close-ups, by eye, in three runs. Faces and arms have clean skin.
  • On the first launch after the change (shader cache rebuilding, frames of up to 1.4 s) skin on faces and arms was
    dark and speckled for the whole run; on the next launch it was clean. I take that for the character bake running
    before its textures were there during the slow launch, not for this PR, but anyone testing right after a cache
    rebuild may see it.
  • One small flat blue patch near a character's eye in one close-up of one run; not explained, not seen again so far.
  • No measurable frame-time change (206 against 210 ms in the same scene).

Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series S mode (PR #188), 1920x1080, VICTORY_TEXTURE_DROP_MIPS=1, relay at its default, a diagnostics build of a tree at main 310c6eb6 with a number of open PRs picked. One run per configuration unless said; run-to-run spread here is 5-10 ms.

**@⁠CuteBooty** on GitHub · 2026-11-25 17:52 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7170116193) **Mouths move on an RTX 3070 8 GB in Series S; skin clean on a warm cache** The four commits (through b9c3781) cherry-picked onto our tree, which has its own handling of fresh tables' dynamic slots (RecompLive 6b44e423's span) and a split dynamic ring. Conflicts were in tests only; in `descriptor.rs` the PR's fresh-table test had to ask for two slots where it asks for one, because our ring hands single slots out from the top. - Mouths move in cutscene close-ups, by eye, in three runs. Faces and arms have clean skin. - On the first launch after the change (shader cache rebuilding, frames of up to 1.4 s) skin on faces and arms was dark and speckled for the whole run; on the next launch it was clean. I take that for the character bake running before its textures were there during the slow launch, not for this PR, but anyone testing right after a cache rebuild may see it. - One small flat blue patch near a character's eye in one close-up of one run; not explained, not seen again so far. - No measurable frame-time change (206 against 210 ms in the same scene). Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series S mode (PR #188), 1920x1080, `VICTORY_TEXTURE_DROP_MIPS=1`, relay at its default, a diagnostics build of a tree at main 310c6eb6 with a number of open PRs picked. One run per configuration unless said; run-to-run spread here is 5-10 ms.
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 17:58 UTC · original

Thanks, @⁠CuteBooty: another card, and an 8 GB one, is good to have.

On the blue patch near an eye: I see something like it on the RTX 5080 too. In a few close-ups the irises take a blue-violet, sky-like colour instead of their own, and later shots of the same face are normal. All my runs so far had this PR together with #823 (whose reflections now run on NVIDIA), so I can't yet say which of the two it follows. A run without #823 is queued; I'll post here if the result points at this PR.

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

**@⁠tippythetaidum** on GitHub · 2026-11-25 17:58 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7170250522) Thanks, @⁠CuteBooty: another card, and an 8 GB one, is good to have. On the blue patch near an eye: I see something like it on the RTX 5080 too. In a few close-ups the irises take a blue-violet, sky-like colour instead of their own, and later shots of the same face are normal. All my runs so far had this PR together with #823 (whose reflections now run on NVIDIA), so I can't yet say which of the two it follows. A run without #823 is queued; I'll post here if the result points at this PR. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠ThomasHFWright on GitHub · 2026-11-25 18:12 UTC · original

Validated the four commits through b9c3781349 in a Linux/Proton integration (CachyOS, Ryzen 7 9800X3D, RTX 5090, NVIDIA 620.73.04, GE-Proton 11-14).

Native shader suite: 185 passed / 2 ignored. Windows shader: 234 passed / 1 existing stub-pipeline failure / 3 ignored. GPU: 211 passed / 4 existing runtime failures / 8 ignored. Exhaustive UINT-view readback preserves 65,536/65,536 half patterns versus 1/65,536 for the float control.

Integration retained residency-aware table cache keys and fixed preparation of interior half slots already using UINT without a CBV. Final review found two additional cases, corrected locally:

  • d16 could bypass the half-only gate and select a UINT companion beside an ordinary f32 access to the same slot. Both operation lowering and descriptor annotations now use the same gate.
  • Half-only use analysis ignored values preserved through masked VGPR writes. It now follows the written value, including an in-place half conversion that also explicitly reads the old register.

Six native emitter regressions cover these cases and retained pure d16 paths. Restoring the earlier behavior fails four of them; the pure-path and dead-rewrite controls still pass. Conservative mixed/dynamic-alias fallback uses the old float path and is explicitly NOT lossless for integer/NaN payloads. Exact mixed-format support needs a separate binding or format-aware lowering.

Source/details: https://github.com/ThomasHFWright/LinVictory/blob/linux-edge/docs/pr927-integration.md
Title rendering remains incomplete; different scenes prevent a controlled facial-rendering improvement claim. AI-assisted integration/testing with OpenAI Codex. No proprietary inputs or raw logs attached.

**@⁠ThomasHFWright** on GitHub · 2026-11-25 18:12 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7170585693) Validated the four commits through b9c378134968f93739a9f5864052f293ed67bf4c in a Linux/Proton integration (CachyOS, Ryzen 7 9800X3D, RTX 5090, NVIDIA 620.73.04, GE-Proton 11-14). Native shader suite: 185 passed / 2 ignored. Windows shader: 234 passed / 1 existing stub-pipeline failure / 3 ignored. GPU: 211 passed / 4 existing runtime failures / 8 ignored. Exhaustive UINT-view readback preserves 65,536/65,536 half patterns versus 1/65,536 for the float control. Integration retained residency-aware table cache keys and fixed preparation of interior half slots already using UINT without a CBV. Final review found two additional cases, corrected locally: - d16 could bypass the half-only gate and select a UINT companion beside an ordinary f32 access to the same slot. Both operation lowering and descriptor annotations now use the same gate. - Half-only use analysis ignored values preserved through masked VGPR writes. It now follows the written value, including an in-place half conversion that also explicitly reads the old register. Six native emitter regressions cover these cases and retained pure d16 paths. Restoring the earlier behavior fails four of them; the pure-path and dead-rewrite controls still pass. Conservative mixed/dynamic-alias fallback uses the old float path and is explicitly NOT lossless for integer/NaN payloads. Exact mixed-format support needs a separate binding or format-aware lowering. Source/details: https://github.com/ThomasHFWright/LinVictory/blob/linux-edge/docs/pr927-integration.md Title rendering remains incomplete; different scenes prevent a controlled facial-rendering improvement claim. AI-assisted integration/testing with OpenAI Codex. No proprietary inputs or raw logs attached.
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 18:40 UTC · original

Thanks, @⁠ThomasHFWright, this is a careful review and both cases are real in this PR.

  1. d16 beside a whole float read. The access site and the descriptor-as-data site both let a d16 access through without the half-only check, so a place reached by a d16 load and by an ordinary float format load would be named in half_views, and the float read would then see the unsigned twin. Both sites now require the place to be in places_read_as_halves() for d16 too (which already counts d16 accesses as half ones). Mixed places fall back to the float path, as they did before this PR.
  2. Values kept by masked writes. read_only_as_halves skipped a later write of the register entirely. But that write keeps the loaded value in the lanes EXEC leaves alone, and those lanes go on to whatever reads the new value. It now follows the value such a write makes, as it follows phis, including an in-place v_cvt_f32_f16 that also reads the value as an operand.

Three cases are added to the test, each asserting on half_views: a d16 load alone still names its place; a d16 load beside a whole float read of the same place names nothing; a value converted in place under EXEC and then added as a float in every lane names nothing.

Before I push, I'm checking one thing on the real pack. This morning the head program's Extract (970c4fbb3b017c0e) was only caught once masked rewrites of its load registers stopped counting as uses. Following the kept values is stricter again, and if it drops that program, the mouths stop moving. So I'm re-running the census of programs that name half places, along with the without-the-fix test runs and the full suite. I'll push once that's done, or say here if the stricter rule loses Extract, along with what I'd propose instead.

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

**@⁠tippythetaidum** on GitHub · 2026-11-25 18:40 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7171232856) Thanks, @⁠ThomasHFWright, this is a careful review and both cases are real in this PR. 1. **d16 beside a whole float read.** The access site and the descriptor-as-data site both let a d16 access through without the half-only check, so a place reached by a d16 load and by an ordinary float format load would be named in `half_views`, and the float read would then see the unsigned twin. Both sites now require the place to be in `places_read_as_halves()` for d16 too (which already counts d16 accesses as half ones). Mixed places fall back to the float path, as they did before this PR. 2. **Values kept by masked writes.** `read_only_as_halves` skipped a later write of the register entirely. But that write keeps the loaded value in the lanes EXEC leaves alone, and those lanes go on to whatever reads the new value. It now follows the value such a write makes, as it follows phis, including an in-place `v_cvt_f32_f16` that also reads the value as an operand. Three cases are added to the test, each asserting on `half_views`: a d16 load alone still names its place; a d16 load beside a whole float read of the same place names nothing; a value converted in place under EXEC and then added as a float in every lane names nothing. Before I push, I'm checking one thing on the real pack. This morning the head program's Extract (`970c4fbb3b017c0e`) was only caught once masked rewrites of its load registers stopped counting as uses. Following the kept values is stricter again, and if it drops that program, the mouths stop moving. So I'm re-running the census of programs that name half places, along with the without-the-fix test runs and the full suite. I'll push once that's done, or say here if the stricter rule loses Extract, along with what I'd propose instead. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 19:47 UTC · original

Follow-up on the two cases, @⁠ThomasHFWright, with the census of the whole pack this time.

1. d16 beside a whole float read: pushed in 5a55384. Both sites now require the place to be in places_read_as_halves() for d16 accesses too. On the pack it changes no program: all 65 programs with d16 places keep them. The one test that moved is a synthetic d16 store in a table the program also indexes at run time. It now takes the float path, as you describe for potential dynamic aliases. Two cases are added to a_format_load_read_as_halves_loads_the_integer: d16 alone still names its place, and d16 beside a whole float read of the same place names nothing. The second fails without the change.

2. Values kept by masked writes: not pushed, because following them as written drops the program this PR exists for. I implemented it as you describe, following the value every later write of the register keeps in the lanes EXEC leaves alone, in-place conversions included. The census then fell from 77 programs to 65. The 12 lost are all format loads (d16 = 0), among them the head program's CS_BlendshapeTranslationsHSSGraphOutputExtract (970c4fbb3b017c0e), whose half reads are why mouths move. The others are 11 lighting programs: light proxies, irradiance-cache and probe shading, screen-probe injection, water and scattering tiles.

A trace of Extract shows why. Its three loads run under one narrowed EXEC (v_cmpx_ne_u32). The compiler then reuses those VGPRs in later regions under other masks (v_mov_b32, v_lshlrev_b32, v_rcp_f32), and every float use that rejected the place reads the new value under the same EXEC as the write that made it. So it only ever sees that write's lanes, never the loaded ones. Following kept values without looking at the masks counts those as uses.

The sound version needs two pieces of lane reasoning, and I'm writing it next:

  • (a) A later write whose EXEC contains the load's EXEC kills the loaded lanes. That covers the EXEC restored after the branch, by following copies and v_cmpx / s_and_saveexec narrowings back to a common ancestor.
  • (b) A read under the same EXEC value as the write it reads sees only that write's lanes.

Your in-place conversion case (a conversion under a narrower EXEC, then a whole-float read under the wider one) is still caught by both. I'll post the census and the tests when it's in.

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

**@⁠tippythetaidum** on GitHub · 2026-11-25 19:47 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7172769740) Follow-up on the two cases, @⁠ThomasHFWright, with the census of the whole pack this time. **1. d16 beside a whole float read: pushed in `5a55384`.** Both sites now require the place to be in `places_read_as_halves()` for d16 accesses too. On the pack it changes no program: all 65 programs with d16 places keep them. The one test that moved is a synthetic d16 store in a table the program also indexes at run time. It now takes the float path, as you describe for potential dynamic aliases. Two cases are added to `a_format_load_read_as_halves_loads_the_integer`: d16 alone still names its place, and d16 beside a whole float read of the same place names nothing. The second fails without the change. **2. Values kept by masked writes: not pushed, because following them as written drops the program this PR exists for.** I implemented it as you describe, following the value every later write of the register keeps in the lanes EXEC leaves alone, in-place conversions included. The census then fell from 77 programs to 65. The 12 lost are all format loads (d16 = 0), among them the head program's `CS_BlendshapeTranslationsHSSGraphOutputExtract` (`970c4fbb3b017c0e`), whose half reads are why mouths move. The others are 11 lighting programs: light proxies, irradiance-cache and probe shading, screen-probe injection, water and scattering tiles. A trace of Extract shows why. Its three loads run under one narrowed EXEC (`v_cmpx_ne_u32`). The compiler then reuses those VGPRs in later regions under other masks (`v_mov_b32`, `v_lshlrev_b32`, `v_rcp_f32`), and every float use that rejected the place reads the new value **under the same EXEC as the write that made it**. So it only ever sees that write's lanes, never the loaded ones. Following kept values without looking at the masks counts those as uses. The sound version needs two pieces of lane reasoning, and I'm writing it next: - (a) A later write whose EXEC contains the load's EXEC kills the loaded lanes. That covers the EXEC restored after the branch, by following copies and `v_cmpx` / `s_and_saveexec` narrowings back to a common ancestor. - (b) A read under the same EXEC value as the write it reads sees only that write's lanes. Your in-place conversion case (a conversion under a narrower EXEC, then a whole-float read under the wider one) is still caught by both. I'll post the census and the tests when it's in. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-26 00:07 UTC · original

Rebased onto main dc4c0fc, which had moved to conflict with this branch.

  • descriptor/host.rs: #911's constant-view test and this PR's half-view tests had been added at the same place, so both are kept.
  • New commit d4b786f: the scalar-load dispatch test that came to main with c36971b builds a HostShader, and now names half_views (l.half_views).
  • Tests: cargo test -p victory-shader passes 219 and cargo test -p victory-gpu --lib passes 198 on this tree.
  • In game: the same five commits ran in our play build on d827419 (25 November). That's the build we played from the prologue into Chapter 1 with faces and mouths right.

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

**@⁠tippythetaidum** on GitHub · 2026-11-26 00:07 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7178420657) Rebased onto `main` `dc4c0fc`, which had moved to conflict with this branch. - **`descriptor/host.rs`:** #911's constant-view test and this PR's half-view tests had been added at the same place, so both are kept. - **New commit `d4b786f`:** the scalar-load dispatch test that came to `main` with c36971b builds a `HostShader`, and now names `half_views` (`l.half_views`). - **Tests:** `cargo test -p victory-shader` passes 219 and `cargo test -p victory-gpu --lib` passes 198 on this tree. - **In game:** the same five commits ran in our play build on `d827419` (25 November). That's the build we played from the prologue into Chapter 1 with faces and mouths right. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠DuarttBR on GitHub · 2026-11-26 02:04 UTC · original

Confirmed on an RTX 3080 10 GB (Ampere, 32-lane waves): mouths move.

Machine: Windows 11, Ryzen 9 5900X, 32 GB RAM, RTX 3080 10 GB, native D3D12.

Tree: a private NVIDIA tree built on soldsawn/victory-nvidia-8gb plus a few PRs. I cherry-picked this PR's commits 323a2a0, 4c7626d, 6aac62f, 01c9f93 and 896aa4c (the sixth, d4b786f, only touches a test my tree does not have). The conflicts were in lower.rs and descriptor/host.rs only: the module declarations (my tree already has descriptor_data and float64 as child modules) and base code that sits elsewhere in my tree. The logic of the change is untouched.

Result: Series X profile, the title's 4K frame shown in a 1080p window, 22 minutes of play from the prologue to the boat mission. Before: no character's mouth moved, in any run and with any set of switches. After: mouths move when characters talk (confirmed by eye by the tester). No device loss and no new translation or pipeline errors in the log. Frame rate unchanged within noise (world median 6.0 fps against 5.7 on the same kind of scenes before; the card is not the limit in these scenes).

The shader cache has to be rebuilt once (the translator's key changes): 25,689 programs in 255 s on 16 threads, then 3,620 pipelines in 703 s.

AI-assisted (Claude Code, Claude Sonnet 5.5). Counts and descriptions only, nothing from the game attached.

**@⁠DuarttBR** on GitHub · 2026-11-26 02:04 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7180428641) Confirmed on an RTX 3080 10 GB (Ampere, 32-lane waves): mouths move. **Machine:** Windows 11, Ryzen 9 5900X, 32 GB RAM, RTX 3080 10 GB, native D3D12. **Tree:** a private NVIDIA tree built on soldsawn/victory-nvidia-8gb plus a few PRs. I cherry-picked this PR's commits `323a2a0`, `4c7626d`, `6aac62f`, `01c9f93` and `896aa4c` (the sixth, `d4b786f`, only touches a test my tree does not have). The conflicts were in `lower.rs` and `descriptor/host.rs` only: the module declarations (my tree already has `descriptor_data` and `float64` as child modules) and base code that sits elsewhere in my tree. The logic of the change is untouched. **Result:** Series X profile, the title's 4K frame shown in a 1080p window, 22 minutes of play from the prologue to the boat mission. Before: no character's mouth moved, in any run and with any set of switches. After: mouths move when characters talk (confirmed by eye by the tester). No device loss and no new translation or pipeline errors in the log. Frame rate unchanged within noise (world median 6.0 fps against 5.7 on the same kind of scenes before; the card is not the limit in these scenes). The shader cache has to be rebuilt once (the translator's key changes): 25,689 programs in 255 s on 16 threads, then 3,620 pipelines in 703 s. AI-assisted (Claude Code, Claude Sonnet 5.5). Counts and descriptions only, nothing from the game attached.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-26 02:29 UTC · original

On an RX 7900 XT (RADV 26.3.1, Wine, vkd3d-proton), the integer-view test preserved 65,536/65,536 patterns. The float control preserved 1/65,536. The table-span, fixed descriptor and format-load tests passed as well.

I still see a facial deformation in the opening diner dialogue on this integration. The seated character has visible skin and her mouth changes shape between lines, but the upper lip pulls up toward the nose, exposing teeth high above the lower lip. The same shape is visible in older captures carrying the earlier version of this change. In the same sequence the server can have a nearly black face while her forearms and shirt render. I can reproduce the mouth issue on a face with visible skin. The renderer logged host pipelines for both blendshape output and normal reconstruction. I haven't isolated the bad value to a specific dispatch.

RX 7900 XT integration tested

**@⁠UwUCammie** on GitHub · 2026-11-26 02:29 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7180848831) On an RX 7900 XT (RADV 26.3.1, Wine, vkd3d-proton), the integer-view test preserved 65,536/65,536 patterns. The float control preserved 1/65,536. The table-span, fixed descriptor and format-load tests passed as well. I still see a facial deformation in the opening diner dialogue on this integration. The seated character has visible skin and her mouth changes shape between lines, but the upper lip pulls up toward the nose, exposing teeth high above the lower lip. The same shape is visible in older captures carrying the earlier version of this change. In the same sequence the server can have a nearly black face while her forearms and shirt render. I can reproduce the mouth issue on a face with visible skin. The renderer logged host pipelines for both blendshape output and normal reconstruction. I haven't isolated the bad value to a specific dispatch. [RX 7900 XT integration tested](https://github.com/UwUCammie/victory-amd/tree/e3617c8)
Author
Owner

@⁠bordersky on GitHub · 2026-11-26 07:12 UTC · original

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** on GitHub · 2026-11-26 07:12 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7185216568) 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.
Author
Owner

@⁠slauko on GitHub · 2026-11-26 09:47 UTC · original

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.

**@⁠slauko** on GitHub · 2026-11-26 09:47 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7188481058) 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.
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-26 10:27 UTC · original

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

**@⁠tippythetaidum** on GitHub · 2026-11-26 10:27 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7189387365) @⁠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).
Author
Owner

@⁠Anzymanz on GitHub · 2026-11-26 12:26 UTC · original

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** on GitHub · 2026-11-26 12:26 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7192011982) 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.*
Author
Owner

@⁠Anzymanz on GitHub · 2026-11-26 13:07 UTC · original

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

**@⁠Anzymanz** on GitHub · 2026-11-26 13:07 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7192908499) @⁠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).*
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-26 14:36 UTC · original

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

**@⁠tippythetaidum** on GitHub · 2026-11-26 14:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/927#issuecomment-7195067318) 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).
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/descriptor.rs
  • crates/victory-gpu/src/draw.rs
  • crates/victory-shader/src/emit/lower.rs
  • crates/victory-shader/src/emit/valu_tests.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/927/head:github-bot/gh-927'
git switch 'github-bot/gh-927'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-927'
git switch 'github-bot/gh-927'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-927'
git switch 'github-bot/gh-927'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-927'
git switch 'main'
git merge --squash 'github-bot/gh-927'
git switch 'main'
git merge --ff-only 'github-bot/gh-927'
git switch 'main'
git merge 'github-bot/gh-927'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.