Repository navigation
Conversation
c373811 to
3f6e8c3
Compare
3f6e8c3 to
9b9e80d
Compare
|
Rebased onto current |
Game carries six unrelated rows: how fast the game runs, how large it renders, which console mode it reports, how the finished frame is scaled, which language it speaks, and a frame-rate read-out. The only thing they have in common is that none of them belonged in Controls or Performance. Picture takes the two rows that are about the finished frame rather than about the game: Render scale and Upscaling. Game keeps Frame rate, Console mode and Game language. The frame-rate counter moves to Performance next to the Performance HUD, since both are read-outs rather than settings. The split matters more as the section grows. With the anisotropic and trilinear filtering of seedds#335 and the upscaling detail and sharpening of seedds#345, Game would hold ten rows, six of which are about how the picture looks. The heading order on screen is the order of SECTIONS, and rows keep their table order inside a section, so settings.tsv still decides the layout on its own.
9b9e80d to
022bf5b
Compare
|
Rebased on current main. The present shader moved into |
022bf5b to
704ca34
Compare
|
Rebased onto main (2e6edda) as one commit, retitled to the Checked on this commit (M4 Max): host build, |
Game carries eleven unrelated rows: how fast the game runs, how large it renders, which console mode it reports, how the finished frame is scaled, fitted and shaped, which language it speaks, how the Mac window opens, and a frame-rate read-out. The only thing they have in common is that none of them belonged in Controls or Performance. Picture takes the rows that are about the finished frame rather than about the game: Render scale, Upscaling, Game's upscaler, Picture and Picture shape. Game keeps Frame rate, Dynamic resolution, Console mode, Game language and the Mac's Display mode. The frame-rate counter moves to Performance next to the Performance HUD, since both are read-outs rather than settings. The iOS in-game menu follows the sections, so the counter comes after the controls there. The split matters more as the section grows. With the anisotropic and trilinear filtering of seedds#335 and the upscaling detail and sharpening of seedds#345, Game would hold fifteen rows, nine of which are about how the picture looks. The heading order on screen is the order of SECTIONS, and rows keep their table order inside a section, so settings.tsv still decides the layout on its own. In docs/settings.md the Picture section takes the anchor #picture, and the Picture setting inside it becomes #picture-1. The thermal cap (seedds#220) holds the frame step at 30 fps while iOS reports a serious or critical thermal state, and DM_THERMAL_CAP=0 turned it off only from an env file. It is a trade a player should be able to make: with a phone cooler, or for a player who would rather have an uneven 45 to 55 than an even 30, it costs more than it saves. "Halve when hot" in Performance, on by default, so nothing changes for anyone who does not touch it. Shown only for a game with a frame step, as Hold frames when late is. The note says what the thermal state does not catch. On an iPhone 17 Pro Max, Breath of the Wild 1.9.0 dropped a third of its frames for ten minutes with the state reading nominal throughout, and one scene's GPU time went from 8.40 ms to 21.83 ms while it still read nominal: iOS lowers the clock well before it calls the device hot. The same phone, charged over USB while large apps were installed onto it, started a game already at serious and was held at 30 from the first frame, which is the case the setting is for. The tests follow: Render scale is a basic row under Picture, and in the Mac window's list for Breath of the Wild every Game row is basic, so its Advanced settings start at Picture.
|
Now that this Mac has the chain lock's compiler (Xcode 27.2), regress.py check (full): PASSBaseline
BOTW
|
Two additions to the present pass, both of which work for any game because neither needs anything from the game. DM_PRESENT_UPSCALE_OUT=1.0..4.0 reconstructs above the viewport and averages back down. The present shader took one bilinear sample, which reads 4 texels whatever the reduction, so reconstructing larger and sampling down this way threw nearly all of it away. The tap count now follows the reduction ratio, capped at 4x4, which makes it real supersampling. At 1.0, the default, the scaler still targets the viewport and the shader still takes one tap, so nothing changes. In the launcher it is Upscaling detail, a sub-setting of Upscaling (needs=DM_PRESENT_UPSCALE=metalfx, seedds#418): its row is drawn only while MetalFX is chosen. DM_SHARPEN=0..1 is contrast adaptive sharpening of the finished picture: the 5 tap cross, clamped to the neighbourhood's own range so it cannot ring or halo. It is a second fragment function taken instead of the blit, not after it, so it adds no pass and costs nothing when off. The present without a Metal 4 queue passes one tap and no sharpening, so it draws as before. Measured with the same two changes in a fork, on Breath of the Wild 1.9.0 on an iPad Pro 13" M4, 1920x1080 content into a 2752x1548 viewport, all at 60.00 fps with thermal state nominal and a 16.67 ms budget: upscaling output scaler target GPU off - - 8.53 ms metalfx 1.0 2752x1548 9.09 ms metalfx 2.0 5504x3096 11.34 ms Before the box filter, output 2.0 looked identical to 1.0 while costing the same 11 ms, which is what led to the change. Compiles. Not yet run against this main: our devices are built from an older chain and rebuilding them is a long job, so the device numbers above come from the fork. Opening it now because both settings are off by default.
704ca34 to
8368e2b
Compare
|
Rebased onto current main, which now has MetalFX read the presented texture and write the drawable itself. Upscaling detail sizes the scaler before main's checks, so above 1.0 the scaler writes its own texture and the present pass averages it down. The sharpening pipeline is built through main's compile wrapper. t_present_crop (117) and t_present_alloc pass. |
Game carries eleven unrelated rows: how fast the game runs, how large it renders, which console mode it reports, how the finished frame is scaled, fitted and shaped, which language it speaks, how the Mac window opens, and a frame-rate read-out. The only thing they have in common is that none of them belonged in Controls or Performance. Picture takes the rows that are about the finished frame rather than about the game: Render scale, Upscaling, Game's upscaler, Picture and Picture shape. Game keeps Frame rate, Dynamic resolution, Console mode, Game language and the Mac's Display mode. The frame-rate counter moves to Performance next to the Performance HUD, since both are read-outs rather than settings. The iOS in-game menu follows the sections, so the counter comes after the controls there. The split matters more as the section grows. With the anisotropic and trilinear filtering of seedds#335 and the upscaling detail and sharpening of seedds#345, Game would hold fifteen rows, nine of which are about how the picture looks. The heading order on screen is the order of SECTIONS, and rows keep their table order inside a section, so settings.tsv still decides the layout on its own. In docs/settings.md the Picture section takes the anchor #picture, and the Picture setting inside it becomes #picture-1. The thermal cap (seedds#220) holds the frame step at 30 fps while iOS reports a serious or critical thermal state, and DM_THERMAL_CAP=0 turned it off only from an env file. It is a trade a player should be able to make: with a phone cooler, or for a player who would rather have an uneven 45 to 55 than an even 30, it costs more than it saves. "Halve when hot" in Performance, on by default, so nothing changes for anyone who does not touch it. Shown only for a game with a frame step, as Hold frames when late is. The note says what the thermal state does not catch. On an iPhone 17 Pro Max, Breath of the Wild 1.9.0 dropped a third of its frames for ten minutes with the state reading nominal throughout, and one scene's GPU time went from 8.40 ms to 21.83 ms while it still read nominal: iOS lowers the clock well before it calls the device hot. The same phone, charged over USB while large apps were installed onto it, started a game already at serious and was held at 30 from the first frame, which is the case the setting is for. The tests follow: Render scale is a basic row under Picture, and in the Mac window's list for Breath of the Wild every Game row is basic, so its Advanced settings start at Picture.
Follow-up to #315, rewritten on top of current
mainnow thatDM_PRESENT_UPSCALEhas landed. Both settings are off by default and neither needs anything from the game.DM_PRESENT_UPSCALE_OUT
fx_encodetargets the viewport, and the present then draws the result 1:1. That draw takes one bilinear sample, which reads 4 texels whatever the reduction. So reconstructing above the viewport and sampling back down threw nearly all of it away: output 2.0 looked identical to 1.0 while costing the same GPU time.The tap count now follows the reduction ratio, capped at 4x4, so the whole source footprint is averaged. Reconstructing large and sampling down becomes real supersampling.
At
1.0, the default, the scaler still targets the viewport and the shader still takes one tap. Nothing changes for anyone who does not set it. Sizes above Metal's 16384 texture limit fall back to the viewport.DM_SHARPEN
Contrast adaptive sharpening of the finished picture: the 5 tap cross, low pass from the four neighbours, clamped to the neighbourhood's own min and max so it cannot ring or halo.
It is a second fragment function taken instead of the blit, not a pass after it, so it adds no encoder and costs nothing when off. It helps most where a game renders below the screen and no upscaler is on, which is the common case on the Pokémon titles that have no render scale stub.
Measured
Same two changes in a fork, Breath of the Wild 1.9.0, iPad Pro 13" M4, 1920x1080 content into a 2752x1548 viewport. All runs 60.00 fps, thermal state nominal, 16.67 ms budget.
MetalFX at the viewport costs 0.55 ms; at 2.0 output, 2.8 ms. Worst case leaves 5 ms spare.
Changes
dm/gfx/nvn/nvn_mtl.m:fx_out(), the box filter andsharpin the present shader, a second pipeline, the present constants widened from 8 to 12 floatsdm/games/settings.tsv: two rows in Gamedocs/settings.md,docs/env_switches.tsvState of testing
Compiles clean. Not yet run against this
main: our devices are built from an older translation chain and rebuilding them is a long job, so the device numbers above come from the fork's equivalent implementation rather than from this diff. I will post numbers from this branch once that rebuild is done.test_docs,test_env_switchesandtest_launcher_settingspass.Related: #335 (anisotropic and trilinear filtering), which is the sampler-side half of the original #315.