GPU: interpolate normalized rectangle vertex attributes #1452
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1453"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by Luizbc2 on 2026-11-24T18:06:30Z.
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.
Imported from Marvisak/VIctory. Originally posted by acetonahard-code on 2026-11-24T20:59:50Z.
For reference: #1311 added the same normalized/SNORM entries to
components, and its author closed it today, so this looks like the one to keep.Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current
main(ffe310e):cargo test -p victory-gpumainmain+ this PRmain,--all-featuresmain+ this PR,--all-featurescargo clippy --all-targets -- -D warnings, with and without--all-features: clean.I didn't test with game data.
Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T22:49:49Z.
Review: APPROVED
Tested
6f36cdfon Windows 11, RTX 5070, MSVC: builds,cargo test --workspace --no-fail-fast644 passed, 0 failed (on our fork main), clippy-D warningsclean with and without--all-features.normalized_attributes_are_interpolated_in_their_own_rangepasses.Merged into our fork's main.
AI-assisted (Claude Code).