Repository navigation
Bring up Trails through Daybreak II 1.0.0 on Android - #581
Open
tapionallanaire wants to merge 2 commits into
Open
tapionallanaire wants to merge 2 commits into
tapionallanaire wants to merge 2 commits into
Conversation
Full-size texture pools can put a host texture ID in the sampler bits of a recorded handle. Keep each guest field intact, look up direct bindings in sparse pages, and retain the original host ID when capturing a registration. A host regression rotates three full pools without changing the sampler or enlarging GPU descriptor arrays. Bound handles now stay pool-local until the walk adds the executing pool's base, so the pool-table case of t_android_shlib expects the based sampler ID (211, not 11). test_vka_tex_registration compiles the registration functions against the sparse registry and checks that an ID of a later full-size pool is kept on the CPU side without entering the GPU dirty list.
Register the base build, its virtual memory layout and shader split metadata. Keep the Android status at bring-up and document how to check the recap and early field route. Water patch rendering and device play on this revision are unverified.
Owner
|
Thanks for rebasing this, and for the trace work on the pool problem. We can't take it as one PR, because the two commits carry very different risk:
What we need to move forward:
We'll review the split PR first. |
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.
Supersedes #225, rebased onto main (0.1.7).
What and why
Add the base 1.0.0 profile (
0100F6701FED4000, v0) with 4,471 shader keys. Keep its Android status at bring-up; this does not add it to the release catalog.The game rotates three texture pools with 1,048,576 entries each. Adding a texture base to a packed handle can spill into the sampler bits, and dropping registrations above the first pool can select a different image for the same local ID. For the recap this can replace the final composite or the font atlas. The first commit resolves direct bindings against the executing queue's pools and stores sparse registrations with their host IDs. GPU bindless array sizes and the shader translator are unchanged.
What changed in the rebase
719d4f7b: applied without a text conflict.maingained code around it since Bring up Trails through Daybreak II 1.0.0 on Android #225's base; I checked that none of it adds a pool base to a bound handle or indexes the texture registry directly (every registry use now goes throughtreg_lookup/treg_at;vka_tabpool_idsfrom the Hogwarts Legacy change reads its handles from memory throughubo_tex_id, which already adds the base). One test ofmain's needed its expectation moved:t_android_shlib's "table through the pool" case binds a separate sampler11withsamp_base200 and expected11, which assumed the base was added at record time; with bound handles kept pool-local the walk returns211, the same result the other cases of that test already expect.test_vka_tex_registration.py(onmainsince before Bring up Trails through Daybreak II 1.0.0 on Android #225's base, and broken by Bring up Trails through Daybreak II 1.0.0 on Android #225 as it was) compiled the registration functions against the flatg_tregarray; its prelude now includesvka_treg.h, its checks usetreg_lookup, and it adds a check that an ID of a later full-size pool is kept on the CPU side without entering the GPU dirty list, and that an ID past the registry is refused.android/app/gradle.propertiesconflicted withmain's Trails in the Sky 1st Chapter entry; the game is appended after it.peanuts/upstream-unmarked.txtkept both sides.readiness.tsvrows now use the<title>: <why>formtest_android_readiness.pyasks for onmain.game.tsvalready matchedmain's keys and layout.Checked
On this rebased branch:
test_vka_tex_registration.py: passes on Windows (clang) and Linux (GCC).t_android_shlib(Linux, GCC with ASan and UBSan): passed, including three overlapping pools and capture ID round-tripping; the optional real-library test was skipped. The same test passes on plainmain.-fsyntax-onlyof the six changed C translation units (hle_nvn.c,nvn_capture.c,vka_bind.c,vka_capture.c,vka_draw.c,vka_tex.c) with an Android host build's flags: no errors.t_android_*host tests: 36 of the 44 build and pass on both this branch and plainmain; the other 8 (av,fileback,input,memu,pace,poolslot,spvpatch,zshare) do not build on Linux x86-64 on either tree. The fullmake -C dm/host/tests run(Apple frameworks) anddm/gfx/testswere not run.python -m unittest discover -s dm/tools/tests), compared with the same run on plainmain: 1,580 tests on both. The failing and erroring tests are the same 215 on both (this run was on Windows: macOS-only tools, links to a missing.github/README.md,DM_GAMES_DIRpaths with a drive letter). The one test that differed before the port,test_vka_tex_registration, was then ported as above and rerun on its own.test_android_games,test_android_readinessand the generated symptom-index check pass withDM_GAME=0100F6701FED4000.From the earlier tree (#225's head, with the same two changes), not repeated on 0.1.7:
spirv-val --target-env vulkan1.3. The map, translation results and final library contained the same keys, with none missing or extra. 4,471 distinct map keys, 1,750 vertex/pixel input-coverage pairs and 37 compute launch records validated. The pairs are not a capture of live draws.VK_ERROR_DEVICE_LOST, submission 13559 at frame 6779) and exited. Field gameplay was not reached on this driver.Not checked on this branch: an APK build, Prepare, any device run.
Docs