device

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidAddress = Address(0)

Variables

This section is empty.

Functions

func Memcpy

func Memcpy(dst, src unsafe.Pointer, n int) int

Types

type Address

type Address uint64

type Device

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

func New

func New(instance *instance.Instance, physDevice core1_0.PhysicalDevice) (*Device, error)

func (*Device) Allocate

func (d *Device) Allocate(key string, size int, kind MemoryType) *Memory

func (*Device) Destroy

func (d *Device) Destroy()

func (*Device) GetBufferAddress

func (d *Device) GetBufferAddress(buffer core1_0.Buffer) (Address, error)

func (*Device) GetDepthFormat

func (d *Device) GetDepthFormat() core1_0.Format

func (*Device) GetFormatProperties

func (d *Device) GetFormatProperties(format core1_0.Format) *core1_0.FormatProperties

func (*Device) GetLimits

func (d *Device) GetLimits() core1_0.PhysicalDeviceLimits

func (*Device) Physical

func (d *Device) Physical() core1_0.PhysicalDevice

func (*Device) Ptr

func (d *Device) Ptr() core1_0.Device

func (*Device) Queue

func (d *Device) Queue() Queue

func (*Device) SetDebugObjectName

func (d *Device) SetDebugObjectName(handle driver.VulkanHandle, objType core1_0.ObjectType, name string)

func (*Device) WaitIdle

func (d *Device) WaitIdle()

type Memory

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

func (*Memory) Destroy

func (m *Memory) Destroy()

func (*Memory) Flush

func (m *Memory) Flush()

func (*Memory) Invalidate

func (m *Memory) Invalidate()

func (*Memory) Ptr

func (m *Memory) Ptr() core1_0.DeviceMemory

func (*Memory) Read

func (m *Memory) Read(offset int, target any) int

func (*Memory) Write

func (m *Memory) Write(offset int, data any) int

type MemoryType

type MemoryType int
const (
	MemoryTypeGPU     MemoryType = 1
	MemoryTypeShared  MemoryType = 2
	MemoryTypeCPU     MemoryType = 3
	MemoryTypeTexture MemoryType = 4
)

type Queue

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

func (Queue) FamilyIndex

func (q Queue) FamilyIndex() int

func (Queue) Index

func (q Queue) Index() int

func (Queue) Matches

func (q Queue) Matches(flags core1_0.QueueFlags) bool

func (Queue) Ptr

func (q Queue) Ptr() core1_0.Queue

func (Queue) String

func (q Queue) String() string

type Resource

type Resource[T any] interface {
	Destroy()
	Ptr() T
}

Jump to

Keyboard shortcuts

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