Repository navigation
GPU: interpolate normalized rectangle vertex attributes - #1453
Merged
Marvisak merged 1 commit intoNov 25, 2026
Merged
Conversation
Handle scalar and two-channel UNORM inputs and signed normalized inputs.
|
For reference: #1311 added the same normalized/SNORM entries to Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current
I didn't test with game data. Tested locally with an AI-assisted script (Claude Code); I checked the results before posting. |
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
mercuryVM
added a commit
to mercuryVM/VIctory
that referenced
this pull request
Nov 24, 2026
…e vertex attributes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mercuryVM
approved these changes
Nov 24, 2026
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 6f36cdf on Windows 11, RTX 5070, MSVC: builds, cargo test --workspace --no-fail-fast 644 passed, 0 failed (on our fork main), clippy -D warnings clean with and without --all-features. normalized_attributes_are_interpolated_in_their_own_range passes.
- The format numbers are the right DXGI formats: 56 R16_UNORM, 49 R8G8_UNORM, 61 R8_UNORM, 13/37/58 R16G16B16A16/R16G16/R16_SNORM, and 31/51/63 R8G8B8A8/R8G8/R8_SNORM.
- The SNORM decode clamps the most negative code (-128, -32768) to -1.0, as the D3D conversion rules require. The encode clamps to [-1, 1] and rounds.
- The test's fourth corner (v0 + v2 - v1) checks the interpolation and both clamps, positive (UNORM8 at 255) and negative (SNORM at the minimum).
Merged into our fork's main.
AI-assisted (Claude Code).
mercuryVM
added a commit
to mercuryVM/VIctory
that referenced
this pull request
Nov 25, 2026
…e upstream resync Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # crates/victory-gpu/src/host.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The rectangle-list expansion leaves attributes in several ordinary normalized vertex formats at the first vertex’s value. Add the remaining one- and two-component UNORM8 forms, scalar UNORM16, and the one-, two-, and four-component SNORM8/SNORM16 forms so they use the existing fourth-corner interpolation. Clamp the signed minimum on decode and clamp the interpolated result to the representable range before encoding.
Reproduction and testing
The new
normalized_attributes_are_interpolated_in_their_own_rangetest expands one synthetic rectangle. Onffe310eit finds the first vertex’s bytes at the fourth vertex. With the patch, it verifies the interpolated attributes and positive and negative clamping. All fiveprimitive.rstests passed on Windows with the pinned Rust toolchain.Reference: DXGI format definitions. AI-assisted with Codex.