Skip to content

Commit f2c1990

Browse files
committed
Feedback
1 parent 39fc24b commit f2c1990

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

lib/mtl/capture.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ Stop GPU frame capture.
150150
"""
151151
function stopCapture(manager::MTLCaptureManager=MTLCaptureManager())
152152
@objc [manager::id{MTLCaptureManager} stopCapture]::Nothing
153-
while manager.isCapturing
154-
end
155153
end
156154

157155
function supports_destination(manager::MTLCaptureManager, destination::MTLCaptureDestination)

src/utilities.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ function captured(f; dest=MTL.MTLCaptureDestinationGPUTraceDocument,
143143
beginScope(scope)
144144
f()
145145
endScope(scope)
146-
synchronize()
147146
finally
148147
@info "GPU frame capture saved to $folder; open the resulting trace in Xcode"
149148
stopCapture()
149+
synchronize()
150150
end
151151
end
152152

test/capturing.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ startCapture(manager, desc)
6868
@test_throws ErrorException startCapture(manager, desc)
6969
Metal.@sync @metal threads=4 tester(bufferA)
7070
stopCapture(manager)
71+
synchronize()
7172
@test manager.isCapturing == false
7273
@test isdir(path)
7374
release(new_scope)

0 commit comments

Comments
 (0)