Repository navigation
games: Red Dead Redemption (01007820196A6000) 60 fps through sm_FrameLock (Depends on: #1801, #1945) - #1948
Draft
tapionallanaire wants to merge 12 commits into
Draft
games: Red Dead Redemption (01007820196A6000) 60 fps through sm_FrameLock (Depends on: #1801, #1945)#1948tapionallanaire wants to merge 12 commits into
tapionallanaire wants to merge 12 commits into
Conversation
An RPF6 archive's table of contents and name table are encrypted, but its
members are plain zstd frames. The split now finds the members whose first
bytes are 'rgxd' and takes each GLSLC output record in them
({0x19866891, code size, control size, code, control}). Only files that
start with 'RPF6' reach the new branch; no other profile has one.
Red Dead Redemption's shaders.rpf: 131 effects, 3,413 programs
(2,089 vertex, 1,324 pixel), all unique.
The update package holds the whole game. Profile from the NSP script's survey; shader tables from the split: 3,581 shaders (3,413 from shaders.rpf, 168 that main embeds). Not yet run on a device.
…embers) Red Dead Redemption's first screen (the language select before the boot, d11extra/langselect.pkdswitch) draws with a vertex and pixel shader that are whole GLSLC outputs inside the pack's zlib members. The split did not read the pack, so both were missing from the library and the screen stayed black. Only files named .pkdswitch with the pack's header are read.
Regenerate shader_map.tsv and shader_pairs.tsv with the current split: group names follow the split's (vs_effects, ps_effects, vs_main, ps_main), which the on-device Prepare compares against, and the two shaders of d11extra/langselect.pkdswitch are added (3,583 shaders).
…mm's driver crashes in the opening)
… 512.800 The opening crashes in vkResetCommandBuffer on Qualcomm 512.676 (Adreno 740) with push descriptors, in 6 of 6 runs; without them it plays past that shot. Turnip and newer Qualcomm drivers keep push descriptors.
The opening and about 11 minutes of play on Qualcomm 512.676 (Adreno 740) with push_desc_qcom_old off: 30 fps, no underruns in play. The crash and what was ruled out are in the README.
The build row names the display version the app shows (1.0.7), zip_store drops .metallib (not used on Android), and the note's Open list names the Qualcomm driver crash the profile works around and the culling the game shows without cumulative SAMPLES_PASSED counting (igawa6#1738). docs/agents/game-patches.md regenerated with docs_patches.py.
RAGE steps the game by measured time (TIME::Update, clamped to 0.0001-0.1 s), and the 30 fps cap is sm_FrameLock (main+0x20dba20), which the game sets to 2 at start and also reads for its own 60 fps paths (dynamic resolution target, frame-time scale, UI sync, scripts). One reviewed fpslocker vsync_u32 row writes 60 / the cap there (FPSLocker Warehouse ALL_FPS for this build), with present_interval display. Game owned, 30 and 60 only: 20 would give 3, which every reader treats as 60.
The frame counter's readers, the frame-difference windows that halve at 60, the two fixed 1/30 s steps left (fragInst force notification, cutscene animation manager) and fs_GetIs30FPS.
dm/tools/docs_patches.py after the profile's present_interval display, fps_limit 60 and fps_modes 30,60.
…wer needs Tested on: 18.2 min at the 60 limit (median 57.9 fps, game time 0.994 of real time) and 12.3 min at 30 on Turnip 27.0.0-R2, with igawa6#1738 and igawa6#1945. Frame rate: why igawa6#1945 is needed. Open: Qualcomm at 60, lip sync by ear.
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.
What and why
Depends on: #1801 (this branch is stacked on it: the first 8 commits are #1801's; this PR adds the last 4)
Depends on: #1945
Depends on: #1738 (through #1801)
Red Dead Redemption (
01007820196A6000, 1.0.7, main37531419da76) at 60 fps: a reviewed FPSLocker row andpresent_interval display, profile only.TIME::Update(main+0x1b4190) takes the system tick delta since the last frame, times the time scale, clamped to 0.0001-0.1 s, and adds it to the game time; its fixed 1/60 s branches need flags or a command-line parameter a retail start does not set. Physics picks its substeps from the measured step. Sopresent_interval displayis right for it.rage::grcDevice::sm_FrameLock(main+0x20dba20):main+0xbd9618sets it to 2 at start, the NVN window takes it as its present interval, and the engine keeps its own 60 fps path on it (dynamic resolution's GPU target 15.71 ms instead of 31.42 ms, a frame-time scale, Scaleform's UI sync, the scripts'fs_GetIs30FPS).fpslocker 37531419da7654ec3f5b586693f7f331 vsync_u32 @0x20dba20 1 0writes 60 / the limit there (1 at 60, 2 at 30, the game's own value), from masagrator's FPSLocker Warehouse config for this build (patches/01007820196A6000/37531419DA7654EC.yaml, ALL_FPS). Its other part, a hook on the dynamic-resolution target, is left out: at 30 and 60 the game computes the same targets itself.fps_limit 60,fps_modes 30,60: every reader tells 2 from the rest, so 20 (a value of 3) would take the 60 fps paths; Game owned writes nothing.rage::fragInst's force-to-impulse for its breaking check,rdr2::CutsAnimMgrEntity). Nothing wrong was seen from them in play.docs/agents/game-patches.mdfromdocs_patches.py.Why #1945: without it, the audio follower reads the game's pace from presented frames at 1/60 s each, and a device that does not hold 60 makes the sound lead the picture (Thor at 46 to 55 fps: median 188 ms, up to 392 ms, 28 underruns in 16 minutes). With it, the sound keeps real time as the game does. Without #1738, hitched horses, people and props are culled while in view (the game never resets its
SAMPLES_PASSEDcounter); #1801's note covers that.Impact on other profiles
Profile only:
dm/games/01007820196A6000/and the generateddocs/agents/game-patches.md. No shared code, no new key; the row's build gate matches only thismain. No table, extension, magic or key collision. The new rows in game-patches.md are this game's.Checked
2648b2059f, Vulkan 1.4.367). Base v0 and update v458752 NSZs imported and prepared in the app on the device (ready after 14 min 37 s), new game on Normal, Docked. The build had the 0.1.10 runtime, games: Red Dead Redemption (01007820196A6000) profile, RAGE RPF6 and Double Eleven pack shader readers #1801's profile with these rows, vk_android: start cumulative SAMPLES_PASSED on first report without ResetCounter (every NVN game) #1738 and audio (every game; changes present_interval display games with FPSLocker rows): no frame pace for a game on its own clock #1945 (in an earlier form, see that PR). Log:interval mode display,frame limit 60 fps (game profile fps_limit).TIMEcounter read twice 30 s apart: 0.994. Sound: tempo 1.000, no underruns in play.CRASHin any run.[RED]lines: the known Android stubs (mtl_*statistics),SetRenderEnableConditional(games: Red Dead Redemption (01007820196A6000) profile, RAGE RPF6 and Double Eleven pack shader readers #1801's note), and AAudio streams that did not stop when the screen recorder took the audio.check-profiles.sh 01007820196A6000OK;test_docs.py11/11;test_fpslocker_rows.pyOK;docs_patches.py --checkanddocs_symptoms.py --checkcurrent;test_android_games.py,test_game_profile.pyandtest_fpslocker_plan.pygive the same 34 failures here and at games: Red Dead Redemption (01007820196A6000) profile, RAGE RPF6 and Double Eleven pack shader readers #1801's head (Windows environment);pr_ready.py --basegames: Red Dead Redemption (01007820196A6000) profile, RAGE RPF6 and Double Eleven pack shader readers #1801's head: nothing to fix.push_desc_qcom_old off).fs_GetIs30FPSwas not read.devwith these commits: the runs are 0.1.10 builds.Docs
dm/games/01007820196A6000/README.md(Frame rate, Tested on, Open)dm/third_party/, no change todmsh_chain.lock; stacked on games: Red Dead Redemption (01007820196A6000) profile, RAGE RPF6 and Double Eleven pack shader readers #1801, which starts fromdev