Repository navigation
Conversation
|
Second device, and it tightens the case for 1.35 rather than weakening it. iPhone 17 Pro Max, Breath of the Wild 1.9.0, docked:
So the M4 iPad survives 1.40 with 2.2 MB to spare and the iPhone does not survive it at all. The pool is the game's, not the device's, but what fits inside it is not identical across devices: the window the game composites into differs, and anything the host places in the same pool differs with it. 1.40 was never 2.2 MB of headroom, it was 2.2 MB on the most forgiving device we have. That is the argument for the key rather than against it. A single number in the host would have to be the minimum across every device anyone runs, found by someone's game dying. A profile key with a measurement behind it can be the honest one, and 1.35 is now the last value verified on both devices rather than the last value verified on one. No change to the diff; the profile comment will name both devices. |
e29ee72 to
22b116f
Compare
|
Rebased on current main (the |
5ee9826 to
5fc263b
Compare
The clamp in the loader was 0.5 to 1.0 for every game, so a build whose rewriter table has RENDER_SCALE could never render above the size the game picks itself, even where it holds. Above its own resolution a game renders into render target pools it sized for that resolution, which the host cannot size from outside, so a scene eventually needs more than a pool holds and the game takes a null allocation back. How far that goes is per game and only measurement finds it, so the limit belongs in the profile rather than in the host. render_scale_max, 1.0 by default, is the highest DM_RENDER_SCALE the game survives. The loader refuses anything above it and names the key in the message, and the iOS launcher's slider stops there, because a slider that can crash a game is not a setting. A range in settings.tsv may now take a bound from a DM_GAME_<NAME> macro, which is how the slider learns the ceiling. Breath of the Wild 1.9.0 is 1.35, measured rather than guessed. gsys sub-allocates every render target from one 115 MB render buffer pool it sizes at start. With seedds#303's DM_NVN_POOLPEAK on an iPad Pro 13" M4, docked, open world with the inventory and map opened: render scale 1.40 112.8 MB of 115.0 MB used (98.1%), plays render scale 1.45 SIGSEGV at main+0xed7128 address 0x20 while the field loads: gsys::RenderBufferContext takes a null back 1.40 is 2.2 MB from full, so the ceiling is the step below it. No behaviour changes for any game that does not set the key: the default of 1.0 gives the clamp and the slider exactly the range they had.
5fc263b to
d1bd679
Compare
|
Closing: main has a per-game ceiling by another route since b84ee29 (a render-scale stub states its largest scale, What main still lacks from here: a fractional ceiling (it is a whole number), and Breath of the Wild above 100 % (its stub states 1; the measurements above put its pool's limit between 1.40 and 1.45 on an iPad Pro M4 and an iPhone 17 Pro Max). If that is wanted I'll send it as a small PR on the stub's mechanism. |
This is point 3 of @v0lumehi's review on #316, done the way he suggested, now that there is a measured number behind it.
The problem
The loader clamps
DM_RENDER_SCALEto 0.5–1.0 for every game, so a build whose rewriter table hasRENDER_SCALEcan never render above the size the game picks itself, even where that holds. My earlier attempt simply raised the clamp to 2.0 with a warning, which was wrong: a slider that can crash a game is not a setting.The fix
render_scale_max, a profile key,1.0by default. The loader refuses anything above it and names the key in the message; the iOS launcher's slider stops there. Arangeinsettings.tsvmay now take a bound from aDM_GAME_<NAME>macro, which is how the slider learns the ceiling.Nothing changes for any game that does not set the key. The default gives the clamp and the slider exactly the range they have today.
Why the limit is per game
Above its own resolution a game renders into render target pools it sized for that resolution. The host cannot size those from outside, so a scene eventually needs more than a pool holds and the game takes a null allocation back. That point is a property of the game, not of the device.
Breath of the Wild 1.9.0 is 1.35, measured
gsys sub-allocates every render target from one 115 MB render buffer pool it sizes at start. With #303's
DM_NVN_POOLPEAKon an iPad Pro 13" M4, docked, open world with the inventory and map opened:SIGSEGVatmain+0xed7128, address0x20, while the field loadsThat crash is
gsys::RenderBufferContexttaking a null back from a failed allocation, the same site @v0lumehi hit at 2560x1440 on an M2 Max. 1.40 is 2.2 MB from full, which is too close to ship, so the ceiling is the slider step below it.For contrast, the other large pool in the same run was 256.0 MB of 500.0 MB with a 244 MB contiguous run free, so the pressure is specific to the render buffer pool.
Changes
dm/games/game.py: the key, validated 1.0 to 3.0, emitted asDM_GAME_RENDER_SCALE_MAXdm/host/loader.c: the clamp takes the profile's ceilingdm/games/settings.py: arangebound may be aDM_GAME_<NAME>macrodm/games/settings.tsv: the render scale row uses itdm/games/01007EF00011E000/game.tsv:render_scale_max 1.35, with the measurement in the commentdm/games/README.md,docs/settings.mdRelationship to the other PRs
render_scale_maxbecomes whatever the grown pool supports instead of 1.35.needscolumn now and I will rebase it onto this.test_docs,test_env_switches,test_launcher_settingsandtest_profile_guesspass.