vk

package
v0.0.0-...-a9b3df6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT, Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FORMAT_R8G8B8A8_UNORM      Format = C.VK_FORMAT_R8G8B8A8_UNORM
	FORMAT_B8G8R8A8_SRGB       Format = C.VK_FORMAT_B8G8R8A8_SRGB
	FORMAT_R8G8B8A8_SRGB       Format = C.VK_FORMAT_R8G8B8A8_SRGB
	FORMAT_R16_SFLOAT          Format = C.VK_FORMAT_R16_SFLOAT
	FORMAT_R32_SFLOAT          Format = C.VK_FORMAT_R32_SFLOAT
	FORMAT_R32G32_SFLOAT       Format = C.VK_FORMAT_R32G32_SFLOAT
	FORMAT_R32G32B32_SFLOAT    Format = C.VK_FORMAT_R32G32B32_SFLOAT
	FORMAT_R32G32B32A32_SFLOAT Format = C.VK_FORMAT_R32G32B32A32_SFLOAT

	FORMAT_FEATURE_COLOR_ATTACHMENT_BIT            FormatFeatureFlags = C.VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
	FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT      FormatFeatureFlags = C.VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
	FORMAT_FEATURE_SAMPLED_IMAGE_BIT               FormatFeatureFlags = C.VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
	FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FormatFeatureFlags = C.VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

	IMAGE_USAGE_SAMPLED_BIT          ImageUsageFlags = C.VK_IMAGE_USAGE_SAMPLED_BIT
	IMAGE_USAGE_COLOR_ATTACHMENT_BIT ImageUsageFlags = C.VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
	IMAGE_USAGE_STORAGE_BIT          ImageUsageFlags = C.VK_IMAGE_USAGE_STORAGE_BIT
	IMAGE_USAGE_TRANSFER_DST_BIT     ImageUsageFlags = C.VK_IMAGE_USAGE_TRANSFER_DST_BIT
	IMAGE_USAGE_TRANSFER_SRC_BIT     ImageUsageFlags = C.VK_IMAGE_USAGE_TRANSFER_SRC_BIT

	FILTER_NEAREST Filter = C.VK_FILTER_NEAREST
	FILTER_LINEAR  Filter = C.VK_FILTER_LINEAR

	ATTACHMENT_LOAD_OP_CLEAR     AttachmentLoadOp = C.VK_ATTACHMENT_LOAD_OP_CLEAR
	ATTACHMENT_LOAD_OP_DONT_CARE AttachmentLoadOp = C.VK_ATTACHMENT_LOAD_OP_DONT_CARE
	ATTACHMENT_LOAD_OP_LOAD      AttachmentLoadOp = C.VK_ATTACHMENT_LOAD_OP_LOAD

	IMAGE_LAYOUT_UNDEFINED                ImageLayout = C.VK_IMAGE_LAYOUT_UNDEFINED
	IMAGE_LAYOUT_PRESENT_SRC_KHR          ImageLayout = C.VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
	IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ImageLayout = C.VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
	IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL ImageLayout = C.VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
	IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL     ImageLayout = C.VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
	IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL     ImageLayout = C.VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
	IMAGE_LAYOUT_GENERAL                  ImageLayout = C.VK_IMAGE_LAYOUT_GENERAL

	BUFFER_USAGE_TRANSFER_DST_BIT   BufferUsageFlags = C.VK_BUFFER_USAGE_TRANSFER_DST_BIT
	BUFFER_USAGE_TRANSFER_SRC_BIT   BufferUsageFlags = C.VK_BUFFER_USAGE_TRANSFER_SRC_BIT
	BUFFER_USAGE_UNIFORM_BUFFER_BIT BufferUsageFlags = C.VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT
	BUFFER_USAGE_STORAGE_BUFFER_BIT BufferUsageFlags = C.VK_BUFFER_USAGE_STORAGE_BUFFER_BIT
	BUFFER_USAGE_INDEX_BUFFER_BIT   BufferUsageFlags = C.VK_BUFFER_USAGE_INDEX_BUFFER_BIT
	BUFFER_USAGE_VERTEX_BUFFER_BIT  BufferUsageFlags = C.VK_BUFFER_USAGE_VERTEX_BUFFER_BIT

	ERROR_OUT_OF_DATE_KHR  = Error(C.VK_ERROR_OUT_OF_DATE_KHR)
	ERROR_SURFACE_LOST_KHR = Error(C.VK_ERROR_SURFACE_LOST_KHR)
	ERROR_DEVICE_LOST      = Error(C.VK_ERROR_DEVICE_LOST)
	SUBOPTIMAL_KHR         = Error(C.VK_SUBOPTIMAL_KHR)

	FENCE_CREATE_SIGNALED_BIT = 0x00000001

	BLEND_FACTOR_ZERO                BlendFactor = C.VK_BLEND_FACTOR_ZERO
	BLEND_FACTOR_ONE                 BlendFactor = C.VK_BLEND_FACTOR_ONE
	BLEND_FACTOR_ONE_MINUS_SRC_ALPHA BlendFactor = C.VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
	BLEND_FACTOR_DST_COLOR           BlendFactor = C.VK_BLEND_FACTOR_DST_COLOR

	PRIMITIVE_TOPOLOGY_TRIANGLE_LIST  PrimitiveTopology = C.VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
	PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP PrimitiveTopology = C.VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP

	SHADER_STAGE_VERTEX_BIT   ShaderStageFlags = C.VK_SHADER_STAGE_VERTEX_BIT
	SHADER_STAGE_FRAGMENT_BIT ShaderStageFlags = C.VK_SHADER_STAGE_FRAGMENT_BIT
	SHADER_STAGE_COMPUTE_BIT  ShaderStageFlags = C.VK_SHADER_STAGE_COMPUTE_BIT

	DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER DescriptorType = C.VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
	DESCRIPTOR_TYPE_UNIFORM_BUFFER         DescriptorType = C.VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
	DESCRIPTOR_TYPE_STORAGE_BUFFER         DescriptorType = C.VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
	DESCRIPTOR_TYPE_STORAGE_IMAGE          DescriptorType = C.VK_DESCRIPTOR_TYPE_STORAGE_IMAGE

	MEMORY_PROPERTY_DEVICE_LOCAL_BIT  MemoryPropertyFlags = C.VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
	MEMORY_PROPERTY_HOST_VISIBLE_BIT  MemoryPropertyFlags = C.VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
	MEMORY_PROPERTY_HOST_COHERENT_BIT MemoryPropertyFlags = C.VK_MEMORY_PROPERTY_HOST_COHERENT_BIT

	DEPENDENCY_BY_REGION_BIT DependencyFlags = C.VK_DEPENDENCY_BY_REGION_BIT

	PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PipelineStageFlags = C.VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
	PIPELINE_STAGE_TRANSFER_BIT                PipelineStageFlags = C.VK_PIPELINE_STAGE_TRANSFER_BIT
	PIPELINE_STAGE_FRAGMENT_SHADER_BIT         PipelineStageFlags = C.VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
	PIPELINE_STAGE_COMPUTE_SHADER_BIT          PipelineStageFlags = C.VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT
	PIPELINE_STAGE_TOP_OF_PIPE_BIT             PipelineStageFlags = C.VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT
	PIPELINE_STAGE_HOST_BIT                    PipelineStageFlags = C.VK_PIPELINE_STAGE_HOST_BIT
	PIPELINE_STAGE_VERTEX_INPUT_BIT            PipelineStageFlags = C.VK_PIPELINE_STAGE_VERTEX_INPUT_BIT
	PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT          PipelineStageFlags = C.VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT

	ACCESS_MEMORY_READ_BIT            AccessFlags = C.VK_ACCESS_MEMORY_READ_BIT
	ACCESS_MEMORY_WRITE_BIT           AccessFlags = C.VK_ACCESS_MEMORY_WRITE_BIT
	ACCESS_TRANSFER_READ_BIT          AccessFlags = C.VK_ACCESS_TRANSFER_READ_BIT
	ACCESS_TRANSFER_WRITE_BIT         AccessFlags = C.VK_ACCESS_TRANSFER_WRITE_BIT
	ACCESS_SHADER_READ_BIT            AccessFlags = C.VK_ACCESS_SHADER_READ_BIT
	ACCESS_SHADER_WRITE_BIT           AccessFlags = C.VK_ACCESS_SHADER_WRITE_BIT
	ACCESS_COLOR_ATTACHMENT_READ_BIT  AccessFlags = C.VK_ACCESS_COLOR_ATTACHMENT_READ_BIT
	ACCESS_COLOR_ATTACHMENT_WRITE_BIT AccessFlags = C.VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
	ACCESS_HOST_READ_BIT              AccessFlags = C.VK_ACCESS_HOST_READ_BIT
	ACCESS_HOST_WRITE_BIT             AccessFlags = C.VK_ACCESS_HOST_WRITE_BIT
	ACCESS_VERTEX_ATTRIBUTE_READ_BIT  AccessFlags = C.VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT
	ACCESS_INDEX_READ_BIT             AccessFlags = C.VK_ACCESS_INDEX_READ_BIT

	PIPELINE_BIND_POINT_COMPUTE  PipelineBindPoint = C.VK_PIPELINE_BIND_POINT_COMPUTE
	PIPELINE_BIND_POINT_GRAPHICS PipelineBindPoint = C.VK_PIPELINE_BIND_POINT_GRAPHICS

	INDEX_TYPE_UINT16 IndexType = C.VK_INDEX_TYPE_UINT16
	INDEX_TYPE_UINT32 IndexType = C.VK_INDEX_TYPE_UINT32

	QUEUE_GRAPHICS_BIT QueueFlags = C.VK_QUEUE_GRAPHICS_BIT
	QUEUE_COMPUTE_BIT  QueueFlags = C.VK_QUEUE_COMPUTE_BIT

	SAMPLER_MIPMAP_MODE_NEAREST SamplerMipmapMode = C.VK_SAMPLER_MIPMAP_MODE_NEAREST
	SAMPLER_MIPMAP_MODE_LINEAR  SamplerMipmapMode = C.VK_SAMPLER_MIPMAP_MODE_LINEAR

	REMAINING_MIP_LEVELS = -1
)

Variables

This section is empty.

Functions

func AcquireNextImage

func AcquireNextImage(d Device, swchain Swapchain, sem Semaphore, fence Fence) (int, error)

func BeginCommandBuffer

func BeginCommandBuffer(buf CommandBuffer) error

func CmdBeginRenderPass

func CmdBeginRenderPass(buf CommandBuffer, rp RenderPass, fbo Framebuffer, width, height int, clearCol [4]float32)

func CmdBindDescriptorSets

func CmdBindDescriptorSets(cmdBuf CommandBuffer, point PipelineBindPoint, layout PipelineLayout, firstSet int, sets []DescriptorSet)

func CmdBindIndexBuffer

func CmdBindIndexBuffer(cmdBuf CommandBuffer, buffer Buffer, offset int, typ IndexType)

func CmdBindPipeline

func CmdBindPipeline(cmdBuf CommandBuffer, bindPoint PipelineBindPoint, pipe Pipeline)

func CmdBindVertexBuffers

func CmdBindVertexBuffers(cmdBuf CommandBuffer, first int, buffers []Buffer, sizes []DeviceSize)

func CmdBlitImage

func CmdBlitImage(cmdBuf CommandBuffer, src Image, srcLayout ImageLayout, dst Image, dstLayout ImageLayout, regions []ImageBlit, filter Filter)

func CmdCopyBuffer

func CmdCopyBuffer(cmdBuf CommandBuffer, src, dst Buffer, srcOff, dstOff, size int)

func CmdCopyBufferToImage

func CmdCopyBufferToImage(cmdBuf CommandBuffer, src Buffer, dst Image, layout ImageLayout, copy BufferImageCopy)

func CmdCopyImage

func CmdCopyImage(cmdBuf CommandBuffer, src Image, srcLayout ImageLayout, dst Image, dstLayout ImageLayout, regions []ImageCopy)

func CmdCopyImageToBuffer

func CmdCopyImageToBuffer(cmdBuf CommandBuffer, src Image, srcLayout ImageLayout, dst Buffer, regions []BufferImageCopy)

func CmdDispatch

func CmdDispatch(cmdBuf CommandBuffer, x, y, z int)

func CmdDraw

func CmdDraw(cmdBuf CommandBuffer, vertCount, instCount, firstVert, firstInst int)

func CmdDrawIndexed

func CmdDrawIndexed(cmdBuf CommandBuffer, idxCount, instCount, firstIdx, vertOff, firstInst int)

func CmdEndRenderPass

func CmdEndRenderPass(buf CommandBuffer)

func CmdPipelineBarrier

func CmdPipelineBarrier(cmdBuf CommandBuffer, srcStage, dstStage PipelineStageFlags, flags DependencyFlags, memBarriers []MemoryBarrier, bufBarriers []BufferMemoryBarrier, imgBarriers []ImageMemoryBarrier)

func CmdPushConstants

func CmdPushConstants(cmdBuf CommandBuffer, layout PipelineLayout, stages ShaderStageFlags, offset int, data []byte)

func CmdSetViewport

func CmdSetViewport(cmdBuf CommandBuffer, first int, viewports ...Viewport)

func CreateBuffer

func CreateBuffer(pd PhysicalDevice, d Device, size int, usage BufferUsageFlags, props MemoryPropertyFlags) (Buffer, DeviceMemory, error)

func CreateImage

func CreateImage(pd PhysicalDevice, d Device, format Format, width, height, mipmaps int, usage ImageUsageFlags) (Image, DeviceMemory, error)

func CreateSwapchain

func CreateSwapchain(pd PhysicalDevice, d Device, surf Surface, width, height int, old Swapchain) (Swapchain, []Image, Format, error)

func DestroyBuffer

func DestroyBuffer(d Device, buf Buffer)

func DestroyCommandPool

func DestroyCommandPool(d Device, pool CommandPool)

func DestroyDescriptorPool

func DestroyDescriptorPool(d Device, pool DescriptorPool)

func DestroyDescriptorSetLayout

func DestroyDescriptorSetLayout(d Device, l DescriptorSetLayout)

func DestroyDevice

func DestroyDevice(dev Device)

func DestroyFence

func DestroyFence(d Device, f Fence)

func DestroyFramebuffer

func DestroyFramebuffer(d Device, f Framebuffer)

func DestroyImage

func DestroyImage(d Device, img Image)

func DestroyImageView

func DestroyImageView(d Device, view ImageView)

func DestroyInstance

func DestroyInstance(inst Instance)

func DestroyPipeline

func DestroyPipeline(d Device, p Pipeline)

func DestroyPipelineLayout

func DestroyPipelineLayout(d Device, l PipelineLayout)

func DestroyRenderPass

func DestroyRenderPass(d Device, r RenderPass)

func DestroySampler

func DestroySampler(d Device, sampler Sampler)

func DestroySemaphore

func DestroySemaphore(d Device, sem Semaphore)

func DestroyShaderModule

func DestroyShaderModule(d Device, mod ShaderModule)

func DestroySurface

func DestroySurface(inst Instance, s Surface)

func DestroySwapchain

func DestroySwapchain(d Device, swchain Swapchain)

func DeviceWaitIdle

func DeviceWaitIdle(d Device) error

func EndCommandBuffer

func EndCommandBuffer(buf CommandBuffer) error

func FreeCommandBuffers

func FreeCommandBuffers(d Device, pool CommandPool, bufs ...CommandBuffer)

func FreeMemory

func FreeMemory(d Device, mem DeviceMemory)

func MapMemory

func MapMemory(d Device, mem DeviceMemory, offset, size int) ([]byte, error)

func PresentQueue

func PresentQueue(q Queue, swchain Swapchain, sem Semaphore, imgIdx int) error

func QueueSubmit

func QueueSubmit(q Queue, buf CommandBuffer, waitSems []Semaphore, waitStages []PipelineStageFlags, sigSems []Semaphore, fence Fence) error

func QueueWaitIdle

func QueueWaitIdle(q Queue) error

func ResetCommandBuffer

func ResetCommandBuffer(buf CommandBuffer) error

func ResetDescriptorPool

func ResetDescriptorPool(d Device, pool DescriptorPool) error

func ResetFences

func ResetFences(d Device, fences ...Fence) error

func UnmapMemory

func UnmapMemory(d Device, mem DeviceMemory)

func UpdateDescriptorSet

func UpdateDescriptorSet(d Device, write WriteDescriptorSet)

func WaitForFences

func WaitForFences(d Device, fences ...Fence) error

Types

type AccessFlags

type AccessFlags = C.VkAccessFlags

type AttachmentLoadOp

type AttachmentLoadOp = C.VkAttachmentLoadOp

type BlendFactor

type BlendFactor = C.VkBlendFactor

type Buffer

type Buffer = C.VkBuffer

type BufferImageCopy

type BufferImageCopy = C.VkBufferImageCopy

func BuildBufferImageCopy

func BuildBufferImageCopy(bufOff, bufStride, x, y, width, height int) BufferImageCopy

type BufferMemoryBarrier

type BufferMemoryBarrier = C.VkBufferMemoryBarrier

func BuildBufferMemoryBarrier

func BuildBufferMemoryBarrier(buf Buffer, srcMask, dstMask AccessFlags) BufferMemoryBarrier

type BufferUsageFlags

type BufferUsageFlags = C.VkBufferUsageFlags

type CommandBuffer

type CommandBuffer = C.VkCommandBuffer

func AllocateCommandBuffer

func AllocateCommandBuffer(d Device, pool CommandPool) (CommandBuffer, error)

type CommandPool

type CommandPool = C.VkCommandPool

func CreateCommandPool

func CreateCommandPool(d Device, queueIndex int) (CommandPool, error)

type DependencyFlags

type DependencyFlags = C.VkDependencyFlags

type DescriptorPool

type DescriptorPool = C.VkDescriptorPool

func CreateDescriptorPool

func CreateDescriptorPool(d Device, maxSets int, sizes []DescriptorPoolSize) (DescriptorPool, error)

type DescriptorPoolSize

type DescriptorPoolSize = C.VkDescriptorPoolSize

func BuildDescriptorPoolSize

func BuildDescriptorPoolSize(typ DescriptorType, count int) DescriptorPoolSize

type DescriptorSet

type DescriptorSet = C.VkDescriptorSet

func AllocateDescriptorSets

func AllocateDescriptorSets(d Device, pool DescriptorPool, layout DescriptorSetLayout, count int) ([]DescriptorSet, error)

type DescriptorSetLayout

type DescriptorSetLayout = C.VkDescriptorSetLayout

func CreateDescriptorSetLayout

func CreateDescriptorSetLayout(d Device, bindings []DescriptorSetLayoutBinding) (DescriptorSetLayout, error)

type DescriptorSetLayoutBinding

type DescriptorSetLayoutBinding struct {
	Binding        int
	DescriptorType DescriptorType
	StageFlags     ShaderStageFlags
}

type DescriptorType

type DescriptorType = C.VkDescriptorType

type Device

type Device = C.VkDevice

func CreateDeviceAndQueue

func CreateDeviceAndQueue(pd C.VkPhysicalDevice, queueIdx int, exts ...string) (Device, error)

type DeviceMemory

type DeviceMemory = C.VkDeviceMemory

type DeviceSize

type DeviceSize = C.VkDeviceSize

type Error

type Error C.VkResult

func (Error) Error

func (e Error) Error() string

type Fence

type Fence = C.VkFence

func CreateFence

func CreateFence(d Device, flags int) (Fence, error)

type Filter

type Filter = C.VkFilter

type Format

type Format = C.VkFormat

type FormatFeatureFlags

type FormatFeatureFlags = C.VkFormatFeatureFlags

func GetPhysicalDeviceFormatProperties

func GetPhysicalDeviceFormatProperties(physDev PhysicalDevice, format Format) FormatFeatureFlags

type Framebuffer

type Framebuffer = C.VkFramebuffer

func CreateFramebuffer

func CreateFramebuffer(d Device, rp RenderPass, view ImageView, width, height int) (Framebuffer, error)

type Image

type Image = C.VkImage

type ImageBlit

type ImageBlit = C.VkImageBlit

func BuildImageBlit

func BuildImageBlit(srcX, srcY, dstX, dstY, srcWidth, srcHeight, dstWidth, dstHeight, srcMip, dstMip int) ImageBlit

type ImageCopy

type ImageCopy = C.VkImageCopy

func BuildImageCopy

func BuildImageCopy(srcX, srcY, dstX, dstY, width, height int) ImageCopy

type ImageLayout

type ImageLayout = C.VkImageLayout

type ImageMemoryBarrier

type ImageMemoryBarrier = C.VkImageMemoryBarrier

func BuildImageMemoryBarrier

func BuildImageMemoryBarrier(img Image, srcMask, dstMask AccessFlags, oldLayout, newLayout ImageLayout, baseMip, numMips int) ImageMemoryBarrier

type ImageUsageFlags

type ImageUsageFlags = C.VkImageUsageFlags

type ImageView

type ImageView = C.VkImageView

func CreateImageView

func CreateImageView(d Device, img Image, format Format) (ImageView, error)

type IndexType

type IndexType = C.VkIndexType

type Instance

type Instance = C.VkInstance

func CreateInstance

func CreateInstance(exts ...string) (Instance, error)

type MemoryBarrier

type MemoryBarrier = C.VkMemoryBarrier

func BuildMemoryBarrier

func BuildMemoryBarrier(srcMask, dstMask AccessFlags) MemoryBarrier

type MemoryPropertyFlags

type MemoryPropertyFlags = C.VkMemoryPropertyFlags

type PhysicalDevice

type PhysicalDevice = C.VkPhysicalDevice

func ChoosePhysicalDevice

func ChoosePhysicalDevice(inst Instance, surf Surface) (PhysicalDevice, int, error)

func EnumeratePhysicalDevices

func EnumeratePhysicalDevices(inst Instance) ([]PhysicalDevice, error)

type Pipeline

type Pipeline = C.VkPipeline

func CreateComputePipeline

func CreateComputePipeline(d Device, mod ShaderModule, layout PipelineLayout) (Pipeline, error)

func CreateGraphicsPipeline

func CreateGraphicsPipeline(d Device, pass RenderPass, vmod, fmod ShaderModule, blend bool, srcFactor, dstFactor BlendFactor, topology PrimitiveTopology, bindings []VertexInputBindingDescription, attrs []VertexInputAttributeDescription, layout PipelineLayout) (Pipeline, error)

type PipelineBindPoint

type PipelineBindPoint = C.VkPipelineBindPoint

type PipelineLayout

type PipelineLayout = C.VkPipelineLayout

func CreatePipelineLayout

func CreatePipelineLayout(d Device, pushRanges []PushConstantRange, sets []DescriptorSetLayout) (PipelineLayout, error)

type PipelineStageFlags

type PipelineStageFlags = C.VkPipelineStageFlags

type PrimitiveTopology

type PrimitiveTopology = C.VkPrimitiveTopology

type PushConstantRange

type PushConstantRange = C.VkPushConstantRange

func BuildPushConstantRange

func BuildPushConstantRange(stages ShaderStageFlags, offset, size int) PushConstantRange

func (PushConstantRange) Offset

func (r PushConstantRange) Offset() int

func (PushConstantRange) Size

func (r PushConstantRange) Size() int

func (PushConstantRange) StageFlags

func (r PushConstantRange) StageFlags() ShaderStageFlags

type Queue

type Queue = C.VkQueue

func GetDeviceQueue

func GetDeviceQueue(d Device, queueFamily, queueIndex int) Queue

type QueueFamilyProperties

type QueueFamilyProperties = C.VkQueueFamilyProperties

func GetPhysicalDeviceQueueFamilyProperties

func GetPhysicalDeviceQueueFamilyProperties(pd PhysicalDevice) []QueueFamilyProperties

func (QueueFamilyProperties) Flags

type QueueFlags

type QueueFlags = C.VkQueueFlags

type RenderPass

type RenderPass = C.VkRenderPass

func CreateRenderPass

func CreateRenderPass(d Device, format Format, loadOp AttachmentLoadOp, initialLayout, finalLayout ImageLayout, passDeps []SubpassDependency) (RenderPass, error)

type Sampler

type Sampler = C.VkSampler

func CreateSampler

func CreateSampler(d Device, minFilter, magFilter Filter, mipmapMode SamplerMipmapMode) (Sampler, error)

type SamplerMipmapMode

type SamplerMipmapMode = C.VkSamplerMipmapMode

type Semaphore

type Semaphore = C.VkSemaphore

func CreateSemaphore

func CreateSemaphore(d Device) (Semaphore, error)

type ShaderModule

type ShaderModule = C.VkShaderModule

func CreateShaderModule

func CreateShaderModule(d Device, spirv string) (ShaderModule, error)

type ShaderStageFlags

type ShaderStageFlags = C.VkShaderStageFlags

type SubpassDependency

type SubpassDependency = C.VkSubpassDependency

func BuildSubpassDependency

func BuildSubpassDependency(srcStage, dstStage PipelineStageFlags, srcMask, dstMask AccessFlags, flags DependencyFlags) SubpassDependency

type Surface

type Surface = C.VkSurfaceKHR

func CreateWaylandSurface

func CreateWaylandSurface(inst Instance, disp unsafe.Pointer, wlSurf unsafe.Pointer) (Surface, error)

func CreateXlibSurface

func CreateXlibSurface(inst Instance, dpy unsafe.Pointer, window uintptr) (Surface, error)

type SurfaceCapabilities

type SurfaceCapabilities = C.VkSurfaceCapabilitiesKHR

func GetPhysicalDeviceSurfaceCapabilities

func GetPhysicalDeviceSurfaceCapabilities(pd PhysicalDevice, surf Surface) (SurfaceCapabilities, error)

func (SurfaceCapabilities) MaxExtent

func (c SurfaceCapabilities) MaxExtent() image.Point

func (SurfaceCapabilities) MinExtent

func (c SurfaceCapabilities) MinExtent() image.Point

type Swapchain

type Swapchain = C.VkSwapchainKHR

type VertexInputAttributeDescription

type VertexInputAttributeDescription struct {
	Location int
	Binding  int
	Format   Format
	Offset   int
}

type VertexInputBindingDescription

type VertexInputBindingDescription struct {
	Binding int
	Stride  int
}

type Viewport

type Viewport = C.VkViewport

func BuildViewport

func BuildViewport(x, y, width, height float32) Viewport

type WriteDescriptorSet

type WriteDescriptorSet = C.VkWriteDescriptorSet

func BuildWriteDescriptorSetBuffer

func BuildWriteDescriptorSetBuffer(set DescriptorSet, binding int, typ DescriptorType, buf Buffer) WriteDescriptorSet

func BuildWriteDescriptorSetImage

func BuildWriteDescriptorSetImage(set DescriptorSet, binding int, typ DescriptorType, sampler Sampler, view ImageView, layout ImageLayout) WriteDescriptorSet

Jump to

Keyboard shortcuts

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