Preserve facial-network half data through unsigned typed buffer views #857

Closed
t90 wants to merge 1 commit from upstream-pr/857 into main
t90 commented 2026-11-28 07:51:39 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by t90 on 2026-11-28T07:51:39Z.


Facial-network shaders can move encoded 16-bit values through typed buffer loads. Host floating-point views interpret those values numerically instead of preserving the original half bits, which can corrupt the data used by facial rendering.

This adapts @TaynanGT's typed-half approach from Vice-Tay commits 78e424c47c8d7fc466886f72d1e7204a7fc7e8c6 and fa92ed75b7a4d47468fb9b3f625dce999a994d0a:

  • Classify loads whose consumers read encoded halves, keeping mixed/whole-value users on their existing path.
  • Substitute unsigned 16-bit buffer descriptor twins only for those specializations. Texture descriptors are unchanged, and residency uses the original resource.
  • Carry half-view metadata through shader translation, table-cache keys, descriptor allocation, and the shader cache. Bump cache encoding to VSH2.
  • Preserve NVIDIA's ordinary runtime-format handling and report unsupported inexact half-view cases instead of treating every typed buffer as raw data.

Original commits:
github.com/TaynanGT/Vice-Tay@78e424c47c
github.com/TaynanGT/Vice-Tay@fa92ed75b7

Validation:

  • @t90 confirms head-texture flickering is fixed in the combined RTX 5070 / Series S build. That run also used VICTORY_THIN and VICTORY_JOIN_PARTS unset, with VICTORY_ASYNC_SUBMIT=1; it was not an isolated comparison of this commit alone. This PR does not change launcher defaults.
  • Regression coverage includes all 65,536 raw 16-bit patterns through an integer GPU view, FLOAT/SINT/UINT origins, signed zero, subnormals, NaN payloads, dynamic table offsets, ordinary typed loads, and cache metadata round trips.
  • Isolated branch:75 focused tests passed (23 shader tests, 50 descriptor-host tests, 2 cache tests). Asset policy:295 files passed. Some unrelated Wave64 hardware branches can skip when unsupported; the integer-view bit-preservation checks execute on the host GPU.

Both workspace Clippy configurations pass with command-line allowances for the three lint classes already failing in unchanged upstream code: manual_is_multiple_of, let_and_return, and some_filter. No allowances are added to source or CI. Strict upstream CI can still report those existing failures. The full workspace GPU/VALU test suite is not run locally; focused coverage is used here.

This PR is independent of the lighting and CPU-preparation PRs. No game files, shader dumps, captures, or machine-specific paths are included.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5538061034 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/857). Originally posted by [t90](https://github.com/t90) on 2026-11-28T07:51:39Z. --- Facial-network shaders can move encoded 16-bit values through typed buffer loads. Host floating-point views interpret those values numerically instead of preserving the original half bits, which can corrupt the data used by facial rendering. This adapts @TaynanGT's typed-half approach from Vice-Tay commits 78e424c47c8d7fc466886f72d1e7204a7fc7e8c6 and fa92ed75b7a4d47468fb9b3f625dce999a994d0a: - Classify loads whose consumers read encoded halves, keeping mixed/whole-value users on their existing path. - Substitute unsigned 16-bit buffer descriptor twins only for those specializations. Texture descriptors are unchanged, and residency uses the original resource. - Carry half-view metadata through shader translation, table-cache keys, descriptor allocation, and the shader cache. Bump cache encoding to VSH2. - Preserve NVIDIA's ordinary runtime-format handling and report unsupported inexact half-view cases instead of treating every typed buffer as raw data. Original commits: https://github.com/TaynanGT/Vice-Tay/commit/78e424c47c8d7fc466886f72d1e7204a7fc7e8c6 https://github.com/TaynanGT/Vice-Tay/commit/fa92ed75b7a4d47468fb9b3f625dce999a994d0a Validation: - @t90 confirms head-texture flickering is fixed in the combined RTX 5070 / Series S build. That run also used VICTORY_THIN and VICTORY_JOIN_PARTS unset, with VICTORY_ASYNC_SUBMIT=1; it was not an isolated comparison of this commit alone. This PR does not change launcher defaults. - Regression coverage includes all 65,536 raw 16-bit patterns through an integer GPU view, FLOAT/SINT/UINT origins, signed zero, subnormals, NaN payloads, dynamic table offsets, ordinary typed loads, and cache metadata round trips. - Isolated branch:75 focused tests passed (23 shader tests, 50 descriptor-host tests, 2 cache tests). Asset policy:295 files passed. Some unrelated Wave64 hardware branches can skip when unsupported; the integer-view bit-preservation checks execute on the host GPU. Both workspace Clippy configurations pass with command-line allowances for the three lint classes already failing in unchanged upstream code: manual_is_multiple_of, let_and_return, and some_filter. No allowances are added to source or CI. Strict upstream CI can still report those existing failures. The full workspace GPU/VALU test suite is not run locally; focused coverage is used here. This PR is independent of the lighting and CPU-preparation PRs. No game files, shader dumps, captures, or machine-specific paths are included.
TaynanGT commented 2026-11-29 11:25:42 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by TaynanGT on 2026-11-29T11:25:42Z.


Thanks for preserving the original commit references and adapting the typed-half path without changing ordinary texture descriptors. The exhaustive raw half-bit coverage is particularly useful. I appreciate the clear distinction between the combined RTX 5070 result and isolated validation.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7255104866 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/857#issuecomment-7255104866). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-29T11:25:42Z. --- Thanks for preserving the original commit references and adapting the typed-half path without changing ordinary texture descriptors. The exhaustive raw half-bit coverage is particularly useful. I appreciate the clear distinction between the combined RTX 5070 result and isolated validation.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!857
No description provided.