Skip to content

Commit 8a0ba86

Browse files
committed
Fix Swift 6 concurrency error in MetalRenderer
Add @mainactor annotation to render(in:commandBuffer:) method to resolve main actor-isolated property access errors for MTKView.currentRenderPassDescriptor and currentDrawable.
1 parent a950b4a commit 8a0ba86

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/Fisheye/Rendering/MetalRenderer.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ public class MetalRenderer {
270270
/// - Parameters:
271271
/// - view: The MTKView to render into.
272272
/// - commandBuffer: The command buffer to encode rendering commands.
273+
@MainActor
273274
public func render(in view: MTKView, commandBuffer: MTLCommandBuffer) {
274275
guard let renderPassDescriptor = view.currentRenderPassDescriptor,
275276
let drawable = view.currentDrawable,

0 commit comments

Comments
 (0)