Skip to content

Merge VIctory #592: second rows of packed 16-bit pixel inputs - #3

Merged
pablogonz12 merged 3 commits into
mainfrom
pr/592
Nov 24, 2026
Merged

pablogonz12 merged 3 commits into
mainfrom
pr/592

Conversation

@pablogonz12

@pablogonz12 pablogonz12 commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Upstream PR: Marvisak/VIctory#592 (author's commits kept by merge).
Measured on RX 9070 XT / RADV:

  • Full shader archive (victory translate): vertex+pixel emitted 13144 -> 13271 of 14234 (+127); compute and mesh unchanged.
  • 'a packed input half no element holds': 166 -> 0.
  • World set 684/751 unchanged; all translations valid SPIR-V (dxil-spirv master + spirv-val).
  • victory-shader lib tests: no new failures.
    INTEGRATION.md row follows in the merge commit.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected interpolation for packed 16-bit pixel inputs when partner rows are omitted, including cases where other inputs have explicitly assigned partners. Inferred pairings now use available rows consistently, while explicit partner assignments and unpacked inputs retain their existing behavior. This helps ensure pixel values are interpolated using the intended row pairings.

SAitken91 and others added 2 commits November 24, 2026 02:42
Pixel inputs packing two 16-bit rows per dword (pack2) whose metadata
leaves the second row out (row2 = row) had no second row, so reading
its halves failed: "a packed input half no element holds". The second
row is now found as the output side finds it (half_outputs): the next
16-bit row of the input signature that no input entry names, taken in
row order, after the rows the metadata does give.

translate --validate on shaders.rpf: vertex/pixel 12172 -> 12289
validated; 6 programs whose metadata names a second row still stop
there.

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

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Pixel input partner resolution

Layer / File(s) Summary
Infer and use partner rows
crates/victory-shader/src/emit/lower.rs
The helper assigns eligible unnamed half rows to packed inputs with omitted partners. Pixel interpolation uses the inferred mapping when row2 equals the input row. The test checks two inferred partners and one explicit partner.

Suggested reviewers: r4tedx, claude

Change: Bug fix

Merge Risk: Minimal · up to b461e

This change fills in missing second rows for packed 16-bit pixel inputs, so shaders that previously failed translation can now translate. No concrete merge-blocking risk was identified in the reviewed code.

Security architecture risk: Minimal · up to b461e

The translator can now recover a missing pixel-input row from the shader’s own signature. Explicit rows still take precedence, and the inferred row goes through the existing input checks. The change does not establish a new security or failure-containment risk.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The added reachability is confined to selecting a declared input row for the shader being translated. The changed branch does not introduce a new data source, resource binding, or privileged operation.

Trust Boundaries and Controls

  • observed — Caller-supplied bytes enter through the existing container parser. Explicit and inferred partners share the same signature extent checks and row/channel lookup. The lookup derives an element index by enumerating the signature rather than indexing it with the metadata row number.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9a46a669-d883-41d1-b2ec-0ae507d2a8cc
Commits

Reviewing files that changed from the base of the PR and between e9fc355 and b461e3c.

Files selected for processing: 1

  • crates/victory-shader/src/emit/lower.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@pablogonz12
pablogonz12 merged commit 858e220 into main Nov 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants