mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
renderer/metal: frame index must fit up to buffer count
This commit is contained in:
@ -134,7 +134,7 @@ pub const GPUState = struct {
|
|||||||
/// The frame data, the current frame index, and the semaphore protecting
|
/// The frame data, the current frame index, and the semaphore protecting
|
||||||
/// the frame data. This is used to implement double/triple/etc. buffering.
|
/// the frame data. This is used to implement double/triple/etc. buffering.
|
||||||
frames: [BufferCount]FrameState,
|
frames: [BufferCount]FrameState,
|
||||||
frame_index: std.math.IntFittingRange(0, BufferCount - 1) = 0,
|
frame_index: std.math.IntFittingRange(0, BufferCount) = 0,
|
||||||
frame_sema: std.Thread.Semaphore = .{ .permits = BufferCount },
|
frame_sema: std.Thread.Semaphore = .{ .permits = BufferCount },
|
||||||
|
|
||||||
device: objc.Object, // MTLDevice
|
device: objc.Object, // MTLDevice
|
||||||
|
Reference in New Issue
Block a user