Skip to content

Commit

Permalink
Revert "Don't rely on thread adoption for command buffer callbacks. (#…
Browse files Browse the repository at this point in the history
…184)" (#191)

This reverts commit 836b6e0.
  • Loading branch information
maleadt authored May 26, 2023
1 parent eba0b24 commit 5a9865d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/mtl/command_buf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,10 @@ function encode_wait!(buf::MTLCommandBuffer, ev::MTLEvent, val::Integer)
value:val::UInt64]::Nothing
end

if false && VERSION >= v"1.9-"
if VERSION >= v"1.9-"

# on 1.9, we can just have Metal call back into Julia regardless of the thread it's on.
# this means we can have Metal pass us the buffer, and don't need any additional capture.
#
# XXX: this sometimes crashes during thread adoption with signal (10.1): Bus error: 10
# jl_gc_pool_alloc_noinline at libjulia-internal.1.9.dylib
# jl_init_root_task at libjulia-internal.1.9.dylib
# ijl_adopt_thread at libjulia-internal.1.9.dylib
# unknown function (ip: 0x146c5829b)
# MTLDispatchListApply at /System/Library/Frameworks/Metal.framework/Versions/A/Metal
function _command_buffer_callback(f, _)
# convert the incoming pointer, and discard any return value
function g(_buf)
Expand Down

0 comments on commit 5a9865d

Please sign in to comment.