Repository navigation
Fix Mario Kart World lighting - #871
Merged
snowstormxd merged 3 commits intoNov 14, 2026
Merged
snowstormxd merged 3 commits into
snowstormxd merged 3 commits into
Conversation
NVN graphics storage slots contain an address and a size. Honor valid declared sizes so Mario Kart World's light-probe buffer is not truncated to 8 MiB. Keep the existing limits for bare native pointers and pointer tables, including device-dependent read-only ranges and binding reuse. Add checks for descriptor slots, declared sizes and fallback limits. Assisted-by: OpenAI Codex (porting and validation)
Keep atlas sizes and layer offsets in 64 bits so lightmap layers beyond 4 GiB remain addressable. Support BC6H array tiles and per-layer mip tails on devices with the required sparse-residency features. Upload only mapped or dirty rectangles, stage one layer at a time, and combine each rectangle's GOB rows into one copy. Handle compressed block dimensions correctly and retain the existing fallback and memory-budget policy. Add regression tests for large atlas offsets, layer boundaries and partial uploads compared with full uploads. Assisted-by: OpenAI Codex (porting and validation)
Remove redundant local Entry aliases that Clang rejects as shadowing. Undefine the Windows SDK LoadString macro in the preset tests so it does not rename Settings methods and cause linker errors. Assisted-by: OpenAI Codex (build compatibility and validation)
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
1 task done
snowstormxd
merged commit Nov 14, 2026
65f5650
into
Eglantine-Community:nx2-experimental
1 check passed
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.
Mario Kart World can lose ambient and indirect lighting when its light-probe buffer is truncated to 8 MiB or its large HDR lightmap array is addressed with 32-bit sizes and offsets.
This PR honors valid NVN graphics buffer descriptor sizes and keeps atlas sizes and layer offsets in 64 bits. BC6H lightmap arrays use sparse tiles and per-layer mip tails on supported devices, with the existing layer-based fallback retained. Uploads cover mapped or dirty rectangles, stage one layer at a time, and combine each rectangle's GOB rows into one copy.
The current storage-binding caches, device-limited pointer-table ranges, grass residency handling, driver checks and memory-budget policy are preserved. There are no shader-lowering changes. Two small Windows test-build fixes are isolated in the final commit.
Type of change
Validation
yuzuandtestssucceeded with Clang 23.1.5, PGO and ThinLTO.git diff --checkpassed. No game data, keys, firmware or captures are included.The earlier reference fixes were reported to resolve the lighting issues. The newly ported Windows build has not yet been tested in game, and sustained FPS or frame pacing has not been measured. Linux, macOS and other GPU vendors have not been tested locally.
Commits
AI disclosure
OpenAI Codex ported the fixes, added regression tests, performed local build and test validation, and drafted the commit messages and this description at the author's request. The author explicitly requested that this PR be opened ready for review.