Repository navigation
fix(shaders): R2UR's source is one register, not a pair (a vertex program refused) - #1806
Merged
hckrman101 merged 1 commit intoNov 10, 2026
Merged
Conversation
Contributor
Author
|
Thanks, you're right about R236: it's 4-aligned, so main took it for the quad R236-R239 and refused it too. The test now calls it a second case this fixes, and checks that |
Joey-Magnus
force-pushed
the
fix/lower-r2ur-one-register
branch
from
November 10, 2026 17:48
00174b0 to
a58afce
Compare
One of OoT's vertex programs was refused as "native program uses lowering scratch registers" at R2UR UR6, R238: with no span known for R2UR's source, its alignment made it the pair R238-R239, and R239 is the lowering's own scratch, used by R2UR's eight words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Joey-Magnus
force-pushed
the
fix/lower-r2ur-one-register
branch
from
November 10, 2026 18:00
a58afce to
597edcb
Compare
Joey-Magnus
pushed a commit
to Joey-Magnus/Hookshot
that referenced
this pull request
Nov 10, 2026
…ed#1778 NotRexed#1789 NotRexed#1800 NotRexed#1806 NotRexed#1810 merged): to Fixed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
One of OoT's vertex programs (
65dd5ce0adbe3b64) fails to translate ("native program uses lowering scratch registers") at an R2UR that reads R238. Nothing in it uses a scratch register: the lowering assumes R2UR's source may be a register pair.Cause.
R2UR UR6, R238(ee0673c2 00000000 000e0000 000e2200). With the uniform bank in use, R238 is a high GPR.FieldSpanhas no entry for R2UR, so the source's span came from its alignment: an even register, R4n+2, is taken as a pair, R238-R239. R239 is the lowering's own scratch, and R2UR lowers to eight words that use it, so that's a conflict. R2UR reads one 32-bit register.Change (
lower_to_maxwell.h,FieldSpan): R2UR's source spans one register, as MUFU's and CS2R's entries do for theirs.Tests
tests/test_lower_r2ur_one_register.py:R2UR UR6, R238is refused onmainand lowers here;R236lowers either way.run_all.py: all pass exceptnx2/test_nup_stand_in.py, red onmain(fixed by test(nup): the stand-in test's stub takes the progress #1764 passes (main is red) #1790).🤖 Generated with Claude Code