Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 28 Jul 17:21
· 224 commits to main since this release

Present now happens at the layer's own size, and this release owns every resample that reaches the screen.

The drawable used to be pinned to the guest's back-buffer size. Whenever that differed from the layer's backing store, Core Animation rescaled the finished frame during compositing, downstream of everything we encode and with a phase we do not choose. At a ratio near 1.0 that put the whole image, interface included, a pixel away from where it was drawn, and it is what made text look soft in a window that was not an exact match for its back buffer. The drawable is now the layer's backing store, pushed at attach and again before every acquire, which also covers the frames between a window resize and the game reacting to it.

Present resolves the two sizes itself, by one of three routes: a straight copy at matching extents, MetalFX when the drawable is larger in both axes, and a filtered stretch for everything else. Because the routing reads the real texture extents, render.scale and a window that does not match its back buffer now collapse into a single resample instead of two. Only the stretch covers every ratio, so it is the backstop when MetalFX declines; the straight copy cannot stand in for it, because copying a smaller source into a larger drawable leaves the rest holding undefined memory.

Two fixes for problems that only showed up after living with the layer for a while. The MetalFX scaler cache is now bounded at eight entries, evicted least recently used: a scaler was cached per exact geometry and kept for the life of the process, so resizing a window steadily leaked them, around 16 MiB apiece at desktop sizes. And the EDR headroom is now read on the main thread rather than the presenting one. Reaching the screen's headroom means walking a view to its window to its screen, and only the screen at the end of that walk is safe to touch off the main thread; the two objects on the way to it are not. A zone transition is exactly when the main thread rebuilds them, which is where this surfaced as a crash a few seconds after porting into a raid.

Releases now ship their debug symbols, as a second archive, mtld3d-debug.tar.xz. Nothing in it needs installing. It exists so a crash report from a release build can actually be read: it holds the .pdb for each shipped DLL and a .dSYM for mtld3d.so. The Mach-O half was not previously producible at all, since the debug information for a dylib stays behind in the compiler's object files unless something gathers it.

To make a report identify its own build, every DLL and the .so now name themselves as they load, with the release they came from and the ID the linker assigned that image:

[mtld3d::d3d9] d3d9.dll v0.3.0 95ADD3A2-04B1-89D9-4C4C-44205044422E loaded

That ID is the PDB GUID on Windows and the UUID on macOS. Both are derived from the binary's contents, so it changes whenever the binary does and it is the same key the debugger uses to pair a binary with its symbols. If you report a crash, the first lines of the log now say exactly which archive resolves it.

Installing is unchanged, and covered in INSTALL.md inside the bundle.

Full changelog: v0.2.0...v0.3.0