Skip to content

Fix glowing foliage stems and branches (register marker collisions) - #759

Merged
NotRexed merged 1 commit into
NotRexed:mainfrom
pelicanux:fix/native-register-marker-collisions
Nov 9, 2026
Merged

NotRexed merged 1 commit into
NotRexed:mainfrom
pelicanux:fix/native-register-marker-collisions

Conversation

@pelicanux

@pelicanux pelicanux commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Fix bright red/green stems in nearby foliage by keeping register-renaming markers separate from every original operand.

Marker allocation checks native_high while it is still being populated. A marker chosen for an early field can therefore alias a later source. Ordinary GPRs below reserved_base can collide as well. The fix surveys the original operand spans first, then excludes them from marker allocation, preserving the existing pair/quad handling.

The regression generates synthetic FFMA instructions and checks the effective destination and all three sources after REGMAP decoding. It covers both reserved-bank configurations, later sources and repeated destination/addend operands. The existing CI runner discovers it automatically; no workflow changes are needed.

Validation:

  • Regression: 11 failures before the fix, 0 failures across 89 cases afterward; passes with Clang and GCC.
  • Full Linux game-free suite: 104 passed, 4 skipped (checks requiring the game or a GPU).
  • Local in-game A/B on a build based on 71e59e3, with the same earlier fixes on both sides: Kokiri stems retain natural colors and leaves remain visible. Tested on RX 9070, RADV/Mesa 26.2.6, with frame generation disabled; a further run without overlay or diagnostic instrumentation confirmed the result.
  • Generated mesh SPIR-V passed Vulkan 1.3 validation with uniform-buffer-standard-layout.

Addresses the glowing-branch symptom in #667. Only the lowering fix, its synthetic regression and the test-runner entry are included.

Survey the instruction's original operand spans before allocating renaming markers. Incremental native_high tracking allowed an early destination marker to alias a later source, corrupting mesh lighting calculations.

Add a game-free FFMA regression that checks effective registers with and without the uniform bank, and run it in source CI.

Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <noreply@openai.com>
@pelicanux
pelicanux force-pushed the fix/native-register-marker-collisions branch from 4d68af0 to add0937 Compare November 8, 2026 20:31
@pelicanux pelicanux changed the title Preserve native operands when allocating register markers Fix glowing foliage stems and branches (register marker collisions) Nov 9, 2026
@NotRexed
NotRexed merged commit deaf4ff into NotRexed:main Nov 9, 2026
NotRexed pushed a commit that referenced this pull request Nov 9, 2026
… off the low GPRs an instruction names

With #922's version tests/test_lower_register_markers.py failed 9 of 89 cases (a marker took 504 for r216 below the
reserved bank); #759's passes those and #922's own gpu/vk/tests/regmap_marker_test.cpp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rakefire-impala pushed a commit to rakefire-impala/Hookshot-w-Mesh-Shader-Fallback that referenced this pull request Nov 9, 2026
…nd (bright red/green foliage stems)

(cherry picked from commit deaf4ff)
rakefire-impala added a commit to rakefire-impala/Hookshot-w-Mesh-Shader-Fallback that referenced this pull request Nov 9, 2026
…e new switch lines

Item 11 now has the cause. The "stem" culprits were depth passes; the stems'
colour pass computed its light-probe lighting wrong because of a translator
bug on every GPU (upstream NotRexed#757, NotRexed#874, NotRexed#986), which upstream PR NotRexed#759 fixed.
Positions and triangles read back in one frame were bit-identical. Also
notes the hearts glitch as upstream NotRexed#993 and documents "read" and "info".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rakefire-impala added a commit to rakefire-impala/Hookshot-w-Mesh-Shader-Fallback that referenced this pull request Nov 9, 2026
Black hearts, the minimap glitch and the slow unpause on 4 GB cards: the
cause and the fix, needing more testing. Known limits now say NotRexed#759 is
cherry-picked onto a branch 170 commits behind upstream main (with
upstream's open AMD stripes report), and that stutters are not diagnosed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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