Skip to content

Commit 233fda5

Browse files
committed
Make new descriptors mutable
1 parent 16baa0e commit 233fda5

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
@@ -1427,7 +1427,7 @@ end
14271427
end
14281428

14291429
@static if Metal.is_macos(v"15.0.0")
1430-
@objcwrapper immutable = true MTLCommandQueueDescriptor <: NSObject
1430+
@objcwrapper immutable = false MTLCommandQueueDescriptor <: NSObject
14311431
@objcproperties MTLCommandQueueDescriptor begin
14321432
@autoproperty maxCommandBufferCount::UInt64 setter = setMaxCommandBufferCount
14331433
@autoproperty logState::id{MTLLogState} setter = setLogState
@@ -2759,7 +2759,7 @@ end
27592759
end
27602760

27612761
@static if Metal.is_macos(v"15.0.0")
2762-
@objcwrapper immutable = true MTLLogStateDescriptor <: NSObject
2762+
@objcwrapper immutable = false MTLLogStateDescriptor <: NSObject
27632763
@objcproperties MTLLogStateDescriptor begin
27642764
@autoproperty level::MTLLogLevel setter = setLevel
27652765
@autoproperty bufferSize::Int64 setter = setBufferSize

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
@@ -53,6 +53,9 @@ immutable=false
5353
[api.MTLCommandQueue]
5454
immutable=false
5555

56+
[api.MTLCommandQueueDescriptor]
57+
immutable=false
58+
5659
[api.MTLCompileOptions]
5760
immutable=false
5861
[api.MTLCompileOptions.proptype]
@@ -88,6 +91,9 @@ immutable=false
8891
[api.MTLLibrary]
8992
immutable=false
9093

94+
[api.MTLLogStateDescriptor]
95+
immutable=false
96+
9197
[api.MTLSharedEvent]
9298
immutable=false
9399

0 commit comments

Comments
 (0)