vulkan

package
v0.0.0-...-df451fa Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const MapDelay uint32 = 7

Variables

This section is empty.

Functions

This section is empty.

Types

type Budget

type Budget struct {
	Statistics memutils.Statistics
	Usage      int
	Budget     int
}

func (Budget) PrintJson

func (b Budget) PrintJson(writer *jwriter.Writer)

type CacheOperation

type CacheOperation uint32
const (
	CacheOperationFlush CacheOperation = iota
	CacheOperationInvalidate
)

func (CacheOperation) String

func (o CacheOperation) String() string

type DeviceMemoryProperties

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

func NewDeviceMemoryProperties

func NewDeviceMemoryProperties(
	useMutex bool,
	allocationCallbacks *driver.AllocationCallbacks,
	memoryCallbacks MemoryCallbacks,
	device core1_0.Device,
	physicalDevice core1_0.PhysicalDevice,
	heapSizeLimits []int,
	externalMemoryHandleTypes []khr_external_memory_capabilities.ExternalMemoryHandleTypeFlags,
	extensions *ExtensionData,
) (*DeviceMemoryProperties, error)

func (*DeviceMemoryProperties) AddAllocation

func (m *DeviceMemoryProperties) AddAllocation(heapIndex int, size int)

func (*DeviceMemoryProperties) AllocateVulkanMemory

func (m *DeviceMemoryProperties) AllocateVulkanMemory(
	allocateInfo core1_0.MemoryAllocateInfo,
) (mem *SynchronizedMemory, res common.VkResult, err error)

func (*DeviceMemoryProperties) AllocationCount

func (m *DeviceMemoryProperties) AllocationCount() uint32

func (*DeviceMemoryProperties) CalculateBufferImageGranularity

func (m *DeviceMemoryProperties) CalculateBufferImageGranularity() int

func (*DeviceMemoryProperties) CalculateGlobalMemoryTypeBits

func (m *DeviceMemoryProperties) CalculateGlobalMemoryTypeBits() uint32

func (*DeviceMemoryProperties) DeviceProperties

func (*DeviceMemoryProperties) ExternalMemoryTypes

func (*DeviceMemoryProperties) FlushOrInvalidateAllocations

func (m *DeviceMemoryProperties) FlushOrInvalidateAllocations(memRanges []core1_0.MappedMemoryRange, operation CacheOperation) (common.VkResult, error)

func (*DeviceMemoryProperties) FreeVulkanMemory

func (m *DeviceMemoryProperties) FreeVulkanMemory(memoryType int, size int, memory *SynchronizedMemory)

func (*DeviceMemoryProperties) HeapBudget

func (m *DeviceMemoryProperties) HeapBudget(heapIndex int, budget *Budget)

func (*DeviceMemoryProperties) IsIntegratedGPU

func (m *DeviceMemoryProperties) IsIntegratedGPU() bool

func (*DeviceMemoryProperties) IsMemoryTypeHostNonCoherent

func (m *DeviceMemoryProperties) IsMemoryTypeHostNonCoherent(memoryTypeIndex int) bool

func (*DeviceMemoryProperties) MemoryHeapCount

func (m *DeviceMemoryProperties) MemoryHeapCount() int

func (*DeviceMemoryProperties) MemoryHeapProperties

func (m *DeviceMemoryProperties) MemoryHeapProperties(heapIndex int) core1_0.MemoryHeap

func (*DeviceMemoryProperties) MemoryTypeCount

func (m *DeviceMemoryProperties) MemoryTypeCount() int

func (*DeviceMemoryProperties) MemoryTypeIndexToHeapIndex

func (m *DeviceMemoryProperties) MemoryTypeIndexToHeapIndex(memTypeIndex int) int

func (*DeviceMemoryProperties) MemoryTypeMinimumAlignment

func (m *DeviceMemoryProperties) MemoryTypeMinimumAlignment(memTypeIndex int) uint

func (*DeviceMemoryProperties) MemoryTypeProperties

func (m *DeviceMemoryProperties) MemoryTypeProperties(memoryTypeIndex int) core1_0.MemoryType

func (*DeviceMemoryProperties) RemoveAllocation

func (m *DeviceMemoryProperties) RemoveAllocation(heapIndex int, size int)

func (*DeviceMemoryProperties) UpdateVulkanBudget

func (m *DeviceMemoryProperties) UpdateVulkanBudget()

type ExtensionData

type ExtensionData struct {
	DedicatedAllocations         bool
	ExternalMemory               bool
	GetMemoryRequirements        khr_get_memory_requirements2_shim.Shim
	BindMemory2                  khr_bind_memory2_shim.Shim
	BufferDeviceAddress          khr_buffer_device_address_shim.Shim
	GetPhysicalDeviceProperties2 khr_get_physical_device_properties2_shim.Shim
	UseMemoryBudget              bool
	UseAMDDeviceCoherentMemory   bool
	UseMemoryPriority            bool
	Maintenance4                 khr_maintenance4.Extension
}

func NewExtensionData

func NewExtensionData(device core1_0.Device, physicalDevice core1_0.PhysicalDevice, instance core1_0.Instance) *ExtensionData

type MemoryCallbacks

type MemoryCallbacks interface {
	Allocate(memoryType int, memory core1_0.DeviceMemory, size int)
	Free(memoryType int, memory core1_0.DeviceMemory, size int)
}

type SynchronizedMemory

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

func (*SynchronizedMemory) BindVulkanBuffer

func (m *SynchronizedMemory) BindVulkanBuffer(offset int, buffer core1_0.Buffer, next common.Options) (common.VkResult, error)

func (*SynchronizedMemory) BindVulkanImage

func (m *SynchronizedMemory) BindVulkanImage(offset int, image core1_0.Image, next common.Options) (common.VkResult, error)

func (*SynchronizedMemory) FreeMemory

func (m *SynchronizedMemory) FreeMemory()

func (*SynchronizedMemory) Map

func (m *SynchronizedMemory) Map(references int, offset int, size int, flags core1_0.MemoryMapFlags) (unsafe.Pointer, common.VkResult, error)

func (*SynchronizedMemory) MappedData

func (m *SynchronizedMemory) MappedData() unsafe.Pointer

func (*SynchronizedMemory) RecordSuballocSubfree

func (m *SynchronizedMemory) RecordSuballocSubfree() bool

func (*SynchronizedMemory) References

func (m *SynchronizedMemory) References() int

func (*SynchronizedMemory) Unmap

func (m *SynchronizedMemory) Unmap(references int) error

func (*SynchronizedMemory) VulkanDeviceMemory

func (m *SynchronizedMemory) VulkanDeviceMemory() core1_0.DeviceMemory

Jump to

Keyboard shortcuts

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