command

package
v0.0.0-...-8e5a076 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2024 License: GPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func (*Buffer) Begin

func (b *Buffer) Begin()

func (*Buffer) CmdBeginRenderPass

func (b *Buffer) CmdBeginRenderPass(pass *renderpass.Renderpass, framebuffer *framebuffer.Framebuffer)

func (*Buffer) CmdBindGraphicsDescriptor

func (b *Buffer) CmdBindGraphicsDescriptor(layout *pipeline.Layout, index int, set descriptor.Set)

func (*Buffer) CmdBindGraphicsPipeline

func (b *Buffer) CmdBindGraphicsPipeline(pipe *pipeline.Pipeline)

func (*Buffer) CmdBindIndexBuffers

func (b *Buffer) CmdBindIndexBuffers(idx buffer.T, offset int, kind core1_0.IndexType)

func (*Buffer) CmdBindVertexBuffer

func (b *Buffer) CmdBindVertexBuffer(vtx buffer.T, offset int)

func (*Buffer) CmdConvertImage

func (b *Buffer) CmdConvertImage(src *image.Image, srcLayout core1_0.ImageLayout, dst *image.Image, dstLayout core1_0.ImageLayout, aspects core1_0.ImageAspectFlags)

func (*Buffer) CmdCopyBuffer

func (b *Buffer) CmdCopyBuffer(src, dst buffer.T, regions ...core1_0.BufferCopy)

func (*Buffer) CmdCopyBufferToImage

func (b *Buffer) CmdCopyBufferToImage(source buffer.T, dst *image.Image, layout core1_0.ImageLayout)

func (*Buffer) CmdCopyImage

func (b *Buffer) CmdCopyImage(src *image.Image, srcLayout core1_0.ImageLayout, dst *image.Image, dstLayout core1_0.ImageLayout, aspects core1_0.ImageAspectFlags)

func (*Buffer) CmdCopyImageToBuffer

func (b *Buffer) CmdCopyImageToBuffer(src *image.Image, srcLayout core1_0.ImageLayout, aspects core1_0.ImageAspectFlags, dst buffer.T)

func (*Buffer) CmdDraw

func (b *Buffer) CmdDraw(cmd Draw)

func (*Buffer) CmdDrawIndexed

func (b *Buffer) CmdDrawIndexed(cmd DrawIndexed)

func (*Buffer) CmdDrawIndexedIndirect

func (b *Buffer) CmdDrawIndexedIndirect(buffer buffer.T, offset, count, stride int)

func (*Buffer) CmdDrawIndirect

func (b *Buffer) CmdDrawIndirect(buffer buffer.T, offset, count, stride int)

func (*Buffer) CmdEndRenderPass

func (b *Buffer) CmdEndRenderPass()

func (*Buffer) CmdImageBarrier

func (b *Buffer) CmdImageBarrier(srcMask, dstMask core1_0.PipelineStageFlags, image *image.Image, oldLayout, newLayout core1_0.ImageLayout, aspects core1_0.ImageAspectFlags, mipLevel, levels int)

func (*Buffer) CmdNextSubpass

func (b *Buffer) CmdNextSubpass()

func (*Buffer) CmdPushConstant

func (b *Buffer) CmdPushConstant(stages core1_0.ShaderStageFlags, offset int, value any)

func (*Buffer) CmdSetScissor

func (b *Buffer) CmdSetScissor(x, y, w, h int) core1_0.Rect2D

func (*Buffer) CmdSetViewport

func (b *Buffer) CmdSetViewport(x, y, w, h int) core1_0.Viewport

func (*Buffer) Destroy

func (b *Buffer) Destroy()

func (*Buffer) End

func (b *Buffer) End()

func (*Buffer) Ptr

func (b *Buffer) Ptr() core1_0.CommandBuffer

func (*Buffer) Reset

func (b *Buffer) Reset()

type Channel

type Channel struct {
	// contains filtered or unexported fields
}

func NewChannel

func NewChannel(buffer int) *Channel

func (*Channel) Close

func (ch *Channel) Close()

Aborts the worker, cancelling any pending work.

func (*Channel) Flush

func (ch *Channel) Flush()

Flush blocks the caller until all pending work is completed

func (*Channel) Invoke

func (ch *Channel) Invoke(callback WorkFunc)

Invoke schedules a callback to be called from the worker thread

func (*Channel) InvokeSync

func (ch *Channel) InvokeSync(callback WorkFunc)

InvokeSync schedules a callback to be called on the worker thread, and blocks until the callback is finished.

func (*Channel) Recv

func (ch *Channel) Recv() <-chan WorkFunc

func (*Channel) Stop

func (ch *Channel) Stop()

Stop the worker and release any resources. Blocks until all work in completed.

type CommandFn

type CommandFn func(*Buffer)

type Draw

type Draw struct {
	VertexCount    uint32
	InstanceCount  uint32
	VertexOffset   int32
	InstanceOffset uint32
}

type DrawBuffer

type DrawBuffer interface {
	CmdDraw(Draw)
}

type DrawIndexed

type DrawIndexed struct {
	IndexCount     uint32
	InstanceCount  uint32
	IndexOffset    uint32
	VertexOffset   int32
	InstanceOffset uint32
}

type DrawIndexedBuffer

type DrawIndexedBuffer interface {
	CmdDrawIndexed(DrawIndexed)
}

type IndirectDrawBuffer

type IndirectDrawBuffer struct {
	// contains filtered or unexported fields
}

func NewIndirectDrawBuffer

func NewIndirectDrawBuffer(dev *device.Device, key string, size int) *IndirectDrawBuffer

func (*IndirectDrawBuffer) BeginDrawIndirect

func (i *IndirectDrawBuffer) BeginDrawIndirect()

func (*IndirectDrawBuffer) CmdDraw

func (i *IndirectDrawBuffer) CmdDraw(cmd Draw)

func (*IndirectDrawBuffer) Destroy

func (i *IndirectDrawBuffer) Destroy()

func (*IndirectDrawBuffer) EndDrawIndirect

func (i *IndirectDrawBuffer) EndDrawIndirect(cmd *Buffer)

func (*IndirectDrawBuffer) Flush

func (i *IndirectDrawBuffer) Flush()

func (*IndirectDrawBuffer) Reset

func (i *IndirectDrawBuffer) Reset()

type IndirectDrawIndexedBuffer

type IndirectDrawIndexedBuffer struct {
	// contains filtered or unexported fields
}

func NewIndirectDrawIndexedBuffer

func NewIndirectDrawIndexedBuffer(dev *device.Device, key string, size int) *IndirectDrawIndexedBuffer

func (*IndirectDrawIndexedBuffer) BeginDrawIndirect

func (i *IndirectDrawIndexedBuffer) BeginDrawIndirect()

func (*IndirectDrawIndexedBuffer) CmdDrawIndexed

func (i *IndirectDrawIndexedBuffer) CmdDrawIndexed(cmd DrawIndexed)

func (*IndirectDrawIndexedBuffer) Destroy

func (i *IndirectDrawIndexedBuffer) Destroy()

func (*IndirectDrawIndexedBuffer) EndDrawIndirect

func (i *IndirectDrawIndexedBuffer) EndDrawIndirect(cmd *Buffer)

func (*IndirectDrawIndexedBuffer) Flush

func (i *IndirectDrawIndexedBuffer) Flush()

func (*IndirectDrawIndexedBuffer) Reset

func (i *IndirectDrawIndexedBuffer) Reset()

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool(device *device.Device, flags core1_0.CommandPoolCreateFlags, queueFamilyIdx int) *Pool

func (*Pool) Allocate

func (p *Pool) Allocate(level core1_0.CommandBufferLevel) *Buffer

func (*Pool) AllocateBuffers

func (p *Pool) AllocateBuffers(level core1_0.CommandBufferLevel, count int) []*Buffer

func (*Pool) Destroy

func (p *Pool) Destroy()

func (*Pool) Ptr

func (p *Pool) Ptr() core1_0.CommandPool

type Recorder

type Recorder interface {
	Record(CommandFn)
	Apply(*Buffer)
}
var Empty Recorder = empty{}

func NewRecorder

func NewRecorder() Recorder

type SubmitInfo

type SubmitInfo struct {
	Commands Recorder
	Marker   string
	Wait     []Wait
	Signal   []*sync.Semaphore
	Callback func()
}

type Wait

type Wait struct {
	Semaphore *sync.Semaphore
	Mask      core1_0.PipelineStageFlags
}

type WorkFunc

type WorkFunc func()

type Worker

type Worker interface {
	Submit(SubmitInfo)
	Destroy()
	Flush()
	Invoke(func())
}

Workers manage a command pool thread

func NewWorker

func NewWorker(device *device.Device, name string, queue device.Queue) Worker

type Workers

type Workers []Worker

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL