Go bindings for Vulkan
Switch branches/tags
Nothing to show
Clone or download
dominikh Implement functions
Implement the following functions:

- vkGetPhysicalDeviceFeatures2
- vkGetPhysicalDeviceFormatProperties
- vkGetPhysicalDeviceFormatProperties2
- vkGetPhysicalDeviceImageFormatProperties
- vkGetPhysicalDeviceImageFormatProperties2
- vkGetPhysicalDeviceMemoryProperties2
Latest commit 5ad91f3 Nov 10, 2018
Permalink
Failed to load latest commit information.
COPYING Add legal cruft Oct 16, 2018
README.md Add optional runtime safety checks Oct 31, 2018
TODO Implement functions Nov 10, 2018
android.c Add function pointer wrappers for all functions Oct 30, 2018
android.h Add function pointer wrappers for all functions Oct 30, 2018
doc.go Don't define methods on CommandPool Oct 30, 2018
extensions.go Add alias for unsafe.Pointer Oct 30, 2018
flags.go Implement functions Nov 10, 2018
flags_string.go Implement vkCreateDescriptorPool, vkDestroyDescriptorPool, vkResetDes… Nov 1, 2018
fps.go Add all known function names Oct 30, 2018
safe.go Add optional runtime safety checks Oct 31, 2018
sanity.go Add legal cruft Oct 16, 2018
surface.go Add function pointer wrappers for all functions Oct 30, 2018
swapchain.go Add function pointer wrappers for all functions Oct 30, 2018
unsafe.go Add optional runtime safety checks Oct 31, 2018
util.go Implement vkEnumerateInstanceLayerProperties Nov 3, 2018
vk.c Add missing C wrappers Oct 31, 2018
vk.go Implement functions Nov 10, 2018
vk.h Add missing C wrappers Oct 31, 2018
wayland.c Add function pointer wrappers for all functions Oct 30, 2018
wayland.h Add function pointer wrappers for all functions Oct 30, 2018
windows.c Add function pointer wrappers for all functions Oct 30, 2018
windows.h Add function pointer wrappers for all functions Oct 30, 2018
xcb.c Add function pointer wrappers for all functions Oct 30, 2018
xcb.h Add function pointer wrappers for all functions Oct 30, 2018
xlib.c Add function pointer wrappers for all functions Oct 30, 2018
xlib.go Add function pointer wrappers for all functions Oct 30, 2018
xlib.h Add function pointer wrappers for all functions Oct 30, 2018
xlib_xrandr.c Add function pointer wrappers for all functions Oct 30, 2018
xlib_xrandr.h Add function pointer wrappers for all functions Oct 30, 2018

README.md

Vulkan Go bindings

Package vk provides bindings for the Vulkan graphics API.

This package is in its very early stages. It is not in a usable state. This repository is a mirror of local development efforts.

Supported extensions

  • VK_KHR_surface
  • VK_KHR_xlib_surface
  • VK_KHR_swapchain

Build tags

We use a number of build tags to guard platform-specific functionality and safety checks.

Tag Description
unsafe Disable runtime checks that prevent memory corruption in the case of API misuse
xlib Include support for VK_KHR_xlib_surface

Comparison to github.com/vulkan-go/vulkan

github.com/vulkan-go/vulkan was generated using an automatic C binding generator and exports a raw C API. Our bindings, on the other hand, have been written by hand, wrapping the C API in an idiomatic Go API. We hide Vulkan's sType structure field, populating it automatically; we fully support slices, making count fields unnecessary, and we support Go strings, not requiring the user to ensure they're null-terminated.

vulkan-go/vulkan uses vkGetInstanceProcAddr for both instance and device commands, which means all device command calls have to go through the Vulkan loader's dispatch code. We use vkGetDeviceProcAddr and implement our own dispatch, which should theoretically be slightly faster.

Finally, we provide platform-specific functions, such as WSI, whereas vulkan-go/vulkan expects users to use GLFW (or similar).