Skip to content

Commit c200171

Browse files
committed
add MTLCommandQueueDescriptor
1 parent 6c82916 commit c200171

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

lib/mtl/command_queue.jl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
export MTLCommandQueueDescriptor
2+
3+
@objcwrapper immutable=false MTLCommandQueueDescriptor <: NSObject
4+
5+
@objcproperties MTLCommandQueueDescriptor begin
6+
@autoproperty maxCommandBufferCount::NSUInteger
7+
@autoproperty logState::id{MTLLogState} setter=setLogState
8+
end
9+
10+
function MTLCommandQueueDescriptor()
11+
handle = @objc [MTLCommandQueueDescriptor alloc]::id{MTLCommandQueueDescriptor}
12+
obj = MTLCommandQueueDescriptor(handle)
13+
finalizer(release, obj)
14+
@objc [obj::id{MTLCommandQueueDescriptor} init]::id{MTLCommandQueueDescriptor}
15+
return obj
16+
end
17+
18+
119
export MTLCommandQueue
220

321
@objcwrapper immutable=false MTLCommandQueue <: NSObject
@@ -13,3 +31,10 @@ function MTLCommandQueue(dev::MTLDevice)
1331
finalizer(release, obj)
1432
return obj
1533
end
34+
35+
function MTLCommandQueue(dev::MTLDevice, descriptor::MTLCommandQueueDescriptor)
36+
handle = @objc [dev::id{MTLDevice} newCommandQueueWithDescriptor:descriptor::id{MTLCommandQueueDescriptor}]::id{MTLCommandQueue}
37+
obj = MTLCommandQueue(handle)
38+
finalizer(release, obj)
39+
return obj
40+
end

0 commit comments

Comments
 (0)