Skip to content

Commit e5a4588

Browse files
committed
Make new descriptors mutable
1 parent 85ae354 commit e5a4588

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

lib/mtl/libmtl.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,7 @@ end
16151615
@autoproperty dispatchType::MTLDispatchType
16161616
end
16171617

1618-
@objcwrapper immutable = true availability = macos(v"15.0.0") MTLCommandQueueDescriptor <: NSObject
1618+
@objcwrapper immutable = false availability = macos(v"15.0.0") MTLCommandQueueDescriptor <: NSObject
16191619

16201620
@objcproperties MTLCommandQueueDescriptor begin
16211621
@autoproperty maxCommandBufferCount::UInt64 setter = setMaxCommandBufferCount
@@ -3098,7 +3098,7 @@ end
30983098
MTLLogLevelFault = 5
30993099
end
31003100

3101-
@objcwrapper immutable = true availability = macos(v"15.0.0") MTLLogStateDescriptor <: NSObject
3101+
@objcwrapper immutable = false availability = macos(v"15.0.0") MTLLogStateDescriptor <: NSObject
31023102

31033103
@objcproperties MTLLogStateDescriptor begin
31043104
@autoproperty level::MTLLogLevel setter = setLevel

lib/mtl/log_state.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33

44
export MTLLogStateDescriptor
55

6-
# @objcwrapper immutable = true MTLLogStateDescriptor <: NSObject
6+
# @objcwrapper immutable = false MTLLogStateDescriptor <: NSObject
77

88
function MTLLogStateDescriptor()
99
handle = @objc [MTLLogStateDescriptor alloc]::id{MTLLogStateDescriptor}
1010
obj = MTLLogStateDescriptor(handle)
11+
finalizer(release, obj)
1112
@objc [obj::id{MTLLogStateDescriptor} init]::id{MTLLogStateDescriptor}
1213
return obj
1314
end

res/wrap/libmtl.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ immutable=false
5050
[api.MTLCommandQueue]
5151
immutable=false
5252

53+
[api.MTLCommandQueueDescriptor]
54+
immutable=false
55+
5356
[api.MTL4CommandQueueDescriptor]
5457
immutable=false
5558

@@ -106,6 +109,9 @@ immutable=false
106109
[api.MTLLibrary]
107110
immutable=false
108111

112+
[api.MTLLogStateDescriptor]
113+
immutable=false
114+
109115
[api.MTLSharedEvent]
110116
immutable=false
111117

0 commit comments

Comments
 (0)