docs(porting): the priming list names every metallib of the OS image

This commit is contained in:
UniXNU Docs committed 2026-11-01 07:22:38 +08:00
1 parent 7329cccd51
commit 407db1aefd
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -160,7 +160,7 @@ separate timing observations.
A pipeline compiles from Apple's AIR the first time something asks for it, which stalls frames. Warm the caches ahead so the desktop finds them. Two inputs do this, and both use the same mechanism for every OS profile (iOS/iPadOS 17 `--target ios`, 27 `--target ios27`); only the library list differs, because it names the libraries of that OS image.
1. **Priming list.** Write the absolute path of every `.metallib` of the OS image (OS and SystemOS volumes), one per line, as the render server sees it (`/System/Library/...`). Keep it in `build/prime-list.txt`; `build-adreno-metal-plugin.py` embeds it in the plugin as the `__DATA,__primelist` section, and `make-gpu-addon.py --prime-list FILE` ships it as `addons/NativeAdrenoMetal.primelist`. With a list the render server does not scan directories: its sandbox hides most of them.
1. **Priming list.** Write the absolute path of every `.metallib` of the OS image, one per line, as the render server sees it (`/System/Library/...`). Keep it in `build/prime-list.txt`; `build-adreno-metal-plugin.py` embeds it in the plugin as the `__DATA,__primelist` section, and `make-gpu-addon.py --prime-list FILE` ships it as `addons/NativeAdrenoMetal.primelist`. With a list the render server does not scan directories: its sandbox hides most of them.
2. **Pipeline pack.** Boot an image built with `make-gpu-addon.py --cache-export`; the plugin writes its cache directory to the board log. Read the run with `scripts/read-sheng-log.py`, merge one or more exports with `scripts/make-m2vpack.py OUT EXPORT_DIR...` (later directories win) and ship the result with `make-gpu-addon.py --pipeline-pack OUT`. The plugin imports the pack into the cache directory before the runtime opens it.
How priming runs:
+1 -1
View File
@@ -139,7 +139,7 @@ AirNir 是离线编译器 kit;运行时前端使用组件页说明的 AIR →
pipeline 在第一次被请求时才从 Apple 的 AIR 编译,会让画面卡顿。预先预热缓存,桌面就能直接命中。有两项输入,所有 OS 配置都用同一机制(iOS/iPadOS 17 用 `--target ios`,27 用 `--target ios27`);只有库列表不同,因为它列出的是该 OS 镜像的库。
1. **预编译列表。** 把 OS 镜像(OS 和 SystemOS 卷)中每个 `.metallib` 的绝对路径按 render server 看到的形式(`/System/Library/...`)逐行写出。放在 `build/prime-list.txt`,`build-adreno-metal-plugin.py` 会把它嵌入插件的 `__DATA,__primelist` 段,`make-gpu-addon.py --prime-list FILE` 把它作为 `addons/NativeAdrenoMetal.primelist` 带上。有列表时 render server 不扫描目录,因为沙盒让它看不到大部分目录。
1. **预编译列表。** 把 OS 镜像中每个 `.metallib` 的绝对路径按 render server 看到的形式(`/System/Library/...`)逐行写出。放在 `build/prime-list.txt`,`build-adreno-metal-plugin.py` 会把它嵌入插件的 `__DATA,__primelist` 段,`make-gpu-addon.py --prime-list FILE` 把它作为 `addons/NativeAdrenoMetal.primelist` 带上。有列表时 render server 不扫描目录,因为沙盒让它看不到大部分目录。
2. **Pipeline 包。** 启动用 `make-gpu-addon.py --cache-export` 构建的镜像,插件会把缓存目录写进板级日志。用 `scripts/read-sheng-log.py` 读取这次运行,用 `scripts/make-m2vpack.py OUT EXPORT_DIR...` 合并一个或多个导出(靠后的目录优先),再用 `make-gpu-addon.py --pipeline-pack OUT` 带上。插件在运行时打开缓存目录之前先把包导入其中。
预编译的运行方式: