hxn

CommandBuffer

Records commands until a Device.submit. Not thread-safe: its methods take &mut self.

Static methods

function hxnAdopt(hxnRaw:Handle):CommandBuffer

An object for a value the library returned.

Properties

var hxnRaw:Handle

Methods

function bindPipeline(point:BindPoint, pipeline:Pipeline):Void
function bindDescriptorSet(point:BindPoint, layout:PipelineLayout, index:Int, set:DescriptorSet):Void

Binds set as set index of layout: hxnsl's bind group index.

function dispatch(x:Int, y:Int, z:Int):Void
function bufferBarrier(buffer:Buffer, srcStages:Int, srcAccess:Int, dstStages:Int, dstAccess:Int):Void

A barrier on all of buffer: work in src_stages doing src_access finishes, and its writes are visible, before work in dst_stages doing dst_access starts.

function imageBarrier(image:Image, srcStages:Int, srcAccess:Int, from:Layout, dstStages:Int, dstAccess:Int, to:Layout):Void

A barrier on all of image that also moves it from layout from to to.

function memoryBarrier(srcStages:Int, srcAccess:Int, dstStages:Int, dstAccess:Int):Void

A barrier on all memory, for work that touches more than one resource.

function beginRendering(target:Image, load:LoadOp, red:Float, green:Float, blue:Float, alpha:Float):Void

Begins rendering into target, which must be in the color attachment layout, starting from it as it is, cleared to red, green, blue, alpha, or undefined. Sets the viewport and scissor to all of it.

function endRendering():Void
function bindVertexBuffer(binding:Int, buffer:Buffer, offset:Int64):Void
function draw(count:Int, instances:Int, first:Int):Void

Draws count vertices from first, instances times.

function copyImageToBuffer(image:Image, buffer:Buffer):Void

Copies all of image, which must be in the transfer source layout, into buffer, rows packed.

function close():Void

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