Device
A GPUDevice and its queue.
Static methods
function hxnAdopt(hxnRaw:Handle):DeviceAn object for a value the library returned.
Properties
var hxnRaw:HandleMethods
function createBuffer(size:Int64, usage:Int):BufferA buffer of size bytes, a multiple of 4, for usage (BufferUsage bits).
function createBufferWith(bytes:Bytes, usage:Int):BufferA buffer holding bytes, padded with zeros to a multiple of 4, for usage (BufferUsage bits).
function createTexture(width:Int, height:Int, format:Format, usage:Int):TextureA 2D texture of one level, for usage (TextureUsage bits), with one view of all of it.
function createSampler(filter:Filter, address:AddressMode):SamplerA sampler filtering with filter for magnification, minification and mipmaps, and addressing with address on every axis.
function createShaderModule(wgsl:String):ShaderModuleA shader module of WGSL source.
function createBindGroupLayouts(groups:Array<GroupLayout>):BindGroupLayoutsA bind group layout for each of groups, group 0 first.
function createPipelineLayout(layouts:BindGroupLayouts):PipelineLayoutA pipeline layout of layouts.
function createComputePipeline(module:ShaderModule, entry:String, layout:PipelineLayout, constants:Array<Constant>):ComputePipelineA compute pipeline running entry of module, with constants set.
function createRenderPipeline(module:ShaderModule, vertexEntry:String, fragmentEntry:String, layout:PipelineLayout, format:Format, topology:Topology, stride:Int, attributes:Array<VertexAttribute>, constants:Array<Constant>):RenderPipelineA render pipeline drawing topology into one color target of format, from one vertex buffer of stride bytes per vertex laid out as attributes, with constants set in both stages.
function createBindGroup(layouts:BindGroupLayouts, group:Int, entries:BindGroupEntries):BindGroupBind group group of layouts, of the resources entries holds.
function createCommandEncoder():CommandEncoderAn empty command encoder.
function submit(encoder:CommandEncoder):VoidFinishes encoder and submits its commands to the queue.
function writeBuffer(buffer:Buffer, offset:Int64, bytes:Bytes):VoidWrites bytes, a multiple of 4, at offset in buffer, in queue order.
function writeTexture(texture:Texture, bytes:Bytes, bytesPerRow:Int):VoidWrites all of texture from bytes, rows bytes_per_row apart, in queue order.
function close():VoidReleases the native value now. The collector does it otherwise. Using this object afterwards throws.