Files
ghostty/src/renderer
Uzair Aftab 4a22eed6d9 renderer/metal: fix 2x sizeof over-allocation in Buffer.sync
Buffer.sync and Buffer.syncFromArrayLists computed the new buffer size
in bytes (req_bytes * 2) and then multiplied by @sizeOf(T) again when
passing it to newBufferWithLength:, allocating data.len * sizeOf(T)^2 * 2
bytes. For the 32-byte CellText buffers this is a 64x over-allocation
and for the 4-byte CellBg buffers 8x, per swap-chain frame (e.g. ~9.4MB
instead of ~300KB per frame for a full 120x40 screen of text).

Match the OpenGL buffer implementation: track the new length in units
of T and multiply by @sizeOf(T) exactly once.
2026-07-27 23:42:06 +02:00
..
2026-07-21 12:35:05 -07:00
2026-07-21 12:35:05 -07:00
2026-07-21 12:35:05 -07:00
2026-07-21 12:35:05 -07:00
2026-07-21 12:35:05 -07:00
2026-07-21 12:35:05 -07:00
2025-11-27 13:37:53 -08:00
2025-11-27 13:37:53 -08:00
2026-07-21 12:35:05 -07:00
2026-01-31 11:03:21 -08:00
2026-07-21 12:35:05 -07:00
2026-07-21 12:35:05 -07:00
2026-07-21 12:35:05 -07:00
2022-12-31 08:53:11 -08:00