Skip to content

Fix NieR rendering and improve Mac and iPhone performance - #336

Closed
ThrecL wants to merge 2 commits into
seedds:mainfrom
ThrecL:codex/nier-iphone-followups
Closed

ThrecL wants to merge 2 commits into
seedds:mainfrom
ThrecL:codex/nier-iphone-followups

Conversation

@ThrecL

@ThrecL ThrecL commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR records the NieR:Automata 1.0.3 fixes and adds the remaining player-facing FPS and resolution controls. The current main base already contains the shared shader, geometry, texture-upload, HDR feedback, and GPU-timing work; this branch builds on that code and avoids duplicating it.

  • The 1.0.3 profile now enables both mapped-flush and CPU-dirty texture uploads, covering title textures written after initialization without an NVN flush.
  • I set the default frame-rate target to 60 FPS. The iOS launcher keeps the choice editable, with 30 FPS also available; the game's frame interval and NVN presentation timing follow that choice.
  • Dynamic Resolution is an editable toggle, off by default. When enabled, NieR's native controller can scale between 70% and 100% under load; it is independent of the FPS target and console mode.
  • I apply the configured guest QoS to the iOS main thread before rendering begins.

The shared fixes in main address the pink title/menu textures, missing geometry-driven models and effects, geometry capture/compaction costs, same-pass HDR feedback, and invalid GPU-time readings. I exercised the title and save flow, opening flight and ocean combat, City Ruins, and on-foot gameplay while profiling frame-time spikes and model rendering.

Mac — M4 Pro

I played from the opening through the end of the game and observed stable 60 FPS. Measured opening-flight and combat windows ranged from 59.79 to 60.03 FPS; the attached gameplay capture reads 60.00 FPS and 9.19 ms GPU time.

NieR:Automata gameplay on Mac M4 Pro; performance HUD reads 60.00 FPS and 9.19 ms GPU time

iPhone — 17 Pro Max

The 60 FPS target is available and I observed 60 FPS in some scenes. Heavier gameplay scenes vary; the attached capture reads 39.13 FPS (25.56 ms per frame), so it does not establish stable 60 FPS across the full game on iPhone.

NieR:Automata gameplay on iPhone 17 Pro Max; performance HUD reads 39.13 FPS and 25.56 ms per frame

Validation

  • NieR FPS/resolution harness: 14 combinations across Dynamic Resolution on/off/unset/invalid and 0/30/60 FPS, with old and unsupported-build guards; passed.
  • NVN pacing harness: 164 checks, including 30/60 FPS presentation without a frame-step state page; passed.
  • Launcher settings: 6 tests, including editable 60 FPS default and Dynamic Resolution off by default; passed.
  • Patch registry: 14 tests; documentation links: 4 checks; passed.
  • git diff --check passed for the added profile and iOS QoS changes.

@ThrecL
ThrecL force-pushed the codex/nier-iphone-followups branch from ad4957b to 107a862 Compare October 26, 2026 20:29
@ThrecL ThrecL changed the title Add editable NieR FPS and dynamic resolution controls Fix NieR FPS pacing and dynamic resolution controls Oct 26, 2026
@ThrecL
ThrecL marked this pull request as draft October 26, 2026 21:10
@ThrecL ThrecL changed the title Fix NieR FPS pacing and dynamic resolution controls Fix NieR rendering and improve Mac and iPhone performance Oct 27, 2026
@ThrecL

ThrecL commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Follow-up: full rendering/performance integration and retest

I’ve expanded this PR beyond the earlier FPS/resolution controls and rebuilt the NieR changes on latest upstream main to resolve the merge conflict. The full PR diff is preserved. A separate small workflow commit aligns lint CI with the Python version used by its saved baseline. GitHub reports the PR as mergeable; the updated head is 89ee0df.

Mac — M4 Pro

I retested after integrating the changes, and the game still runs at stable 60 FPS from start to finish on my M4 Pro. The 2B/Adam screenshot below is a new example: its HUD reads 60.00 FPS, 8.48 ms GPU time, and 16.67 ms frame interval on macOS 27.0. My full-game result comes from playing the game; this screenshot shows one scene.

M4 Pro: 2B facing Adam, 60.00 FPS

iPhone — 17 Pro Max

I also retested on my iPhone 17 Pro Max. Performance is noticeably better after integration, but it is not a constant 60 FPS through the whole game. Some areas reach 60 FPS; heavier scenes still vary. The new 2B/9S Bunker screenshot reads 59.99 FPS, 11.23 ms GPU time, and 16.67 ms frame interval on iOS 27.0. It shows that area running near 60 FPS, not full-game stability at that rate.

iPhone 17 Pro Max: 2B and 9S in the Bunker, 59.99 FPS

What is now included

  • Geometry preparation and batching: compatible geometry draws share capture/compute work, including safe query boundaries. An exact-byte index cache avoids rebuilding unchanged primitive maps. Buffer-write hazards, sparse aliases, events, and dependent draws retain ordering.
  • Geometry shader cost and correctness: fused compaction for small outputs, ordered block scans for large outputs, fewer redundant capture writes, and safe depth-only attachment omission. Upstream’s full 32-attribute passthrough support, output bounds, large-draw splitting, and overflow guards remain intact; the older local 16-attribute workaround is excluded.
  • Texture rendering: CPU-dirty uploads cover textures rewritten without a mapped flush, alongside upstream’s initial CPU-uncached fill and HDR feedback fixes. The added tests cover the initial texture contents behind the pink/missing face and hair issue.
  • Upload overhead: eligible small RGBA16F array/cube-array textures use direct GPU uploads through integer views to preserve their stored bits. Staging slots reuse demand-sized primary/overflow buffers while keeping upstream’s batch budget and completion retirement. The retained staging cache is bounded to 192 MiB, versus upstream’s previous 96 MiB maximum; this is an explicit memory/allocation tradeoff.
  • Frame-time spikes: safe geometry-boundary submission, independent unwritten-attachment store proofs, and 841 additional unique warmup records (1,172 total) reduce repeated preparation and pipeline work. Broad attachment lookahead/pass merging is not enabled by this update.
  • iPhone controls and scheduling: the configured guest-main QoS is applied. Frame rate defaults to 60 FPS, with editable 30/60 choices; presentation honors the selected cap. Dynamic resolution defaults off and can enable the verified native 70–100% scale range independently of console mode and FPS. Console mode, FPS counter, and performance HUD remain editable. Opt-in player builds filter saved diagnostic overrides without locking these settings.
  • Upstream compatibility: the generalized PlatinumGames shader reader, current image-atomic handling, newer hazard proofs, and other upstream fixes are retained. Translator binaries, source hashes, lock entries, and chain header are synchronized on 361815d71cc8. The game note documents the mechanisms and both platform results.

Validation and limits

  • The full native graphics suite passed on the tested integration, including 1,920 geometry checks, 26,384 direct-upload checks in both normal and dropped-upload runs, bounded staging/retirement, feedback, dependency, and pacing fixtures.
  • After merging current upstream, the full host suite passed, including the updated audio/haptics tests; 336 Python tooling tests passed (16 skipped), and 28 iOS tests passed on the earlier integration. After rebasing onto current main, all 31 iOS tests passed. The renderer and texture-upload implementation is unchanged from the gameplay-tested integration.
  • The pinned ruff/pyright check passes under Python 3.12, matching the saved baseline: 407 findings, all in the baseline, zero new. The lint workflow now uses Python 3.12, which satisfies the project’s minimum and avoids the unrelated Python 3.14 baseline mismatch. The import assertion also fixes three errors in the upstream space-estimate test.
  • All 1,225 shaders build for Mac and iPhone. The Release IPA passed CRC verification for all 3,552 archive entries.
  • The regression harness against 78cb26d reports the following. The MSL/variant changes are expected from the capture/translator work; there are no new shader failures or reflection changes.
Local game Result Shaders, baseline → candidate New failures Changed MSL Changed variants New / known interface warnings
NieR 1.0.3 CHANGED 1,225/1,225 → 1,225/1,225 0 455 135 0 / 0

Only NieR has a usable local Mac build for the harness. It has no scripted smoke route, so this harness result covers shader/interface checks rather than a new controlled gameplay benchmark. Other games using the shared renderer still need validation.

The local builds use Xcode 27.0 with the explicit compiler override. Upstream’s Xcode 27.1 Metal pin remains unchanged; validation with that pinned compiler is still outstanding. HUD output sizes in the screenshots are presentation sizes, not measurements of internal rendering resolution.

@ThrecL
ThrecL force-pushed the codex/nier-iphone-followups branch 2 times, most recently from 9fdb235 to bf3c928 Compare October 27, 2026 08:42
@ThrecL
ThrecL force-pushed the codex/nier-iphone-followups branch from bf3c928 to 89ee0df Compare October 27, 2026 08:53
@ThrecL
ThrecL marked this pull request as ready for review October 27, 2026 09:00
seedds added a commit that referenced this pull request Oct 28, 2026
Reconcile the current #336 geometry, upload and resolution work with #416's
lean passthrough and mesh paths on main. Preserve buffer dependencies,
query ordering, target selection and chain/cache validation.

Keep mesh primitive IDs draw-wide and rebase only local capture reads.
Snapshot recursive split descriptors before child draws reuse the shared
geometry job, fixing the Octopath first-attack index-range corruption.
Retain emitted-vertex feedback, pause/resume ordering and raster discard
through the new jobs without recapturing the synthetic raster reader.

Co-authored-by: JioChoi <[email protected]>
Co-authored-by: ThrecL <[email protected]>
@seedds

seedds commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Thank you for the NieR rendering and performance work, the detailed Mac and iPhone testing, and the follow-up integration.

The work from this PR and #416 has now been reconciled into main in 2c31212f, with both contributors credited. The integration includes the geometry and upload improvements and the editable frame-rate and dynamic-resolution controls. The game note records the original gameplay reports, current integration checks and remaining validation limits.

I'm closing this PR because its work has been absorbed into main. Thank you for the substantial contribution and for documenting the results so carefully.

@seedds seedds closed this Oct 28, 2026
Know-It-All-Brother pushed a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
Reconcile the current seedds#336 geometry, upload and resolution work with seedds#416's
lean passthrough and mesh paths on main. Preserve buffer dependencies,
query ordering, target selection and chain/cache validation.

Keep mesh primitive IDs draw-wide and rebase only local capture reads.
Snapshot recursive split descriptors before child draws reuse the shared
geometry job, fixing the Octopath first-attack index-range corruption.
Retain emitted-vertex feedback, pause/resume ordering and raster discard
through the new jobs without recapturing the synthetic raster reader.

Co-authored-by: JioChoi <[email protected]>
Co-authored-by: ThrecL <[email protected]>
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