hxn

ComputeEncoder

Records compute commands. end closes it before the next encoder or commit.

Static methods

function hxnAdopt(hxnRaw:Handle):ComputeEncoder

An object for a value the library returned.

Properties

var hxnRaw:Handle

Methods

function setPipeline(pipeline:ComputePipeline):Void
function setBuffer(buffer:Buffer, offset:Int64, index:Int):Void

Binds buffer at argument index: the kernel's MSL_SLOTS buffer index.

function setBytes(bytes:Bytes, index:Int):Void

Binds a copy of bytes, up to 4 KiB, at argument index.

function setTexture(texture:Texture, index:Int):Void
function setSampler(sampler:Sampler, index:Int):Void
function dispatchThreads(x:Int, y:Int, z:Int, groupX:Int, groupY:Int, groupZ:Int):Void

Runs x by y by z threads in all, in threadgroups of group_x by group_y by group_z; the last threadgroup in each dimension may be partial.

function dispatchThreadgroups(x:Int, y:Int, z:Int, groupX:Int, groupY:Int, groupZ:Int):Void

Runs x by y by z threadgroups of group_x by group_y by group_z threads.

function end():Void
function close():Void

Releases the native value now. The collector does it otherwise. Using this object afterwards throws.