Skip to content

Commit 14e0070

Browse files
committed
Make new descriptors mutable
1 parent 4a0a719 commit 14e0070

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
@@ -1618,7 +1618,7 @@ end
16181618
@autoproperty dispatchType::MTLDispatchType
16191619
end
16201620

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

16231623
@objcproperties MTLCommandQueueDescriptor begin
16241624
@autoproperty maxCommandBufferCount::UInt64 setter = setMaxCommandBufferCount
@@ -3101,7 +3101,7 @@ end
31013101
MTLLogLevelFault = 5
31023102
end
31033103

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

31063106
@objcproperties MTLLogStateDescriptor begin
31073107
@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.MTLResidencySet]
110116
immutable=false
111117

0 commit comments

Comments
 (0)