18 releases
0.1.17 | May 1, 2023 |
---|---|
0.1.16 | Apr 30, 2023 |
#70 in Rendering
39 downloads per month
Used in 2 crates
1MB
17K
SLoC
vulk
vulk
is a highly experimental Vulkan bindings library, except it only includes the latest features and extensions, such as ray tracing, mesh shaders, descriptor buffers, shader objects, etc. vulk
will not maintain backward compatibility when a new Vulkan extension completely replaces a feature. For example, in vulk
, you can't use vertex shaders because mesh shaders are a superset of all geometry stages.
The design of vulk
is inspired by ash
, which is also what you should use for production use cases instead of vulk
.
Currently, the only supported driver is the latest NVIDIA April 27th, 2023 driver.
lib.rs
:
vulk
Commands
Initialization
vk::GetInstanceProcAddr
Return a function pointer for a commandvk::GetDeviceProcAddr
Return a function pointer for a commandvk::CreateInstance
Create a new Vulkan instancevk::DestroyInstance
Destroy an instance of Vulkan
Devices and Queues
vk::EnumeratePhysicalDevices
Enumerates the physical devices accessible to a Vulkan instancevk::GetPhysicalDeviceProperties2
Returns properties of a physical devicevk::GetPhysicalDeviceQueueFamilyProperties2
Reports properties of the queues of the specified physical devicevk::CreateDevice
Create a new device instancevk::DestroyDevice
Destroy a logical devicevk::GetDeviceQueue2
Get a queue handle from a device
Command Buffers
vk::CreateCommandPool
Create a new command pool objectvk::ResetCommandPool
Reset a command poolvk::DestroyCommandPool
Destroy a command pool objectvk::AllocateCommandBuffers
Allocate command buffers from an existing command poolvk::ResetCommandBuffer
Reset a command buffer to the initial statevk::FreeCommandBuffers
Free command buffersvk::BeginCommandBuffer
Start recording a command buffervk::EndCommandBuffer
Finish recording a command buffervk::QueueSubmit2
Submits command buffers to a queue
Synchronization and Cache Control
vk::CreateSemaphore
Create a new queue semaphore objectvk::DestroySemaphore
Destroy a semaphore objectvk::GetSemaphoreCounterValue
Query the current state of a timeline semaphorevk::WaitSemaphores
Wait for timeline semaphores on the hostvk::SignalSemaphore
Signal a timeline semaphore on the hostvk::CmdPipelineBarrier2
Insert a memory dependencyvk::QueueWaitIdle
Wait for a queue to become idlevk::DeviceWaitIdle
Wait for a device to become idlevk::GetCalibratedTimestampsEXT
Query calibrated timestamps
Render Pass
vk::CmdBeginRendering
Begin a dynamic render pass instancevk::CmdEndRendering
End a dynamic render pass instance
Shaders
vk::CreateShadersEXT
Create one or more new shadersvk::CmdBindShadersEXT
Bind shader objects to a command buffervk::DestroyShaderEXT
Destroy a shader objectvk::CreateShaderModule
Creates a new shader module objectvk::DestroyShaderModule
Destroy a shader module
Pipelines
vk::CreateRayTracingPipelinesKHR
Creates a new ray tracing pipeline objectvk::GetRayTracingShaderGroupHandlesKHR
Query ray tracing pipeline shader group handlesvk::DestroyPipeline
Destroy a pipeline objectvk::CmdBindPipeline
Bind a pipeline object to a command buffer
Memory Allocation
vk::GetPhysicalDeviceMemoryProperties2
Reports memory information for the specified physical devicevk::AllocateMemory
Allocate device memoryvk::FreeMemory
Free device memoryvk::MapMemory2KHR
Map a memory object into application address spacevk::UnmapMemory2KHR
Unmap a previously mapped memory object
Resource Creation
vk::CreateBuffer
Create a new buffer objectvk::DestroyBuffer
Destroy a buffer objectvk::CreateImage
Create a new image objectvk::DestroyImage
Destroy an image objectvk::CreateImageView
Create an image view from an existing imagevk::DestroyImageView
Destroy an image view objectvk::CreateAccelerationStructureKHR
Create a new acceleration structure objectvk::GetAccelerationStructureBuildSizesKHR
Retrieve the required size for an acceleration structurevk::DestroyAccelerationStructureKHR
Destroy an acceleration structure objectvk::GetAccelerationStructureDeviceAddressKHR
Query an address of a acceleration structurevk::GetDeviceBufferMemoryRequirements
Returns the memory requirements for specified Vulkan objectvk::GetDeviceImageMemoryRequirements
Returns the memory requirements for specified Vulkan objectvk::BindBufferMemory2
Bind device memory to buffer objectsvk::BindImageMemory2
Bind device memory to image objects
Samplers
vk::CreateSampler
Create a new sampler objectvk::DestroySampler
Destroy a sampler object
Resource Descriptors
vk::CreateDescriptorSetLayout
Create a new descriptor set layoutvk::DestroyDescriptorSetLayout
Destroy a descriptor set layout objectvk::CreatePipelineLayout
Creates a new pipeline layout objectvk::DestroyPipelineLayout
Destroy a pipeline layout objectvk::CmdPushConstants
Update the values of push constantsvk::GetBufferDeviceAddress
Query an address of a buffervk::GetDescriptorSetLayoutSizeEXT
Get the size of a descriptor set layout in memoryvk::GetDescriptorSetLayoutBindingOffsetEXT
Get the offset of a binding within a descriptor set layoutvk::GetDescriptorEXT
To get a descriptor to place in a buffervk::CmdBindDescriptorBuffersEXT
Binding descriptor buffers to a command buffervk::CmdSetDescriptorBufferOffsetsEXT
Setting descriptor buffer offsets in a command buffer
Queries
vk::CreateQueryPool
Create a new query pool objectvk::DestroyQueryPool
Destroy a query pool objectvk::ResetQueryPool
Reset queries in a query poolvk::CmdBeginQuery
Begin a queryvk::CmdEndQuery
Ends a queryvk::GetQueryPoolResults
Copy results of queries in a query pool to a host memory regionvk::CmdWriteTimestamp2
Write a device timestamp into a query object
Copy Commands
vk::CmdCopyBuffer2
Copy data between buffer regionsvk::CmdCopyImage2
Copy data between imagesvk::CmdCopyBufferToImage2
Copy data from a buffer into an imagevk::CmdCopyImageToBuffer2
Copy image data into a buffer
Drawing Commands
vk::CmdDrawMeshTasksEXT
Draw mesh task work itemsvk::CmdDrawMeshTasksIndirectEXT
Issue an indirect mesh tasks draw into a command buffervk::CmdDrawMeshTasksIndirectCountEXT
Perform an indirect mesh tasks draw with the draw count sourced from a buffer
Fixed-Function Vertex Post-Processing
vk::CmdSetViewportWithCount
Set the viewport count and viewports dynamically for a command buffervk::CmdSetScissorWithCount
Set the scissor count and scissor rectangular bounds dynamically for a command buffer
Rasterization
vk::CmdSetRasterizationSamplesEXT
Specify the rasterization samples dynamically for a command buffervk::CmdSetFrontFace
Set front face orientation dynamically for a command buffervk::CmdSetCullMode
Set cull mode dynamically for a command buffer
Fragment Operations
vk::CmdSetDepthTestEnable
Set depth test enable dynamically for a command buffervk::CmdSetDepthCompareOp
Set depth comparison operator dynamically for a command buffervk::CmdSetDepthWriteEnable
Set depth write enable dynamically for a command buffer
The Framebuffer
vk::CmdSetColorBlendEnableEXT
Specify the pname:blendEnable for each attachment dynamically for a command buffervk::CmdSetColorBlendEquationEXT
Specify the blend factors and operations dynamically for a command buffervk::CmdSetColorWriteMaskEXT
Specify the color write masks for each attachment dynamically for a command buffer
Dispatching Commands
vk::CmdDispatch
Dispatch compute work itemsvk::CmdDispatchIndirect
Dispatch compute work items with indirect parameters
Window System Integration (WSI)
vk::CreateWin32SurfaceKHR
Create a VkSurfaceKHR object for an Win32 native windowvk::DestroySurfaceKHR
Destroy a VkSurfaceKHR objectvk::GetPhysicalDeviceSurfaceSupportKHR
Query if presentation is supportedvk::GetPhysicalDeviceSurfaceCapabilitiesKHR
Query surface capabilitiesvk::GetPhysicalDeviceSurfaceFormatsKHR
Query color formats supported by surfacevk::GetPhysicalDeviceSurfacePresentModesKHR
Query supported presentation modesvk::CreateSwapchainKHR
Create a swapchainvk::DestroySwapchainKHR
Destroy a swapchain objectvk::GetSwapchainImagesKHR
Obtain the array of presentable images associated with a swapchainvk::AcquireNextImage2KHR
Retrieve the index of the next available presentable imagevk::QueuePresentKHR
Queue an image for presentation
Acceleration Structures
vk::CmdBuildAccelerationStructuresKHR
Build an acceleration structure
Ray Tracing
vk::CmdTraceRaysKHR
Initialize a ray tracing dispatchvk::CmdTraceRaysIndirect2KHR
Initialize an indirect ray tracing dispatch with indirect shader binding tables
Additional Capabilities
vk::GetPhysicalDeviceCalibrateableTimeDomainsEXT
Query calibrateable time domains
Debugging
vk::CreateDebugUtilsMessengerEXT
Create a debug messenger objectvk::DestroyDebugUtilsMessengerEXT
Destroy a debug messenger object
Extensions
VK_KHR_surface
VK_KHR_swapchain
VK_KHR_win32_surface
VK_EXT_debug_utils
VK_KHR_acceleration_structure
VK_KHR_ray_tracing_pipeline
VK_KHR_ray_query
VK_EXT_calibrated_timestamps
VK_EXT_validation_features
VK_KHR_deferred_host_operations
VK_KHR_map_memory2
VK_KHR_pipeline_library
VK_KHR_synchronization2
VK_EXT_descriptor_buffer
VK_EXT_mesh_shader
VK_KHR_ray_tracing_maintenance1
VK_EXT_shader_object
Dependencies
~0.4–6MB
~19K SLoC