vulkan

package
v1.0.45 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 9 Imported by: 0

README

Building NornicDB with Vulkan Support

This document explains how to build NornicDB with Vulkan GPU acceleration enabled.

Prerequisites

All Platforms
  1. Vulkan SDK: Download and install from https://vulkan.lunarg.com/
  2. GPU with Vulkan 1.1+ support: NVIDIA, AMD, Intel, or Apple (via MoltenVK)
Platform-Specific Setup
macOS (with MoltenVK)
# Install Vulkan SDK via Homebrew
brew install vulkan-sdk

# Or download from LunarG and set environment variables
export VULKAN_SDK=/path/to/vulkan-sdk
export CGO_CFLAGS="-I$VULKAN_SDK/include"
export CGO_LDFLAGS="-L$VULKAN_SDK/lib -lvulkan"
Linux
# Ubuntu/Debian
sudo apt install vulkan-tools libvulkan-dev vulkan-validationlayers

# Fedora
sudo dnf install vulkan-tools vulkan-loader-devel vulkan-validation-layers

# Set environment variables
export VULKAN_SDK=/path/to/vulkan-sdk  # If using SDK
export CGO_CFLAGS="-I$VULKAN_SDK/include"
export CGO_LDFLAGS="-L$VULKAN_SDK/lib -lvulkan"
Windows
  1. Install Vulkan SDK from LunarG
  2. Set environment variable:
    set VULKAN_SDK=C:\VulkanSDK\1.x.x.x
    
  3. The SDK installer typically sets this automatically

Building

Build with Vulkan Support (CGO)
# Set environment variables (if not already set)
export CGO_CFLAGS="-I$VULKAN_SDK/include"
export CGO_LDFLAGS="-L$VULKAN_SDK/lib -lvulkan"

# Build with cgovulkan tag
go build -tags cgovulkan ./cmd/nornicdb
Build without Vulkan (PureGo - Default)
# No special flags needed - uses purego for dynamic library loading
go build ./cmd/nornicdb

Compiling Shaders

The SPIR-V shaders are pre-compiled and embedded in the code. To recompile:

cd pkg/gpu/vulkan/shaders

# Linux/macOS
./compile.sh

# Windows
compile.bat

This requires glslc from the Vulkan SDK.

Verifying Build

Check if Vulkan is Available
# Run tests (will skip if Vulkan not available)
go test -tags cgovulkan ./pkg/gpu/vulkan -v
Test SPIR-V Shader Structure
# Test that SPIR-V shader file is valid
go test -tags cgovulkan ./pkg/gpu/vulkan -run TestSPIRV -v

Troubleshooting

Error: 'vulkan/vulkan.h' file not found

Solution: Set CGO_CFLAGS to point to Vulkan SDK include directory:

export CGO_CFLAGS="-I$VULKAN_SDK/include"
Error: undefined reference to 'vulkan functions'

Solution: Set CGO_LDFLAGS to link against Vulkan library:

export CGO_LDFLAGS="-L$VULKAN_SDK/lib -lvulkan"
Error: No suitable GPU found

Solution:

  • Ensure GPU drivers are installed (NVIDIA/AMD/Intel)
  • On macOS, ensure MoltenVK is installed
  • Verify with vulkaninfo command (from Vulkan SDK)
Build succeeds but tests skip

Solution: This is normal if Vulkan runtime is not available. The code will fall back to CPU implementation.

Architecture

The Vulkan implementation has two modes:

  1. CGO Mode (cgovulkan tag): Direct CGO bindings to Vulkan

    • Requires Vulkan SDK headers at build time
    • Faster compilation, static linking
  2. PureGo Mode (default): Dynamic library loading via purego

    • No build-time dependencies
    • Automatically finds Vulkan library at runtime
    • Works on systems without Vulkan SDK installed

Both modes use the same SPIR-V shader bytecode embedded in the code.

Documentation

Overview

Package vulkan provides cross-platform GPU acceleration using Vulkan Compute.

This package implements GPU-accelerated vector similarity search using Vulkan's compute shaders, providing high-performance, cross-platform GPU acceleration for Windows, Linux, macOS (via MoltenVK), and Android.

Requirements

For all platforms:

For Linux:

# Ubuntu/Debian
sudo apt install vulkan-tools libvulkan-dev vulkan-validationlayers

# Fedora
sudo dnf install vulkan-tools vulkan-loader-devel vulkan-validation-layers

For Windows:

  • Install Vulkan SDK from LunarG
  • Set VULKAN_SDK environment variable

For macOS (via MoltenVK):

  • brew install molten-vk
  • Or install via Vulkan SDK for macOS

Build Tags

This package is only compiled when the "vulkan" build tag is present:

go build -tags vulkan

Environment Variables

Linux:

export VULKAN_SDK=/path/to/vulkan/sdk
export LD_LIBRARY_PATH=$VULKAN_SDK/lib:$LD_LIBRARY_PATH

Windows:

Set VULKAN_SDK to SDK installation path

macOS:

export VULKAN_SDK=/path/to/vulkan/sdk
export VK_ICD_FILENAMES=$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json

Architecture

The Vulkan backend uses:

  • Vulkan Compute Shaders (SPIR-V) for GPU operations
  • Push constants for small uniform data (query vectors)
  • Storage buffers for large data (embeddings, scores)
  • Compute command buffers for GPU dispatch
  • Descriptor sets for resource binding

Performance Considerations

Vulkan provides:

  • Low-level control for maximum performance
  • Cross-platform GPU access (NVIDIA, AMD, Intel, Apple via MoltenVK)
  • Explicit memory management for optimal GPU utilization
  • Async compute for overlapping CPU/GPU work

For best results:

  • Use large batch sizes to amortize dispatch overhead
  • Keep data on GPU across multiple searches
  • Pre-normalize embeddings when possible

Example

Basic usage:

device, err := vulkan.NewDevice(0)
if err != nil {
    log.Fatal(err)
}
defer device.Release()

buffer, err := device.NewBuffer(embeddings)
if err != nil {
    log.Fatal(err)
}
defer buffer.Release()

results, err := device.Search(buffer, query, numVectors, dimensions, topK, normalized)
if err != nil {
    log.Fatal(err)
}

for _, r := range results {
    fmt.Printf("Index: %d, Score: %.4f\n", r.Index, r.Score)
}

Package vulkan provides cross-platform GPU acceleration using Vulkan Compute.

This implementation uses purego for FFI to dynamically load the Vulkan library, enabling GPU acceleration without CGO compilation. This is similar to how yzma provides llama.cpp bindings.

Supported Platforms:

  • Windows: Loads vulkan-1.dll (included with NVIDIA/AMD drivers)
  • Linux: Loads libvulkan.so.1 (from Vulkan SDK or mesa)
  • macOS: Loads libvulkan.dylib (from MoltenVK or Vulkan SDK)

The library is automatically detected from standard locations:

  • System PATH
  • GPU driver directories
  • Vulkan SDK installation

Package vulkan provides cross-platform GPU acceleration using Vulkan Compute. This file handles Unix-like systems (Linux, macOS/MoltenVK).

Index

Constants

View Source
const (
	VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO         = 16
	VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18
	VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO      = 29
	VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO       = 30
	VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32
	VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO       = 33
	VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO      = 34
	VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET              = 35
	VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO      = 40
	VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO         = 42
	VK_STRUCTURE_TYPE_SUBMIT_INFO                       = 4

	VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020

	VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7

	VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0

	VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001

	VK_PIPELINE_BIND_POINT_COMPUTE = 1
)

Additional Vulkan constants for compute pipelines

View Source
const (
	VK_SUCCESS                     = 0
	VK_NOT_READY                   = 1
	VK_TIMEOUT                     = 2
	VK_ERROR_OUT_OF_HOST_MEMORY    = -1
	VK_ERROR_OUT_OF_DEVICE_MEMORY  = -2
	VK_ERROR_INITIALIZATION_FAILED = -3
	VK_ERROR_DEVICE_LOST           = -4

	VK_STRUCTURE_TYPE_APPLICATION_INFO         = 0
	VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO     = 1
	VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2
	VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO       = 3
	VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO       = 12
	VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO     = 5
	VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39

	VK_API_VERSION_1_1 = uint32(0x00401000) // Version 1.1.0

	VK_QUEUE_COMPUTE_BIT = 0x00000002

	VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020
	VK_BUFFER_USAGE_TRANSFER_SRC_BIT   = 0x00000001
	VK_BUFFER_USAGE_TRANSFER_DST_BIT   = 0x00000002

	VK_SHARING_MODE_EXCLUSIVE = 0

	VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT  = 0x00000002
	VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004
	VK_MEMORY_HEAP_DEVICE_LOCAL_BIT      = 0x00000001

	VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002
)

Vulkan constants

Variables

View Source
var (
	ErrVulkanNotAvailable = errors.New("vulkan: Vulkan is not available (library not found)")
	ErrDeviceCreation     = errors.New("vulkan: failed to create Vulkan device")
	ErrBufferCreation     = errors.New("vulkan: failed to create buffer")
	ErrKernelExecution    = errors.New("vulkan: kernel execution failed")
	ErrInvalidBuffer      = errors.New("vulkan: invalid buffer")
)

Errors

Functions

func DeviceCount

func DeviceCount() int

DeviceCount returns the number of Vulkan GPU devices.

func IsAvailable

func IsAvailable() bool

IsAvailable checks if Vulkan is available on this system.

Types

type Buffer

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

Buffer represents a Vulkan memory buffer.

func (*Buffer) ReadFloat32

func (b *Buffer) ReadFloat32(count int) []float32

ReadFloat32 reads float32 values from the buffer.

func (*Buffer) ReadUint32

func (b *Buffer) ReadUint32(count int) []uint32

ReadUint32 reads uint32 values from the buffer.

func (*Buffer) Release

func (b *Buffer) Release()

Release frees the buffer resources.

func (*Buffer) Size

func (b *Buffer) Size() uint64

Size returns the buffer size in bytes.

type ComputeContext

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

ComputeContext holds resources for compute operations

func (*ComputeContext) CosineSimilarityGPU

func (c *ComputeContext) CosineSimilarityGPU(embeddings, query, scores *Buffer, n, dimensions uint32, normalized bool) error

CosineSimilarityGPU computes cosine similarity using GPU compute shader

func (*ComputeContext) NormalizeVectorsGPU

func (c *ComputeContext) NormalizeVectorsGPU(vectors *Buffer, n, dimensions uint32) error

NormalizeVectorsGPU normalizes vectors using GPU compute shader

func (*ComputeContext) Release

func (c *ComputeContext) Release()

Release frees all compute context resources

func (*ComputeContext) SearchGPU

func (c *ComputeContext) SearchGPU(embeddings *Buffer, query []float32, n, dimensions uint32, k int, normalized bool) ([]SearchResult, error)

SearchGPU performs complete similarity search on GPU

func (*ComputeContext) TopKGPU

func (c *ComputeContext) TopKGPU(scores, topIndices, topScores *Buffer, n, k uint32) error

TopKGPU finds top-k scores using GPU compute shader. Uses an iterative reduction algorithm that works for any k value. Performance is optimal for k <= 64 (typical for similarity search). For larger k, the algorithm still works but may be slower (O(k×n) complexity).

type ComputePipeline

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

ComputePipeline represents a compiled compute shader pipeline

func (*ComputePipeline) Release

func (p *ComputePipeline) Release()

Release frees pipeline resources

type Device

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

Device represents a Vulkan GPU device.

func NewDevice

func NewDevice(deviceID int) (*Device, error)

NewDevice creates a new Vulkan device handle.

func (*Device) CosineSimilarity

func (d *Device) CosineSimilarity(embeddings, query, scores *Buffer,
	n, dimensions uint32, normalized bool) error

CosineSimilarity computes cosine similarity between query and all embeddings. This is a CPU implementation that uses GPU memory buffers.

func (*Device) ID

func (d *Device) ID() int

ID returns the device ID.

func (*Device) MemoryBytes

func (d *Device) MemoryBytes() uint64

MemoryBytes returns the GPU memory size in bytes.

func (*Device) MemoryMB

func (d *Device) MemoryMB() int

MemoryMB returns the GPU memory size in megabytes.

func (*Device) Name

func (d *Device) Name() string

Name returns the GPU device name.

func (*Device) NewBuffer

func (d *Device) NewBuffer(data []float32) (*Buffer, error)

NewBuffer creates a new GPU buffer with data.

func (*Device) NewComputeContext

func (d *Device) NewComputeContext() (*ComputeContext, error)

NewComputeContext creates a new compute context with shader pipelines

func (*Device) NewEmptyBuffer

func (d *Device) NewEmptyBuffer(count uint64) (*Buffer, error)

NewEmptyBuffer creates an uninitialized GPU buffer.

func (*Device) NormalizeVectors

func (d *Device) NormalizeVectors(vectors *Buffer, n, dimensions uint32) error

NormalizeVectors normalizes vectors in-place to unit length. This is a CPU implementation as compute shaders require more setup.

func (*Device) Release

func (d *Device) Release()

Release frees the Vulkan device resources.

func (*Device) Search

func (d *Device) Search(embeddings *Buffer, query []float32, n, dimensions uint32, k int, normalized bool) ([]SearchResult, error)

Search performs a complete similarity search.

func (*Device) TopK

func (d *Device) TopK(scores *Buffer, n, k uint32) ([]uint32, []float32, error)

TopK finds the k highest scoring indices.

type PipelineType

type PipelineType int

PipelineType identifies which shader to use

const (
	PipelineCosineSimilarity PipelineType = iota
	PipelineNormalize
	PipelineTopK
	PipelineTopKFull
)

type SearchResult

type SearchResult struct {
	Index uint32
	Score float32
}

SearchResult holds a similarity search result.

type VkApplicationInfo

type VkApplicationInfo struct {
	SType              uint32
	PNext              uintptr
	PApplicationName   uintptr
	ApplicationVersion uint32
	PEngineName        uintptr
	EngineVersion      uint32
	ApiVersion         uint32
}

VkApplicationInfo structure

type VkBuffer

type VkBuffer uintptr

type VkBufferCreateInfo

type VkBufferCreateInfo struct {
	SType                 uint32
	PNext                 uintptr
	Flags                 uint32
	Size                  VkDeviceSize
	Usage                 uint32
	SharingMode           uint32
	QueueFamilyIndexCount uint32
	PQueueFamilyIndices   *uint32
}

VkBufferCreateInfo structure

type VkCommandBuffer

type VkCommandBuffer uintptr

type VkCommandBufferAllocateInfo

type VkCommandBufferAllocateInfo struct {
	SType              uint32
	PNext              uintptr
	CommandPool        VkCommandPool
	Level              uint32
	CommandBufferCount uint32
}

VkCommandBufferAllocateInfo structure

type VkCommandBufferBeginInfo

type VkCommandBufferBeginInfo struct {
	SType            uint32
	PNext            uintptr
	Flags            uint32
	PInheritanceInfo uintptr
}

VkCommandBufferBeginInfo structure

type VkCommandPool

type VkCommandPool uintptr

type VkCommandPoolCreateInfo

type VkCommandPoolCreateInfo struct {
	SType            uint32
	PNext            uintptr
	Flags            uint32
	QueueFamilyIndex uint32
}

VkCommandPoolCreateInfo structure

type VkComputePipelineCreateInfo

type VkComputePipelineCreateInfo struct {
	SType              uint32
	PNext              uintptr
	Flags              uint32
	Stage              VkPipelineShaderStageCreateInfo
	Layout             VkPipelineLayout
	BasePipelineHandle VkPipeline
	BasePipelineIndex  int32
}

VkComputePipelineCreateInfo structure

type VkDescriptorBufferInfo

type VkDescriptorBufferInfo struct {
	Buffer VkBuffer
	Offset VkDeviceSize
	Range  VkDeviceSize
}

VkDescriptorBufferInfo structure

type VkDescriptorPool

type VkDescriptorPool uintptr

type VkDescriptorPoolCreateInfo

type VkDescriptorPoolCreateInfo struct {
	SType         uint32
	PNext         uintptr
	Flags         uint32
	MaxSets       uint32
	PoolSizeCount uint32
	PPoolSizes    *VkDescriptorPoolSize
}

VkDescriptorPoolCreateInfo structure

type VkDescriptorPoolSize

type VkDescriptorPoolSize struct {
	Type            uint32
	DescriptorCount uint32
}

VkDescriptorPoolSize structure

type VkDescriptorSet

type VkDescriptorSet uintptr

type VkDescriptorSetAllocateInfo

type VkDescriptorSetAllocateInfo struct {
	SType              uint32
	PNext              uintptr
	DescriptorPool     VkDescriptorPool
	DescriptorSetCount uint32
	PSetLayouts        *VkDescriptorSetLayout
}

VkDescriptorSetAllocateInfo structure

type VkDescriptorSetLayout

type VkDescriptorSetLayout uintptr

type VkDescriptorSetLayoutBinding

type VkDescriptorSetLayoutBinding struct {
	Binding            uint32
	DescriptorType     uint32
	DescriptorCount    uint32
	StageFlags         uint32
	PImmutableSamplers uintptr
}

VkDescriptorSetLayoutBinding structure

type VkDescriptorSetLayoutCreateInfo

type VkDescriptorSetLayoutCreateInfo struct {
	SType        uint32
	PNext        uintptr
	Flags        uint32
	BindingCount uint32
	PBindings    *VkDescriptorSetLayoutBinding
}

VkDescriptorSetLayoutCreateInfo structure

type VkDevice

type VkDevice uintptr

type VkDeviceCreateInfo

type VkDeviceCreateInfo struct {
	SType                   uint32
	PNext                   uintptr
	Flags                   uint32
	QueueCreateInfoCount    uint32
	PQueueCreateInfos       *VkDeviceQueueCreateInfo
	EnabledLayerCount       uint32
	PpEnabledLayerNames     uintptr
	EnabledExtensionCount   uint32
	PpEnabledExtensionNames uintptr
	PEnabledFeatures        uintptr
}

VkDeviceCreateInfo structure

type VkDeviceMemory

type VkDeviceMemory uintptr

type VkDeviceQueueCreateInfo

type VkDeviceQueueCreateInfo struct {
	SType            uint32
	PNext            uintptr
	Flags            uint32
	QueueFamilyIndex uint32
	QueueCount       uint32
	PQueuePriorities *float32
}

VkDeviceQueueCreateInfo structure

type VkDeviceSize

type VkDeviceSize uint64

type VkFence

type VkFence uintptr

type VkInstance

type VkInstance uintptr

Vulkan type aliases

type VkInstanceCreateInfo

type VkInstanceCreateInfo struct {
	SType                   uint32
	PNext                   uintptr
	Flags                   uint32
	PApplicationInfo        *VkApplicationInfo
	EnabledLayerCount       uint32
	PpEnabledLayerNames     uintptr
	EnabledExtensionCount   uint32
	PpEnabledExtensionNames uintptr
}

VkInstanceCreateInfo structure

type VkMemoryAllocateInfo

type VkMemoryAllocateInfo struct {
	SType           uint32
	PNext           uintptr
	AllocationSize  VkDeviceSize
	MemoryTypeIndex uint32
}

VkMemoryAllocateInfo structure

type VkMemoryHeap

type VkMemoryHeap struct {
	Size  VkDeviceSize
	Flags uint32
}

VkMemoryHeap structure

type VkMemoryRequirements

type VkMemoryRequirements struct {
	Size           VkDeviceSize
	Alignment      VkDeviceSize
	MemoryTypeBits uint32
}

VkMemoryRequirements structure

type VkMemoryType

type VkMemoryType struct {
	PropertyFlags uint32
	HeapIndex     uint32
}

VkMemoryType structure

type VkPhysicalDevice

type VkPhysicalDevice uintptr

type VkPhysicalDeviceMemoryProperties

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

VkPhysicalDeviceMemoryProperties structure

type VkPhysicalDeviceProperties

type VkPhysicalDeviceProperties struct {
	ApiVersion        uint32
	DriverVersion     uint32
	VendorID          uint32
	DeviceID          uint32
	DeviceType        uint32
	DeviceName        [256]byte
	PipelineCacheUUID [16]byte
	Limits            [512]byte // VkPhysicalDeviceLimits is large
	SparseProperties  [20]byte
}

VkPhysicalDeviceProperties structure

type VkPipeline

type VkPipeline uintptr

type VkPipelineLayout

type VkPipelineLayout uintptr

type VkPipelineLayoutCreateInfo

type VkPipelineLayoutCreateInfo struct {
	SType                  uint32
	PNext                  uintptr
	Flags                  uint32
	SetLayoutCount         uint32
	PSetLayouts            *VkDescriptorSetLayout
	PushConstantRangeCount uint32
	PPushConstantRanges    *VkPushConstantRange
}

VkPipelineLayoutCreateInfo structure

type VkPipelineShaderStageCreateInfo

type VkPipelineShaderStageCreateInfo struct {
	SType               uint32
	PNext               uintptr
	Flags               uint32
	Stage               uint32
	Module              VkShaderModule
	PName               uintptr
	PSpecializationInfo uintptr
}

VkPipelineShaderStageCreateInfo structure

type VkPushConstantRange

type VkPushConstantRange struct {
	StageFlags uint32
	Offset     uint32
	Size       uint32
}

VkPushConstantRange structure

type VkQueue

type VkQueue uintptr

type VkQueueFamilyProperties

type VkQueueFamilyProperties struct {
	QueueFlags                  uint32
	QueueCount                  uint32
	TimestampValidBits          uint32
	MinImageTransferGranularity [3]uint32
}

VkQueueFamilyProperties structure

type VkResult

type VkResult int32

type VkShaderModule

type VkShaderModule uintptr

Vulkan handle types for compute

type VkShaderModuleCreateInfo

type VkShaderModuleCreateInfo struct {
	SType    uint32
	PNext    uintptr
	Flags    uint32
	CodeSize uintptr
	PCode    *uint32
}

VkShaderModuleCreateInfo structure

type VkSubmitInfo

type VkSubmitInfo struct {
	SType                uint32
	PNext                uintptr
	WaitSemaphoreCount   uint32
	PWaitSemaphores      uintptr
	PWaitDstStageMask    uintptr
	CommandBufferCount   uint32
	PCommandBuffers      *VkCommandBuffer
	SignalSemaphoreCount uint32
	PSignalSemaphores    uintptr
}

VkSubmitInfo structure

type VkWriteDescriptorSet

type VkWriteDescriptorSet struct {
	SType            uint32
	PNext            uintptr
	DstSet           VkDescriptorSet
	DstBinding       uint32
	DstArrayElement  uint32
	DescriptorCount  uint32
	DescriptorType   uint32
	PImageInfo       uintptr
	PBufferInfo      *VkDescriptorBufferInfo
	PTexelBufferView uintptr
}

VkWriteDescriptorSet structure

Jump to

Keyboard shortcuts

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