vulkan

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 0 Imported by: 1

Documentation

Overview

Package vulkan provides Pure Go Vulkan backend for the HAL.

This backend uses syscall.SyscallN for Vulkan API calls, requiring no CGO. Function pointers are loaded dynamically from vulkan-1.dll (Windows), libvulkan.so.1 (Linux), or MoltenVK (macOS).

Architecture

The backend follows wgpu-hal patterns:

  • Instance: VkInstance wrapper with extension loading
  • Adapter: VkPhysicalDevice enumeration and capabilities
  • Device: VkDevice with queues and memory allocator
  • Queue: Command submission and synchronization
  • Resources: Buffers, textures, pipelines with Vulkan objects

Memory Management

Unlike OpenGL, Vulkan requires explicit memory allocation. This backend implements a pool-based memory allocator similar to gpu-allocator.

Platform Support

  • Windows: vulkan-1.dll + VK_KHR_win32_surface
  • Linux: libvulkan.so.1 + VK_KHR_xlib_surface/VK_KHR_xcb_surface (planned)
  • macOS: MoltenVK + VK_EXT_metal_surface (planned)

Directories

Path Synopsis
Package vk provides Pure Go Vulkan bindings generated from vk.xml.
Package vk provides Pure Go Vulkan bindings generated from vk.xml.

Jump to

Keyboard shortcuts

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