Help us shape the future of Go! Take the 2026 Go Developer Survey

pureVK

package module
v0.0.0-...-c0eee5b Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

README

pureVK - it is still falling on vector add test

dlopen on vulkan

shader must be compile by command glslc vector_add.comp -o vector_add.comp.spv

Documentation

Index

Constants

View Source
const (
	VK_BUFFER_USAGE_TRANSFER_SRC_BIT uint32 = 0x00000001 << iota
	VK_BUFFER_USAGE_TRANSFER_DST_BIT
	VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
	VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
	VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT
	VK_BUFFER_USAGE_VERTEX_BUFFER_BIT
	VK_BUFFER_USAGE_INDEX_BUFFER_BIT
	VK_BUFFER_USAGE_STORAGE_BUFFER_BIT
	VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT
	VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT = 0x00020000 // Toto nie je sekvenčné
)

Buffer Usage Flags

View Source
const (
	VK_WHOLE_SIZE                       uint64                = ^uint64(0)
	VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT VkMemoryPropertyFlags = 4
)
View Source
const (
	VK_API_VERSION_1_0 = (1 << 22) | (0 << 12)
)

API Versions

Variables

This section is empty.

Functions

func ErrJoin

func ErrJoin(e1, e2 error) error

func HandleVkResult

func HandleVkResult(result VkResult) string

func LoadVulkanLibrary

func LoadVulkanLibrary() error

📌 Upravená funkcia na načítanie Vulkan knižnice

func ReadSPIRVFromFile

func ReadSPIRVFromFile(filename string) ([]uint32, error)

Funkcia na načítanie SPIR-V kódu zo súboru

func UnloadVulkanLibrary

func UnloadVulkanLibrary()

func VK_MAKE_VERSION

func VK_MAKE_VERSION(major, minor, patch uint32) uint32

func VkDestroyBuffer

func VkDestroyBuffer(device VulkanDevice, buffer VulkanBuffer, callback *VkAllocationCallbacks) error

func VkDestroyCommandPool

func VkDestroyCommandPool(device VulkanDevice, commandPool VulkanCommandPool, callback *VkAllocationCallbacks) error

func VkDestroyDescriptorPool

func VkDestroyDescriptorPool(device VulkanDevice, descriptorPool VulkanDescriptorPool, callback *VkAllocationCallbacks) error

func VkDestroyDescriptorSetLayout

func VkDestroyDescriptorSetLayout(device VulkanDevice, descriptorSetLayout VulkanDescriptorSetLayout, callback *VkAllocationCallbacks) error

func VkDestroyDevice

func VkDestroyDevice(device VulkanDevice, callback *VkAllocationCallbacks) error

func VkDestroyImage

func VkDestroyImage(device VulkanDevice, image VulkanImage, callback *VkAllocationCallbacks) error

func VkDestroyInstance

func VkDestroyInstance(instance VulkanInstance, callback *VkAllocationCallbacks) error

func VkDestroyPipeline

func VkDestroyPipeline(device VulkanDevice, pipeline VulkanPipeline, callback *VkAllocationCallbacks) error

func VkDestroyPipelineLayout

func VkDestroyPipelineLayout(device VulkanDevice, pipelineLayout VulkanPipelineLayout, callback *VkAllocationCallbacks) error

func VkDestroyShaderModule

func VkDestroyShaderModule(device VulkanDevice, shaderModule VulkanShaderModule, callback *VkAllocationCallbacks) error

func VkFreeMemory

func VkFreeMemory(device VulkanDevice, memory VulkanDeviceMemory, allocator *VkAllocationCallbacks) error

func VkGetPhysicalDeviceProperties

func VkGetPhysicalDeviceProperties(physicDevice VulkanPhysicalDevice, deviceProperties *VkPhysicalDeviceProperties) error

func VkUpdateDescriptorSets

func VkUpdateDescriptorSets(device VulkanDevice, f uint32, dWSet *VkWriteDescriptorSet, f2 uint32, dCSet *VkCopyDescriptorSet) error

Types

type BufferData

type BufferData struct {
	TypeSize uintptr
	DataSize uintptr
	Pointer  unsafe.Pointer
}

func GetBufferData

func GetBufferData[T any](data []T) *BufferData

type ImageData

type ImageData struct {
	BufferData *BufferData
	Origin     [3]uint32
	Region     [3]uint32
	RowPitch   uint32
	SlicePitch uint32
}

type VkAllocationCallbacks

type VkAllocationCallbacks struct {
	PUserData       uintptr
	PfnAllocation   uintptr
	PfnReallocation uintptr
	PfnFree         uintptr
	PfnInternal     uintptr
}

Vulkan alokačné callbacky (nepovinné, môže byť nil)

type VkApplicationInfo

type VkApplicationInfo struct {
	SType              VkStructureType
	PNext              unsafe.Pointer
	PApplicationName   *byte
	ApplicationVersion uint32
	PEngineName        *byte
	EngineVersion      uint32
	ApiVersion         uint32
}

Vulkan Application Info

type VkBool32

type VkBool32 uint32
const (
	VK_FALSE VkBool32 = 0
	VK_TRUE  VkBool32 = 1
)

Boolean Values

type VkBufferCreateInfo

type VkBufferCreateInfo struct {
	SType                 VkStructureType
	PNext                 unsafe.Pointer
	Flags                 uint32
	Size                  uint64
	Usage                 uint32
	SharingMode           uint32
	QueueFamilyIndexCount uint32
	PQueueFamilyIndices   *uint32
}

Vulkan Buffer Create Info

type VkCommandBufferAllocateInfo

type VkCommandBufferAllocateInfo struct {
	SType              VkStructureType
	PNext              unsafe.Pointer
	CommandPool        VulkanCommandPool
	Level              VkCommandBufferLevel
	CommandBufferCount uint32
}

type VkCommandBufferBeginInfo

type VkCommandBufferBeginInfo struct {
	SType            VkStructureType
	Flags            VkCommandBufferUsageFlags // Pre staršie verzie
	PInheritanceInfo *VkCommandBufferInheritanceInfo
	Usage            VkCommandBufferUsageFlags // Pre Vulkan 1.2 a novšie
}

type VkCommandBufferInheritanceInfo

type VkCommandBufferInheritanceInfo struct {
	SType                VkStructureType
	PNext                unsafe.Pointer
	RenderPass           VulkanRenderPass
	Subpass              uint32
	Framebuffer          VulkanFramebuffer
	OcclusionQueryEnable VkBool32
	QueryFlags           VkQueryControlFlags
	PipelineStatistics   VkQueryPipelineStatisticFlags
}

type VkCommandBufferLevel

type VkCommandBufferLevel uint32
const (
	VK_COMMAND_BUFFER_LEVEL_PRIMARY VkCommandBufferLevel = 0
)

type VkCommandBufferUsageFlags

type VkCommandBufferUsageFlags uint32
const VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT VkCommandBufferUsageFlags = 1

type VkCommandPoolCreateInfo

type VkCommandPoolCreateInfo struct {
	SType            VkStructureType
	PNext            unsafe.Pointer
	Flags            uint32
	QueueFamilyIndex uint32
}

Vulkan Command Pool Create Info

type VkComputePipelineCreateInfo

type VkComputePipelineCreateInfo struct {
	SType              VkStructureType
	PNext              unsafe.Pointer
	Flags              VkPipelineCreateFlags
	Stage              VkPipelineShaderStageCreateInfo
	Layout             VulkanPipelineLayout
	BasePipelineHandle VulkanPipeline
	BasePipelineIndex  int32
}

type VkCopyDescriptorSet

type VkCopyDescriptorSet struct {
	SType           uint32
	PNext           uintptr
	SrcSet          VulkanDescriptorSet
	SrcBinding      uint32
	SrcArrayElement uint32
	DstSet          VulkanDescriptorSet
	DstBinding      uint32
	DstArrayElement uint32
	DescriptorCount uint32
}

type VkDescriptorBufferInfo

type VkDescriptorBufferInfo struct {
	Buffer VulkanBuffer
	Offset uint64
	Range  uint64
}

type VkDescriptorImageInfo

type VkDescriptorImageInfo struct {
	Sampler     VulkanSampler
	ImageView   VulkanImageView
	ImageLayout VkImageLayout
}

type VkDescriptorPoolCreateFlags

type VkDescriptorPoolCreateFlags uint32
const (
	VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT VkDescriptorPoolCreateFlags = 0x00000001 << iota
	VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
)

Descriptor Pool Create Flags

type VkDescriptorPoolCreateInfo

type VkDescriptorPoolCreateInfo struct {
	SType         VkStructureType
	PNext         unsafe.Pointer
	Flags         VkDescriptorPoolCreateFlags
	MaxSets       uint32
	PoolSizeCount uint32
	PPoolSizes    *VkDescriptorPoolSize
}

type VkDescriptorPoolSize

type VkDescriptorPoolSize struct {
	Type            VkDescriptorType
	DescriptorCount uint32
}

type VkDescriptorSetAllocateInfo

type VkDescriptorSetAllocateInfo struct {
	SType              VkStructureType
	PNext              unsafe.Pointer
	DescriptorPool     VulkanDescriptorPool
	DescriptorSetCount uint32
	PSetLayouts        *VulkanDescriptorSetLayout
}

type VkDescriptorSetLayoutBinding

type VkDescriptorSetLayoutBinding struct {
	Binding            uint32
	DescriptorType     VkDescriptorType
	DescriptorCount    uint32
	StageFlags         VkShaderStageFlagBits
	PImmutableSamplers *VulkanSampler
}

type VkDescriptorSetLayoutCreateFlags

type VkDescriptorSetLayoutCreateFlags uint32

type VkDescriptorSetLayoutCreateInfo

type VkDescriptorSetLayoutCreateInfo struct {
	SType        VkStructureType
	PNext        unsafe.Pointer
	Flags        VkDescriptorSetLayoutCreateFlags
	BindingCount uint32
	PBindings    *VkDescriptorSetLayoutBinding
}

type VkDescriptorType

type VkDescriptorType uint32
const (
	VK_DESCRIPTOR_TYPE_SAMPLER VkDescriptorType = iota
	VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
	VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
	VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
	VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
	VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
	VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
	VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
	VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
	VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
	VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
)

Descriptor Types

type VkDeviceCreateInfo

type VkDeviceCreateInfo struct {
	SType                   VkStructureType
	PNext                   unsafe.Pointer
	Flags                   uint32
	QueueCreateInfoCount    uint32
	PQueueCreateInfos       unsafe.Pointer
	EnabledLayerCount       uint32
	PpEnabledLayerNames     **byte
	EnabledExtensionCount   uint32
	PpEnabledExtensionNames **byte
	PEnabledFeatures        *VkPhysicalDeviceFeatures
}

Vulkan Device Create Info

type VkDeviceQueueCreateInfo

type VkDeviceQueueCreateInfo struct {
	SType            VkStructureType
	PNext            unsafe.Pointer
	Flags            uint32
	QueueFamilyIndex uint32
	QueueCount       uint32
	PQueuePriorities *float32
}

type VkFenceCreateInfo

type VkFenceCreateInfo struct {
	SType VkStructureType
	PNext unsafe.Pointer
	Flags uint32
}

Vulkan Fence Create Info

type VkImageCreateInfo

type VkImageCreateInfo struct {
	SType                 VkStructureType
	PNext                 unsafe.Pointer
	Flags                 uint32
	ImageType             uint32
	Format                uint32
	Extent                [3]uint32
	MipLevels             uint32
	ArrayLayers           uint32
	Samples               uint32
	Tiling                uint32
	Usage                 uint32
	SharingMode           uint32
	QueueFamilyIndexCount uint32
	PQueueFamilyIndices   *uint32
	InitialLayout         uint32
}

Vulkan Image Create Info

type VkImageLayout

type VkImageLayout uint32

type VkInstanceCreateInfo

type VkInstanceCreateInfo struct {
	SType                   VkStructureType
	PNext                   unsafe.Pointer
	Flags                   uint32
	PApplicationInfo        *VkApplicationInfo
	EnabledLayerCount       uint32
	PpEnabledLayerNames     **byte
	EnabledExtensionCount   uint32
	PpEnabledExtensionNames **byte
}

Vulkan Instance Create Info

type VkMemoryAllocateInfo

type VkMemoryAllocateInfo struct {
	SType           VkStructureType
	PNext           unsafe.Pointer
	AllocationSize  uint64
	MemoryTypeIndex uint32
}

type VkMemoryHeap

type VkMemoryHeap struct {
	Size  uint64
	Flags VkMemoryHeapFlags
}

type VkMemoryHeapFlags

type VkMemoryHeapFlags uint32

type VkMemoryMapFlags

type VkMemoryMapFlags uint32

type VkMemoryPropertyFlags

type VkMemoryPropertyFlags uint32
const (
	VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT  VkMemoryPropertyFlags = 1
	VK_MEMORY_PROPERTY_HOST_COHERENT_BIT VkMemoryPropertyFlags = 2
)

type VkMemoryRequirements

type VkMemoryRequirements struct {
	Size           uint64
	Alignment      uint64
	MemoryTypeBits uint32
}

type VkMemoryType

type VkMemoryType struct {
	PropertyFlags VkMemoryPropertyFlags
	HeapIndex     uint32
}

type VkPhysicalDeviceFeatures

type VkPhysicalDeviceFeatures struct {
	RobustBufferAccess                      VkBool32
	FullDrawIndexUint32                     VkBool32
	ImageCubeArray                          VkBool32
	IndependentBlend                        VkBool32
	GeometryShader                          VkBool32
	TessellationShader                      VkBool32
	SampleRateShading                       VkBool32
	DualSrcBlend                            VkBool32
	LogicOp                                 VkBool32
	MultiDrawIndirect                       VkBool32
	DrawIndirectFirstInstance               VkBool32
	DepthClamp                              VkBool32
	DepthBiasClamp                          VkBool32
	FillModeNonSolid                        VkBool32
	DepthBounds                             VkBool32
	WideLines                               VkBool32
	LargePoints                             VkBool32
	AlphaToOne                              VkBool32
	MultiViewport                           VkBool32
	SamplerAnisotropy                       VkBool32
	TextureCompressionETC2                  VkBool32
	TextureCompressionASTC_LDR              VkBool32
	TextureCompressionBC                    VkBool32
	OcclusionQueryPrecise                   VkBool32
	PipelineStatisticsQuery                 VkBool32
	VertexPipelineStoresAndAtomics          VkBool32
	FragmentStoresAndAtomics                VkBool32
	ShaderTessellationAndGeometryPointSize  VkBool32
	ShaderImageGatherExtended               VkBool32
	ShaderStorageImageExtendedFormats       VkBool32
	ShaderStorageImageMultisample           VkBool32
	ShaderStorageImageReadWithoutFormat     VkBool32
	ShaderStorageImageWriteWithoutFormat    VkBool32
	ShaderUniformBufferArrayDynamicIndexing VkBool32
	ShaderSampledImageArrayDynamicIndexing  VkBool32
	ShaderStorageBufferArrayDynamicIndexing VkBool32
	ShaderStorageImageArrayDynamicIndexing  VkBool32
	ShaderClipDistance                      VkBool32
	ShaderCullDistance                      VkBool32
	ShaderFloat64                           VkBool32
	ShaderInt64                             VkBool32
	ShaderInt16                             VkBool32
	ShaderResourceResidency                 VkBool32
	ShaderResourceMinLod                    VkBool32
	SparseBinding                           VkBool32
	SparseResidencyBuffer                   VkBool32
	SparseResidencyImage2D                  VkBool32
	SparseResidencyImage3D                  VkBool32
	SparseResidency2Samples                 VkBool32
	SparseResidency4Samples                 VkBool32
	SparseResidency8Samples                 VkBool32
	SparseResidency16Samples                VkBool32
	SparseResidencyAliased                  VkBool32
	VariableMultisampleRate                 VkBool32
	InheritedQueries                        VkBool32
}

type VkPhysicalDeviceLimits

type VkPhysicalDeviceLimits struct {
	MaxImageDimension1D    uint32
	MaxImageDimension2D    uint32
	MaxImageDimension3D    uint32
	MaxImageDimensionCube  uint32
	MaxImageArrayLayers    uint32
	MaxTexelBufferElements uint32
	MaxUniformBufferRange  uint32
	MaxStorageBufferRange  uint32
	MaxPushConstantsSize   uint32
}

type VkPhysicalDeviceMemoryProperties

type VkPhysicalDeviceMemoryProperties struct {
	MemoryTypeCount uint32
	MemoryTypes     [32]VkMemoryType
	MemoryHeapCount uint32
	MemoryHeaps     [16]VkMemoryHeap
}

type VkPhysicalDeviceProperties

type VkPhysicalDeviceProperties struct {
	ApiVersion        uint32
	DriverVersion     uint32
	VendorID          uint32
	DeviceID          uint32
	DeviceType        VkPhysicalDeviceType
	DeviceName        [256]byte
	PipelineCacheUUID [16]byte
	Limits            VkPhysicalDeviceLimits
	SparseProperties  VkPhysicalDeviceSparseProperties
}

type VkPhysicalDeviceSparseProperties

type VkPhysicalDeviceSparseProperties struct {
	ResidencyStandard2DBlockShape            VkBool32
	ResidencyStandard2DMultisampleBlockShape VkBool32
	ResidencyStandard3DBlockShape            VkBool32
	ResidencyAlignedMipSize                  VkBool32
	ResidencyNonResidentStrict               VkBool32
}

type VkPhysicalDeviceType

type VkPhysicalDeviceType uint32
const (
	VK_PHYSICAL_DEVICE_TYPE_OTHER VkPhysicalDeviceType = iota
	VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
	VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
	VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU
	VK_PHYSICAL_DEVICE_TYPE_CPU
)

Physical Device Types

type VkPipelineBindPoint

type VkPipelineBindPoint uint32
const (
	VK_PIPELINE_BIND_POINT_COMPUTE VkPipelineBindPoint = 2
)

type VkPipelineCreateFlags

type VkPipelineCreateFlags uint32

type VkPipelineLayoutCreateFlags

type VkPipelineLayoutCreateFlags uint32

type VkPipelineLayoutCreateInfo

type VkPipelineLayoutCreateInfo struct {
	SType                  VkStructureType
	PNext                  unsafe.Pointer
	Flags                  VkPipelineLayoutCreateFlags
	SetLayoutCount         uint32
	PSetLayouts            *VulkanDescriptorSetLayout
	PushConstantRangeCount uint32
	PPushConstantRanges    *VkPushConstantRange
}

type VkPipelineShaderStageCreateFlags

type VkPipelineShaderStageCreateFlags uint32

type VkPipelineShaderStageCreateInfo

type VkPipelineShaderStageCreateInfo struct {
	SType               VkStructureType
	PNext               unsafe.Pointer
	Flags               VkPipelineShaderStageCreateFlags
	Stage               VkShaderStageFlagBits
	Module              VulkanShaderModule
	PName               *byte // C-string (napr. "main")
	PSpecializationInfo *VkSpecializationInfo
}

type VkPipelineStageFlags

type VkPipelineStageFlags uint32

type VkPushConstantRange

type VkPushConstantRange struct {
	StageFlags VkShaderStageFlagBits
	Offset     uint32
	Size       uint32
}

type VkQueryControlFlags

type VkQueryControlFlags uint32

type VkQueryPipelineStatisticFlags

type VkQueryPipelineStatisticFlags uint32

type VkResult

type VkResult int32

Vulkan základné typy

const (
	VK_SUCCESS                                            VkResult = 0
	VK_NOT_READY                                          VkResult = 1
	VK_TIMEOUT                                            VkResult = 2
	VK_EVENT_SET                                          VkResult = 3
	VK_EVENT_RESET                                        VkResult = 4
	VK_INCOMPLETE                                         VkResult = 5
	VK_SUBOPTIMAL_KHR                                     VkResult = 1000001003
	VK_ERROR_OUT_OF_HOST_MEMORY                           VkResult = -1
	VK_ERROR_OUT_OF_DEVICE_MEMORY                         VkResult = -2
	VK_ERROR_INITIALIZATION_FAILED                        VkResult = -3
	VK_ERROR_DEVICE_LOST                                  VkResult = -4
	VK_ERROR_MEMORY_MAP_FAILED                            VkResult = -5
	VK_ERROR_LAYER_NOT_PRESENT                            VkResult = -6
	VK_ERROR_EXTENSION_NOT_PRESENT                        VkResult = -7
	VK_ERROR_FEATURE_NOT_PRESENT                          VkResult = -8
	VK_ERROR_INCOMPATIBLE_DRIVER                          VkResult = -9
	VK_ERROR_TOO_MANY_OBJECTS                             VkResult = -10
	VK_ERROR_FORMAT_NOT_SUPPORTED                         VkResult = -11
	VK_ERROR_FRAGMENTED_POOL                              VkResult = -12
	VK_ERROR_OUT_OF_DEVICE_MEMORY_SPECIFIC                VkResult = -13
	VK_ERROR_SURFACE_LOST_KHR                             VkResult = -1000000000
	VK_ERROR_NATIVE_WINDOW_IN_USE_KHR                     VkResult = -1000000001
	VK_ERROR_OUT_OF_DATE_KHR                              VkResult = -1000001004
	VK_ERROR_INCOMPATIBLE_DISPLAY_KHR                     VkResult = -1000003001
	VK_ERROR_INVALID_SHADER_NV                            VkResult = -1000012000
	VK_ERROR_OUT_OF_POOL_MEMORY                           VkResult = -1000069000
	VK_ERROR_INVALID_EXTERNAL_HANDLE                      VkResult = -1000072003
	VK_ERROR_FRAGMENTATION                                VkResult = -1000161000
	VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS               VkResult = -1000257000
	VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT                VkResult = -1000297000
	VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT          VkResult = -1000255001
	VK_ERROR_VALIDATION_FAILED_EXT                        VkResult = -1000011001
	VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT VkResult = -1000158007
	VK_ERROR_NOT_PERMITTED_EXT                            VkResult = -1000174001
	VK_ERROR_INVALID_DEVICE_ADDRESS_EXT                   VkResult = -1000257001
	VK_ERROR_COMPRESSION_EXHAUSTED_EXT                    VkResult = -1000338000
	VK_ERROR_UNKNOWN                                      VkResult = -9
)

func VkAllocateCommandBuffers

func VkAllocateCommandBuffers(device VulkanDevice, aInfo *VkCommandBufferAllocateInfo, cBuffer *VulkanCommandBuffer) (VkResult, error)

func VkAllocateDescriptorSets

func VkAllocateDescriptorSets(device VulkanDevice, aInfo *VkDescriptorSetAllocateInfo, dSet *VulkanDescriptorSet) (VkResult, error)

func VkAllocateMemory

func VkAllocateMemory(device VulkanDevice, allocateInfo *VkMemoryAllocateInfo, allocator *VkAllocationCallbacks, memory *VulkanDeviceMemory) (VkResult, error)

func VkBeginCommandBuffer

func VkBeginCommandBuffer(cBuffer VulkanCommandBuffer, bInfo *VkCommandBufferBeginInfo) (VkResult, error)

func VkBindBufferMemory

func VkBindBufferMemory(device VulkanDevice, buffer VulkanBuffer, memory VulkanDeviceMemory, memoryOffset uint64) (VkResult, error)

func VkCmdBindDescriptorSets

func VkCmdBindDescriptorSets(commandBuffer VulkanCommandBuffer, pipelineBindPoint VkPipelineBindPoint, pipelineLayout VulkanPipelineLayout, firstSet uint32, descriptorSetCount uint32, descriptorSets *VulkanDescriptorSet, dynamicOffsetCount uint32, dynamicOffsets *uint32) (VkResult, error)

func VkCmdBindPipeline

func VkCmdBindPipeline(commandBuffer VulkanCommandBuffer, pipelineBindPoint VkPipelineBindPoint, pipeline VulkanPipeline) (VkResult, error)

func VkCmdDispatch

func VkCmdDispatch(commandBuffer VulkanCommandBuffer, groupCountX uint32, groupCountY uint32, groupCountZ uint32) (VkResult, error)

func VkCreateBuffer

func VkCreateBuffer(device VulkanDevice, info *VkBufferCreateInfo, callback *VkAllocationCallbacks, buffer *VulkanBuffer) (VkResult, error)

func VkCreateCommandPool

func VkCreateCommandPool(device VulkanDevice, info *VkCommandPoolCreateInfo, callback *VkAllocationCallbacks, comandPool *VulkanCommandPool) (VkResult, error)

func VkCreateComputePipelines

func VkCreateComputePipelines(device VulkanDevice, cache VulkanPipelineCache, f uint32, pCInfo *VkComputePipelineCreateInfo, callback *VkAllocationCallbacks, pipeline *VulkanPipeline) (VkResult, error)

func VkCreateDescriptorPool

func VkCreateDescriptorPool(device VulkanDevice, info *VkDescriptorPoolCreateInfo, callback *VkAllocationCallbacks, dPool *VulkanDescriptorPool) (VkResult, error)

func VkCreateDevice

func VkCreateDevice(device0 VulkanPhysicalDevice, info *VkDeviceCreateInfo, callback *VkAllocationCallbacks, device *VulkanDevice) (VkResult, error)

func VkCreateFence

func VkCreateFence(device VulkanDevice, fInfo *VkFenceCreateInfo, callback *VkAllocationCallbacks, fence *VulkanFence) (VkResult, error)

func VkCreateImage

func VkCreateImage(device VulkanDevice, info *VkImageCreateInfo, callback *VkAllocationCallbacks, image *VulkanImage) (VkResult, error)

func VkCreateInstance

func VkCreateInstance(instanceInfo *VkInstanceCreateInfo, callback *VkAllocationCallbacks, instance *VulkanInstance) (VkResult, error)

func VkCreatePipelineLayout

func VkCreatePipelineLayout(device VulkanDevice, cInfo *VkPipelineLayoutCreateInfo, callback *VkAllocationCallbacks, pipelineLayout *VulkanPipelineLayout) (VkResult, error)

func VkCreateShaderModule

func VkCreateShaderModule(device VulkanDevice, info *VkShaderModuleCreateInfo, callback *VkAllocationCallbacks, module *VulkanShaderModule) (VkResult, error)

func VkEndCommandBuffer

func VkEndCommandBuffer(cBuffer VulkanCommandBuffer) (VkResult, error)

func VkEnumerateDevices

func VkEnumerateDevices(instance VulkanInstance, number *uint32, device *VulkanPhysicalDevice) (VkResult, error)

func VkEnumeratePhysicalDevices

func VkEnumeratePhysicalDevices(instance VulkanInstance, physicalDeviceCount *uint32, physicalDevices *VulkanPhysicalDevice) (VkResult, error)

func VkGetBufferMemoryRequirements

func VkGetBufferMemoryRequirements(device VulkanDevice, buffer VulkanBuffer, memoryRequirements *VkMemoryRequirements) (VkResult, error)

func VkGetDeviceQueue

func VkGetDeviceQueue(device VulkanDevice, queueFamilyIndex uint32, queueIndex uint32, queue *VulkanQueue) (VkResult, error)

func VkGetPhysicalDeviceMemoryProperties

func VkGetPhysicalDeviceMemoryProperties(physicalDevice VulkanPhysicalDevice, memoryProperties *VkPhysicalDeviceMemoryProperties) (VkResult, error)

func VkMapMemory

func VkMapMemory(device VulkanDevice, memory VulkanDeviceMemory, offset uint64, size uint64, flags VkMemoryMapFlags, ppData *unsafe.Pointer) (VkResult, error)

func VkQueueSubmit

func VkQueueSubmit(queue VulkanQueue, f uint32, sInfo *VkSubmitInfo, fence VulkanFence) (VkResult, error)

func VkQueueWaitIdle

func VkQueueWaitIdle(queue VulkanQueue) (VkResult, error)

func VkUnmapMemory

func VkUnmapMemory(device VulkanDevice, memory VulkanDeviceMemory) (VkResult, error)

func VkWaitForFences

func VkWaitForFences(device VulkanDevice, f uint32, fence *VulkanFence, f2 uint32, f3 uint64) (VkResult, error)

type VkShaderModuleCreateInfo

type VkShaderModuleCreateInfo struct {
	SType    VkStructureType
	PNext    unsafe.Pointer
	Flags    uint32
	CodeSize uintptr
	PCode    *uint32
}

type VkShaderStageFlagBits

type VkShaderStageFlagBits uint32
const (
	VK_SHADER_STAGE_VERTEX_BIT VkShaderStageFlagBits = 0x00000001 << iota
	VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT
	VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT
	VK_SHADER_STAGE_GEOMETRY_BIT
	VK_SHADER_STAGE_FRAGMENT_BIT
	VK_SHADER_STAGE_COMPUTE_BIT
)

Shader Stage Flags

type VkSpecializationInfo

type VkSpecializationInfo struct {
	MapEntryCount uint32
	PMapEntries   *VkSpecializationMapEntry
	DataSize      uint
	PData         unsafe.Pointer
}

type VkSpecializationMapEntry

type VkSpecializationMapEntry struct {
	ConstantID uint32
	Offset     uint32
	Size       uint
}

type VkStructureType

type VkStructureType uint32
const (
	VK_STRUCTURE_TYPE_APPLICATION_INFO VkStructureType = iota
	VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
	VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
	VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO
	VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
	VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
	VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
	VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
	VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
	VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
	VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
	VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
	VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
	VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
	VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
	VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
	VK_STRUCTURE_TYPE_SUBMIT_INFO
	VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
	VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_INFO // Pridané
)

Structure Types

type VkSubmitInfo

type VkSubmitInfo struct {
	SType                VkStructureType
	PNext                unsafe.Pointer
	WaitSemaphoreCount   uint32
	PWaitSemaphores      *VulkanSemaphore
	PWaitDstStageMask    *VkPipelineStageFlags
	CommandBufferCount   uint32
	PCommandBuffers      *VulkanCommandBuffer // Oprava typu
	SignalSemaphoreCount uint32
	PSignalSemaphores    *VulkanSemaphore
}

type VkWriteDescriptorSet

type VkWriteDescriptorSet struct {
	SType            VkStructureType
	PNext            unsafe.Pointer
	DstSet           VulkanDescriptorSet
	DstBinding       uint32
	DstArrayElement  uint32
	DescriptorCount  uint32
	DescriptorType   VkDescriptorType
	PImageInfo       *VkDescriptorImageInfo
	PBufferInfo      *VkDescriptorBufferInfo // Pridanie chýbajúceho poľa
	PTexelBufferView *VulkanBufferView
}

type VulkanBuffer

type VulkanBuffer uintptr

type VulkanBufferView

type VulkanBufferView uintptr

type VulkanCommandBuffer

type VulkanCommandBuffer uintptr

type VulkanCommandPool

type VulkanCommandPool uintptr

type VulkanDescriptorPool

type VulkanDescriptorPool uintptr

type VulkanDescriptorSet

type VulkanDescriptorSet uintptr

type VulkanDescriptorSetLayout

type VulkanDescriptorSetLayout uintptr

type VulkanDevice

type VulkanDevice uintptr

type VulkanDeviceMemory

type VulkanDeviceMemory uintptr

type VulkanFence

type VulkanFence uintptr

type VulkanFramebuffer

type VulkanFramebuffer uintptr

type VulkanImage

type VulkanImage uintptr

type VulkanImageView

type VulkanImageView uintptr

type VulkanInstance

type VulkanInstance uintptr

type VulkanPhysicalDevice

type VulkanPhysicalDevice uintptr

type VulkanPipeline

type VulkanPipeline uintptr

type VulkanPipelineCache

type VulkanPipelineCache uintptr

type VulkanPipelineLayout

type VulkanPipelineLayout uintptr

type VulkanQueue

type VulkanQueue uintptr

type VulkanRenderPass

type VulkanRenderPass uintptr

type VulkanSampler

type VulkanSampler uintptr

type VulkanSemaphore

type VulkanSemaphore uintptr

type VulkanShaderModule

type VulkanShaderModule uintptr

Jump to

Keyboard shortcuts

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