Lavender/flower plants draw white with a cyan tint instead of purple (NVIDIA) #674
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#674
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Builder version
v2.0.0 (source
5a5c7e6, with PR #477 merged locally). Also seen on the first-day build (cdb4f1a, no local changes).How you built
From source:
python -I nx2/make_game.py --nup ...with the v2.0.0 HookshotBuilder tools (llvm-mingw,RX_CPM,WGPU_NATIVEset).Game files given to it
A .nup (build
e0f3ccfa)The error
Lavender / flower plants draw white with a cyan tint instead of purple. The leaves keep their shape but have no colour, as if the texture is not bound. Screenshots (broken / expected) will be added to this issue.
From
hookshot_log.txt(v2.0.0 run):0 skippeddraws, no draws left out once the cache is warm.prepared 31985 shader programs (39835 new, 7 failed, ...): 7 stage-5 programs do not lower,unsupported native opcode (native op 0x3a9, ...)(an ATOMG.CAS-like form). The plants were already white on the first-day build with0 failed, so these are probably unrelated.Settings: Ultra preset, frame generation off, resolution 100%, Lanczos, sharpness 40,
RX_VK_SYNC_PIPELINES=1.Operating system and free space on the output drive
Windows 11 (26300), RTX 4080 SUPER 16 GB, 2560x1440 at 359 Hz. About 700 GB free.
Confirmations
Hi! I investigated this issue on Hookshot 2.0.5 and found a register-mapping collision in the Ampere-to-Maxwell shader lowering.
In
LowerToMaxwellWith, marker registers are allocated while scanning native operands sequentially. A marker chosen for an earlier destination can overlap a native source register encountered later, causing distinct values to share a register mapping.The attached patch reserves all native operand register ranges before allocating markers. It fixes the white/cyan flowers on my NVIDIA RTX 5070 Ti Laptop GPU without changing textures or overriding their colors.
Validation:
An enemy with a similar visual issue also appears fixed during further play, although that observation needs separate confirmation.
The attachment includes the source patch, synthetic regression test, documentation, and a before/after screenshot. It contains no game binaries/assets, shader caches, save files, logs, or local installation metadata.
Could you review the approach? This is a local fix and broader testing would be helpful.
Hookshot-register-fix.zip
Fixed in v2.0.6 (and in v2.0.7) by PR #922: a register renaming collision in the Ampere-to-Maxwell lowering left the flowers' colour undefined (the same cause @Mitchdl93 found, thanks for the analysis). Translated shaders are rebuilt on the next start after the update. If the flowers are still white on v2.0.7, comment with a screenshot and log and we'll reopen.