extensions

package module
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 0 Imported by: 0

README

vkngwrapper/extensions/v3

Go Reference

go get github.com/vkngwrapper/extensions/v3

Vkngwrapper (proununced "Viking Wrapper") is a handwritten cgo wrapper for the Vulkan graphics and compute API. The goal is to produce fast, easy-to-use, low-go-allocation, and idiomatic Go code to communicate with your graphics card and enable games and other graphical applications.

To learn more about how to use vkngwrapper, check out the core library. For the future roadmap, see the org page.

Using Extensions

Once you've gotten the hang of the core library, you may wish to make use of one of Vullkan's many extensions. This library provides first-class support for a small-but-growing list of Vulkan extensions. It's easy enough to use an extension: just like core 1.1 and core 1.2 in the core library, most of the contents of an extension are constants and structures, which can be accessed via the package name, such as khr_imageless_framebuffer.FramebufferAttachmentImageInfo or khr_sampler_mirror_clamp_to_edge.SamplerAddressModeMirrorClampToEdge.

For extensions that add new commands, you can create an ExtensionDriver object using CreateExtensionDriverFromCoreDriver. Commands can be called on the new Extension object. These methods will return nil if the Instance or Device was not created with the extension in question active. For your convenience, ExtensionName constants, such as khr_external_memory.ExtensionName are provided for all extensions, which you can pass to Instance/Device creation.

Example:

	extensionDriver := ext_debug_utils.CreateExtensionFromCoreDriver(instanceDriver)
	debugMessenger, _, err := extensionDriver.CreateDebugUtilsMessenger(nil, ext_debug_utils.DebugUtilsMessengerCreateInfo{
      MessageSeverity: ext_debug_utils.SeverityError | ext_debug_utils.SeverityWarning,
      MessageType:     ext_debug_utils.TypeGeneral | ext_debug_utils.TypeValidation | ext_debug_utils.TypePerformance,
      UserCallback:    logValidationFunc,
    })
	if err != nil {
		return err
	}

ExtensionLibrary

Creating ExtensionDriver objects from a package function is convenient, but what if you'd like to mock ExtensionDriver objects in unit tests? The ExtensionLibrary object and its mock can help with that. The ExtensionLibrary is a simple mockable passthrough interface to the CreateExtensionDriverFromCoreDriver method for each package that has one.

Supported Extensions

  • Three major extensions used by most applications developers: vk_ext_debug_utils, vk_khr_surface, and vk_khr_swapchain
  • vk_khr_portability_subset and vk_khr_portability_enumeration, which can be used to add Mac/iOS support to your Vulkan applications
  • 23 extensions which were promoted to core 1.1
  • 24 extensions which were promoted to core 1.2
  • Four extensions used by arsenal/vam for memory management: amd_device_coherent_memory, ext_memory_budget, ext_memory_priority, and khr_maintenance4.

It's also easy to add support for new extensions! Feel free to contribute your favorite Vulkan extension!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
mocks
Package mock_debugutils is a generated GoMock package.
Package mock_debugutils is a generated GoMock package.
mocks
Package mock_full_screen_exclusive is a generated GoMock package.
Package mock_full_screen_exclusive is a generated GoMock package.
mocks
Package mock_host_query_reset is a generated GoMock package.
Package mock_host_query_reset is a generated GoMock package.
mocks
Package mock_acceleration_structure is a generated GoMock package.
Package mock_acceleration_structure is a generated GoMock package.
mocks
Package mock_bind_memory2 is a generated GoMock package.
Package mock_bind_memory2 is a generated GoMock package.
mocks
Package mock_buffer_device_address is a generated GoMock package.
Package mock_buffer_device_address is a generated GoMock package.
mocks
Package mock_create_renderpass2 is a generated GoMock package.
Package mock_create_renderpass2 is a generated GoMock package.
mocks
Package mock_deferred_host_operations is a generated GoMock package.
Package mock_deferred_host_operations is a generated GoMock package.
mocks
Package mock_descriptor_update_template is a generated GoMock package.
Package mock_descriptor_update_template is a generated GoMock package.
mocks
Package mock_device_group is a generated GoMock package.
Package mock_device_group is a generated GoMock package.
mocks
Package mock_device_group_creation is a generated GoMock package.
Package mock_device_group_creation is a generated GoMock package.
mocks
Package mock_draw_indirect_count is a generated GoMock package.
Package mock_draw_indirect_count is a generated GoMock package.
mocks
Package mock_external_fence_capabilities is a generated GoMock package.
Package mock_external_fence_capabilities is a generated GoMock package.
mocks
Package mock_external_memory_capabilities is a generated GoMock package.
Package mock_external_memory_capabilities is a generated GoMock package.
mocks
Package mock_external_semaphore_capabilities is a generated GoMock package.
Package mock_external_semaphore_capabilities is a generated GoMock package.
mocks
Package mock_get_memory_requirements2 is a generated GoMock package.
Package mock_get_memory_requirements2 is a generated GoMock package.
mocks
Package mock_get_physical_device_properties2 is a generated GoMock package.
Package mock_get_physical_device_properties2 is a generated GoMock package.
mocks
Package mock_get_surface_capabilities2 is a generated GoMock package.
Package mock_get_surface_capabilities2 is a generated GoMock package.
mocks
Package mock_maintenance1 is a generated GoMock package.
Package mock_maintenance1 is a generated GoMock package.
mocks
Package mock_maintenance3 is a generated GoMock package.
Package mock_maintenance3 is a generated GoMock package.
mocks
Package mock_maintenance4 is a generated GoMock package.
Package mock_maintenance4 is a generated GoMock package.
mocks
Package mock_sampler_ycbcr_conversion is a generated GoMock package.
Package mock_sampler_ycbcr_conversion is a generated GoMock package.
mocks
Package mock_surface is a generated GoMock package.
Package mock_surface is a generated GoMock package.
mocks
Package mock_swapchain is a generated GoMock package.
Package mock_swapchain is a generated GoMock package.
mocks
Package mock_timeline_semaphore is a generated GoMock package.
Package mock_timeline_semaphore is a generated GoMock package.
Code generated by library/cmd.
Code generated by library/cmd.
cmd command
mocks
Package mock_library is a generated GoMock package.
Package mock_library is a generated GoMock package.

Jump to

Keyboard shortcuts

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