Repository navigation
Trails in the Sky 1st Chapter: current-main integration and GPU memory fix - #1002
jonareyess wants to merge 2 commits into
Conversation
Both findings already fail on upstream main at 65501fb, in the same unchanged test and on the same lines as PR seedds#1002. The PR did not introduce them: the original PR diff does not modify t_geometry_hazards.m. Main CI evidence: https://github.com/seedds/nxnative/actions/runs/41481560591 Original PR CI failure: https://github.com/seedds/nxnative/actions/runs/41527614521 Check the readback buffer allocation before passing it to Metal. Document the retain-count false positive with a targeted NOLINTNEXTLINE: serial_put stores the CFBridgingRetain-owned object in g_by_serial's C hash table. Keep the lint baseline unchanged. Validation: LLVM 23.1.4 full clang-tidy scan, 218 sources, 271 findings matching the baseline, zero file/check pairs above or below it. The Metal geometry hazards test passes 57 checks in each of its three configurations.
|
A note for this PR: main now handles integer colour outputs per pipeline, which overlaps with this PR's "mixed integer/float fragment alternatives selected from the actual attachments". Trails in the Sky 2nd Chapter (same engine, now on main in 6cb67b8) hit the same red line: a G-buffer with a float target at colour 0 and integer targets at colours 1 to 3, where the integer entry point chosen from the shader's code left out an output that goes to an integer target. Every rule that told integer outputs apart from the shader's code just moved the red line to the next shader. c398ff3 ( Reference: Integer outputs told by the pipeline's targets. Checked on the 2nd Chapter (no If this PR is rebased onto main, its integer-output alternatives can most likely be dropped in favour of main's. The menu eyes and bestiary lighting would then be worth rechecking on the 1st Chapter. I haven't run the 1st Chapter on main myself. |
An indirect index address has no CPU-known extent. Guessing 64 MB made 80-100 MB views for successive 16 MB strides, accumulating 4.2 GB of shared buffers over Trails' 1.5 GB pool, and did not cover legal reads beyond the guess. Use one full-pool view for unbounded lookups and reject short cached views. Keep bounded chunking and existing views for previously encoded addresses. The regression fixture checks shared views and a GPU access 96 MB beyond the starting address; the pre-fix renderer fails 20 checks.
Add the 1.0.4/1.0.7 build metadata, shader tables and prewarm list. Preserve main's integer-output specialization and image-view fitting instead of the older alternatives from this PR. Keep the required private-scratch lowering, fixed compute group descriptors and GLSLC code-offset correction, with their tests and shared references. Record the current-main memory regression, the older-app comparison and the corrected host's short load check; long combat validation remains open.
01be0ec to
0a7d664
Compare
|
Updated on current main, keeping its pipeline-selected integer outputs and removing our older alternatives. I rechecked the menu eyes and bestiary lighting on M1, and both render correctly. The PR now contains two focused commits, with validation details in the description. |

Adds the Mac profile for Trails in the Sky 1st Chapter (
01002C9022770000, update 1.0.7) on current main. Uses main's pipeline-selected integer outputs and image-view fitting, with the remaining fixes for invocation-private compute scratch, reflected compute group sizes (runtime and offline archive), and GLSLC compute-code offsets.Fixes excessive GPU allocation from unbounded buffer lookups. Indirect indexed draws created overlapping 80–100 MB views over a 1,507 MB pool, reaching 4,243 MB of shared buffers and GPU out-of-memory errors on M1. Unbounded lookups now share one whole-pool view; short cached views cannot satisfy them. Known-size accesses retain chunking, and existing views remain valid for encoded GPU addresses.
Validation:
b06f4e0epreserves 6,602/6,602 shaders with no new failures. Two expected MSL changes come from private-scratch lowering.DM_RT_FRAME=0. The log confirms the switch and a normal exit without GPU errors. These were manually repeated sessions of different durations; this is a diagnostic result, not an established scheduling fix. No default or profile setting is changed.Longer-session stability, renewed reflection checks, and the cause of the scheduling-related performance difference remain open. iOS is untested. The game note and shared references record the causes and supporting evidence.