Skip to content

Commit af0acbe

Browse files
committed
Cleanup rebase glitches
1 parent b3835f0 commit af0acbe

File tree

3 files changed

+35
-41
lines changed

3 files changed

+35
-41
lines changed

lib/mtl/command_queue.jl

+17-19
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11

2-
@static if Metal.is_macos(v"15.0.0")
3-
export MTLCommandQueueDescriptor
4-
5-
# @objcwrapper immutable=false MTLCommandQueueDescriptor <: NSObject
6-
7-
function MTLCommandQueueDescriptor()
8-
handle = @objc [MTLCommandQueueDescriptor alloc]::id{MTLCommandQueueDescriptor}
9-
obj = MTLCommandQueueDescriptor(handle)
10-
finalizer(release, obj)
11-
@objc [obj::id{MTLCommandQueueDescriptor} init]::id{MTLCommandQueueDescriptor}
12-
return obj
13-
end
14-
15-
function MTLCommandQueue(dev::MTLDevice, descriptor::MTLCommandQueueDescriptor)
16-
handle = @objc [dev::id{MTLDevice} newCommandQueueWithDescriptor:descriptor::id{MTLCommandQueueDescriptor}]::id{MTLCommandQueue}
17-
obj = MTLCommandQueue(handle)
18-
finalizer(release, obj)
19-
return obj
20-
end
2+
export MTLCommandQueueDescriptor
3+
4+
# @objcwrapper immutable=false MTLCommandQueueDescriptor <: NSObject
5+
6+
function MTLCommandQueueDescriptor()
7+
handle = @objc [MTLCommandQueueDescriptor alloc]::id{MTLCommandQueueDescriptor}
8+
obj = MTLCommandQueueDescriptor(handle)
9+
finalizer(release, obj)
10+
@objc [obj::id{MTLCommandQueueDescriptor} init]::id{MTLCommandQueueDescriptor}
11+
return obj
12+
end
13+
14+
function MTLCommandQueue(dev::MTLDevice, descriptor::MTLCommandQueueDescriptor)
15+
handle = @objc [dev::id{MTLDevice} newCommandQueueWithDescriptor:descriptor::id{MTLCommandQueueDescriptor}]::id{MTLCommandQueue}
16+
obj = MTLCommandQueue(handle)
17+
finalizer(release, obj)
18+
return obj
2119
end
2220

2321

lib/mtl/log_state.jl

+18-20
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
@static if Metal.is_macos(v"15.0.0")
2-
export MTLLogLevel
1+
export MTLLogLevel
32

4-
export MTLLogStateDescriptor
3+
export MTLLogStateDescriptor
54

6-
# @objcwrapper immutable = false MTLLogStateDescriptor <: NSObject
5+
# @objcwrapper immutable = false MTLLogStateDescriptor <: NSObject
76

8-
function MTLLogStateDescriptor()
9-
handle = @objc [MTLLogStateDescriptor alloc]::id{MTLLogStateDescriptor}
10-
obj = MTLLogStateDescriptor(handle)
11-
finalizer(release, obj)
12-
@objc [obj::id{MTLLogStateDescriptor} init]::id{MTLLogStateDescriptor}
13-
return obj
14-
end
7+
function MTLLogStateDescriptor()
8+
handle = @objc [MTLLogStateDescriptor alloc]::id{MTLLogStateDescriptor}
9+
obj = MTLLogStateDescriptor(handle)
10+
finalizer(release, obj)
11+
@objc [obj::id{MTLLogStateDescriptor} init]::id{MTLLogStateDescriptor}
12+
return obj
13+
end
1514

1615

17-
export MTLLogState
16+
export MTLLogState
1817

19-
# @objcwrapper immutable = true MTLLogState <: NSObject
18+
# @objcwrapper immutable = true MTLLogState <: NSObject
2019

21-
function MTLLogState(dev::MTLDevice, descriptor::MTLLogStateDescriptor)
22-
err = Ref{id{NSError}}(nil)
23-
handle = @objc [dev::id{MTLDevice} newLogStateWithDescriptor:descriptor::id{MTLLogStateDescriptor}
24-
error:err::Ptr{id{NSError}}]::id{MTLLogState}
25-
err[] == nil || throw(NSError(err[]))
26-
MTLLogState(handle)
27-
end
20+
function MTLLogState(dev::MTLDevice, descriptor::MTLLogStateDescriptor)
21+
err = Ref{id{NSError}}(nil)
22+
handle = @objc [dev::id{MTLDevice} newLogStateWithDescriptor:descriptor::id{MTLLogStateDescriptor}
23+
error:err::Ptr{id{NSError}}]::id{MTLLogState}
24+
err[] == nil || throw(NSError(err[]))
25+
MTLLogState(handle)
2826
end

src/compiler/compilation.jl

-2
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,5 @@ end
210210
end
211211
end
212212

213-
# most of the time, we don't need the function object,
214-
# so don't keep it alive unconditionally in GPUCompiler's caches
215213
pipeline_state, compiled.loggingEnabled
216214
end

0 commit comments

Comments
 (0)