Skip to content

Commit 6a62909

Browse files
christiangnrdtgymnich
authored andcommitted
Make new descriptors mutable
1 parent 4d48e1b commit 6a62909

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

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

14001400
@objcproperties MTLCommandQueueDescriptor begin
14011401
@autoproperty maxCommandBufferCount::UInt64 setter = setMaxCommandBufferCount
@@ -2675,7 +2675,7 @@ end
26752675
MTLLogLevelFault = 5
26762676
end
26772677

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

26802680
@objcproperties MTLLogStateDescriptor begin
26812681
@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)