mtl12 Devlog, Seite 2
Ältere Einträge aus dem Devlog. Projekt, Stand und Galerie stehen auf der ersten Seite.
Einträge
Die Einträge sind auf Englisch verfasst. 72 Einträge, neueste zuerst. Diese Seite zeigt 064 bis 053.
- Entry 064
A Metal draw costs more when its vertex shader reads the base instance, whatever the value
Last session's trick of passing per-draw data as the base instance still left drawstress 3.3 ms slower than expected. The gap is Metal's own per-draw cost for vertex shaders that read the base instance, instance ID or base vertex, measured at about 38 ns a draw under Rosetta.
- Entry 063
A third off the draw loop's CPU time by passing each draw's root arguments through the base instance
Under Rosetta, a Metal 4 draw costs twice as much when one buffer address changes before it. Handing each draw's offset to the shader as its base instance removed that address change, and bgfx's draw stress test went from 12.7 to 8.6 ms of CPU time per frame.
- Entry 062
Godot's effects scene on our D3D12, after one missing 4-bit texture format
Godot 4.7's SDFGI, volumetric fog, screen-space reflections and GPU particles now render through mtl12. The only thing missing was a 16-bit texture format whose bits Metal stores in a different order.
- Entry 061
Godot 4.7 renders on our D3D12, after two shader-translator fixes
The unmodified Godot 4.7.2 Windows release now runs a small 3D scene with its D3D12 Forward+ renderer on Metal through mtl12, and the frame is checked in the test suite.
- Entry 060
Three message sends per draw, and what they cost under Rosetta
Calling three Metal methods per draw through cached function pointers instead of Objective-C message sends, plus skipping bindings a repeated draw already has, cut the CPU time of a 64,000-draw scene by a fifth.
- Entry 059
Skipping what a repeated state block already decided
When a draw uses the same block of pipeline state as the draw before it, mtl12 now skips recomputing and re-setting that state, which cut the CPU time of a draw-heavy scene by about a quarter.
- Entry 058
A third of the draw path was reference counting
Under Rosetta, the automatic retain and release calls Objective-C inserts around every draw cost about a third of the CPU time mtl12 spent replaying a draw-heavy scene; removing them made that scene's frames 23% faster.
- Entry 057
Draws that point at their state instead of carrying it
Each recorded draw carried 1.8 KB of pipeline and render state; sharing that state between draws halved the time to record 10,000 draws, while a test of removing GPU barriers showed they cost little.
- Entry 056
Timestamps that arrive late when another app uses the GPU
Metal 4 wrote a command buffer's GPU timestamps late, all at the end, whenever another process kept the GPU busy; writing each one in a small encoder of its own fixed it.
- Entry 055
Translating each shader once: a disk cache in front of SPIR-V and MSL
The layer now stores every shader translation on disk, so a game started a second time skips the DXIL to Metal Shading Language step that cost about 70% of creating a pipeline.
- Entry 054
Three ways to make a draw cheaper, none kept
Three ideas to cut the CPU cost of a draw call in a D3D12-to-Metal layer: one did nothing measurable, one broke rendering, and one helped a benchmark in one run and hurt it in another.
- Entry 053
Five walks over 110 MB a frame: letting the recorder say which pre-passes to run
Replay walked every recorded command five times per frame before drawing anything; flags summed while recording removed the walks and cut a 61,000-draw bgfx frame from 74.7 to 48.2 ms.