Skip to content

Commit 771932d

Browse files
committed
Make new descriptors mutable
1 parent 428a86f commit 771932d

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
@@ -1396,7 +1396,7 @@ end
13961396
@autoproperty dispatchType::MTLDispatchType
13971397
end
13981398

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

14011401
@objcproperties MTLCommandQueueDescriptor begin
14021402
@autoproperty maxCommandBufferCount::UInt64 setter = setMaxCommandBufferCount
@@ -2676,7 +2676,7 @@ end
26762676
MTLLogLevelFault = 5
26772677
end
26782678

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

26812681
@objcproperties MTLLogStateDescriptor begin
26822682
@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.MTLCompileOptions]
5457
immutable=false
5558
[api.MTLCompileOptions.proptype]
@@ -85,6 +88,9 @@ immutable=false
8588
[api.MTLLibrary]
8689
immutable=false
8790

91+
[api.MTLLogStateDescriptor]
92+
immutable=false
93+
8894
[api.MTLSharedEvent]
8995
immutable=false
9096

0 commit comments

Comments
 (0)