Skip to main content

Crate bedrock

Crate bedrock 

Source
Expand description

Glue library between Vulkan and Rust

Some documentation comments are from Vulkan Manual Page. Copyright (c) 2014-2017 Khronos Group.

§Compile Options

  • Implements: Enable Vulkan implementations(functions)
  • Multithreaded: Enables to use objects from some threads(experimental)
  • Presentation: Enable rendering features to Window/Display(brvk::VK_KHR_surface/brvk::VK_KHR_swapchain/brvk::VK_KHR_display)
  • alloc(default): Enable extra functionalities that may allocate some memory inside
  • brvk::VK_***: Enable Vulkan extensions(same name as each extensions)

Re-exports§

pub use bedrock_vk as vk;
pub use resources::*;

Modules§

error
resources
Vulkan Resources
vkfn_wrapperImplements

Macros§

DescriptorUpdateTemplateEntries
DescriptorUpdateTemplateEntry

Structs§

AccessFlags
Access Types
AccessFlags2
AccessFlags2ReadWriteBitsVK_KHR_synchronization2
AndroidSurfaceCreateInfoVK_KHR_android_surface and VK_KHR_surface
ApplicationInfo
ArrayQueryResult
An result type of querying an array of objects
AttachmentDescription
AttachmentDescription2VK_KHR_create_renderpass2
AttachmentReference
AttachmentReference2VK_KHR_create_renderpass2
BindSparseInfo
BufferCopy
BufferMemoryBarrier
Wrapper object of brvk::VkBufferMemoryBarrier, describes a memory barrier of a buffer.
BufferMemoryBarrier2VK_KHR_synchronization2
ClearColorValue
A color value representation for clearing operations. Constructable from RGBA values using From::from.
ClearValue
CmdRecord
The recording state of command buffers
CommandBufferAllocateInfo
CommandBufferBeginInfo
CommandBufferFixedCountAllocateInfo
CommandBufferInheritanceInfo
CommandBufferObject
Opaque handle to a command buffer object
CommandBufferSubmitInfoVK_KHR_synchronization2
CommandPoolCreateInfo
CommandPoolObject
CommandPoolResetFlags
Bitmask controlling behavior of a command pool reset.
CommandPoolTrimFlags
CompositeAlphaFlagsVK_KHR_surface
Alpha compositing modes supported on a device
ComputePipelineCreateInfo
Structure specifying parameters of a newly created compute pipeline
CullModeFlags
DebugReportCallbackCreateInfoVK_EXT_debug_report
DebugReportCallbackObjectVK_EXT_debug_report
Opaque object to a debug report callback object
DebugUtilsMessageSeverityFlagsVK_EXT_debug_utils
Bitmask specifying which severities of events cause a debug messenger callback.
DebugUtilsMessageTypeFlagsVK_EXT_debug_utils
Bitmask specifying which types of events cause a debug messenger callback.
DebugUtilsMessengerCreateInfoVK_EXT_debug_utils
DebugUtilsMessengerObjectVK_EXT_debug_utils
DebugUtilsObjectNameInfoVK_EXT_debug_utils
DependencyInfoVK_KHR_synchronization2
DescriptorBufferInfo
DescriptorImageInfo
DescriptorPointer
Pointer for descriptor array in set
DescriptorPoolCreateInfo
DescriptorPoolObject
DescriptorSet
DescriptorSetCopyInfo
DescriptorSetLayoutBinding
DescriptorSetLayoutCreateInfo
DescriptorSetLayoutObject
Opaque handle to a descriptor set layout object
DescriptorSetWriteInfo
DescriptorUpdateTemplateObjectVK_KHR_descriptor_update_template
DeviceCreateInfo
DeviceObject
Opaque handle to a device object
DeviceQueueCreateInfo
Family Index, Queue Priorities
DeviceResolverImplImplements
DisplayVK_KHR_display
DisplayModeVK_KHR_display
DisplayModeCreateInfoVK_KHR_display
DisplayModePropertiesVK_KHR_display
DisplayPlanePropertiesWithPhysicalDeviceRefVK_KHR_display
DisplayPropertiesVK_KHR_display
DisplayPropertiesWithPhysicalDeviceRefVK_KHR_display
DisplaySurfaceCreateInfoVK_KHR_display and VK_KHR_surface
EmptyBindingOpBatch
EmptySubmissionBatchDeprecated
EventCreateInfo
EventObject
Extends
Extent2D
Extent3D
ExternalMemoryImageCreateInfoVK_KHR_external_memory
FenceCreateInfo
FenceFdGetInfoVK_KHR_external_fence_fd
FenceObject
FormatQuery
Arbitrary queries of Format
FormatQueryPred
Predication style of Format Selection Query
FramebufferCreateInfo
FramebufferObject
Opaque handle to a framebuffer object
GenericVulkanSinkStructure
GenericVulkanStructure
GraphicsPipelineCreateInfo
ImageCopy
ImageMemoryBarrier
Wrapper object of brvk::VkImageMemoryBarrier, derscribes a memory barrier of an image.
ImageMemoryBarrier2VK_KHR_synchronization2
ImportFenceFdInfoVK_KHR_external_fence_fd
ImportMemoryFdInfoVK_KHR_external_memory_fd
ImportMemoryHostPointerInfoVK_EXT_external_memory_host
InstanceCreateFlags
InstanceCreateInfo
InstanceObject
Opaque handle to a instance object
IterPhysicalDevices
MemoryBarrier2VK_KHR_synchronization2
MemoryGetFdInfoVK_KHR_external_memory_fd
MemoryHeap
MemoryHeapFlags
Bitmask specifying attribute flags for a heap
MemoryProperties
Device memory properties
MemoryPropertyFlags
Bitmask specifying properties for a memory type
MemoryType
MetalSurfaceCreateInfoVK_EXT_metal_surface and VK_KHR_surface
Offset2D
Offset3D
PhysicalDeviceFeatures2VK_KHR_get_physical_device_properties2
PhysicalDeviceMemoryProperties
PhysicalDeviceObject
Opaque handle to a physical device object
PhysicalDeviceSynchronization2FeaturesVK_KHR_synchronization2
PhysicalDeviceTimelineSemaphoreFeaturesVK_KHR_timeline_semaphore
PipelineCacheCreateInfo
PipelineCacheObject
Opaque handle to a pipeline cache object
PipelineColorBlendAttachmentState
PipelineColorBlendStateCreateInfo
Structure specifying parameters of a newly created pipeline color blend state
PipelineDepthStencilStateCreateInfo
Structure specifying parameters of a newly created pipeline depth stencil state
PipelineDynamicStateCreateInfo
Structure specifying parameters of a newly created pipeline dynamic state
PipelineInputAssemblyStateCreateInfo
Structure specifying parameters of a newly created pipeline input assembly state
PipelineLayoutCreateInfo
PipelineLayoutObject
Opaque handle to a pipeline layout object
PipelineMultisampleStateCreateInfo
Structure specifying parameters of a newly created pipeline multisample state
PipelineObject
Opaque handle to a pipeline object
PipelineRasterizationConservativeStateCreateInfoVK_EXT_conservative_rasterization
Structure specifying conservative raster state
PipelineRasterizationLineStateCreateInfoVK_KHR_line_rasterization
Structure specifying parameters of a newly created pipeline line rasterization state
PipelineRasterizationStateCreateInfo
Structure specifying parameters of a newly created pipeline rasterization state
PipelineShaderStage
PipelineStageFlags
Bitmask specifying pipeline stages
PipelineStageFlags2
Bitmask specifying pipeline stages (extended)
PipelineTessellationStateCreateInfo
Structure specifying parameters of a newly created pipeline tessellation state
PipelineVertexInputStateCreateInfo
Structure specifying parameters of a newly created pipeline vertex input state
PipelineViewportStateCreateInfo
Structure specifying parameters of a newly created pipeline viewport state
PresentInfoVK_KHR_swapchain
PushConstantRange
QueryPipelineStatisticFlags
Bitmask specifying queried pipeline statistics
QueryPoolCreateInfo
Structure specifying parameters of a newly created query pool
QueryPoolObject
Opaque handle to a query pool object
QueryResultFlags
Bitmask specifying how and when query results are returned
QueueFamilies
List of queue families
QueueFamilyProperties
QueueFlags
Set of bit of queue flags
QueueObject
Opaque handle to a queue object
Rect2D
RenderPassBeginInfo
RenderPassCreateInfo
Builder structure to construct the RenderPass
RenderPassCreateInfo2VK_KHR_create_renderpass2
RenderPassObject
Opaque handle to a render pass object
ResolvedFnCellImplements
SemaphoreCreateInfo
SemaphoreObject
SemaphoreSignalInfoVK_KHR_timeline_semaphore
SemaphoreSubmitInfoVK_KHR_synchronization2
SemaphoreTypeCreateInfoVK_KHR_timeline_semaphore
SemaphoreWaitInfoVK_KHR_timeline_semaphore
ShaderModuleCreateInfo
ShaderModuleObject
Opaque handle to a shader module object
SinkStructureChainIterator
SparseBindingOpBatchWithBufferBinds
SparseBindingOpBatchWithImageBinds
SparseBindingOpBatchWithImageOpaqueBinds
SparseBindingOpBatchWithSignalSemaphores
SparseBindingOpBatchWithWaitSemaphores
SparseBufferMemoryBindInfo
SparseImageMemoryBind
SparseImageMemoryBindInfo
SparseImageOpaqueMemoryBindInfo
SparseMemoryBind
SpecializationInfo
SpecializationMapEntry
StencilOpState
StructureChainIterator
SubmissionWithCommandBuffersDeprecatedalloc
SubmissionWithSignalSemaphoresDeprecatedalloc
SubmissionWithWaitSemaphoresDeprecatedalloc
SubmitInfo
SubmitInfo2VK_KHR_synchronization2
SubpassBeginInfoVK_KHR_create_renderpass2
SubpassDependency2VK_KHR_create_renderpass2
SubpassDescription
Builder structure to construct the VkSubpassDescription
SubpassDescription2VK_KHR_create_renderpass2
SubpassEndInfoVK_KHR_create_renderpass2
SubpassRef
A reference to a subpass in a render pass object.
SurfaceCapabilitiesVK_KHR_surface
SurfaceFormat
SurfaceFullScreenExclusiveInfoVK_EXT_full_screen_exclusive and VK_KHR_surface
SurfaceObjectVK_KHR_surface
Opaque handle to a surface object
SurfaceSwapchainObjectVK_KHR_surface and VK_KHR_swapchain
Opaque handle to as swapchain object, backed with specific surface
SurfaceTransformFlagsVK_KHR_surface
Presentation transforms supported on a device
SwapchainCreateInfoVK_KHR_surface and VK_KHR_swapchain
SwapchainWithSurfaceBuilderVK_KHR_surface and VK_KHR_swapchain
Builder object to construct a Swapchain, backed with a surface
SynchronizedCommandBuffer
TemporalSubmissionBatchResourcesDeprecatedalloc
TimelineSemaphoreSubmitInfoVK_KHR_timeline_semaphore
Version
A Value Object represents the Vulkan version number
VertexInputAttributeDescription
VertexInputBindingDescription
Viewport
VkHandleRef
A smart handle to a Vulkan object that holds a source lifetime (bitpattern as same as native handle type)
VkHandleRefMut
A smart handle to a Vulkan object that holds a source lifetime and mutable-borrowing (bitpattern as same as native handle type)
WaylandSurfaceCreateInfoVK_KHR_surface and VK_KHR_wayland_surface
XcbSurfaceCreateInfoVK_KHR_surface and VK_KHR_xcb_surface
XlibSurfaceCreateInfoVK_KHR_surface and VK_KHR_xlib_surface

Enums§

CommandBufferLevel
CompareOp
Stencil comparison function
CompletionHandler
A semaphore or a fence
CompletionHandlerMut
A semaphore or a fence, externally synchronized on host access
ConservativeRasterizationModeVK_EXT_conservative_rasterization
Specify the conservative rasterization mode
DebugReportObjectTypeVK_EXT_debug_marker or VK_EXT_debug_report
The type of an object passed to the VkDebugMarkerObjectNameInfoEXT and VkDebugMarkerObjectTagInfoEXT commands
DebugUtilsMessageSeverityFlagVK_EXT_debug_utils
DescriptorContents
DescriptorType
Specified the type of a descriptor in a descriptor set
DisplayPlaneAlphaVK_KHR_display
Alpha blending type
ElementType
Containing component element in format
ExternalFenceFdTypeVK_KHR_external_fence_fd
ExternalMemoryHandleTypeFdVK_KHR_external_memory_fd
ExternalMemoryHandleTypeHostVK_EXT_external_memory_host
FormatComponents
Containing Components in Format(Order is not considered)
FrontFace
FullScreenExclusiveVK_EXT_full_screen_exclusive and VK_KHR_surface
Hint values an application can specify affecting full-screen transition behavior.
IndexType
Type of index buffer indices
LineRasterizationModeVK_KHR_line_rasterization
Line rasterization modes
LoadOp
LogicOp
Framebuffer logical operations
OcclusionQuery
Enabling or disabling the occlusion query
PipelineBindPoint
Specify the bind point of a pipeline object to a command buffer
PolygonMode
PresentModeVK_KHR_surface
Presentation mode supported for a surface
PresentResultVK_KHR_swapchain
PrimitiveTopology
Supported primitive topologies
QueryResult
QueryType
Specify the type of queries managed by a query pool
SemaphoreTypeVK_KHR_timeline_semaphore
ShaderStage
StencilFaceMask
Bitmask specifying sets of stencil state for which to update the compare mask
StencilOp
Stencil action function
StoreOp
Possible argument values of AttachmentDescription::store_op and stencil_store_op, specifying how the contents of the attachment are treated.
SubpassContents
Specify how commands in the first subpass of a render pass are provided2
SubpassIndexVK_KHR_create_renderpass2
Index specifying a subpass
TimeoutableWaitResult

Traits§

AnalogNumRange
AnyRenderPassCreateInfoImplements
AsFormat
Provides commonly used corresponding VkFormat for types
Chainable
CommandBuffer
CommandBufferMut
CommandPool
CommandPoolMut
ConcreteDeviceRenderPass
DebugReportCallbackVK_EXT_debug_report
DebugUtilsMessengerVK_EXT_debug_utils
DescriptorPool
DescriptorPoolMut
DescriptorSetLayout
DescriptorUpdateTemplateVK_KHR_descriptor_update_template
Device
DeviceBindMemory2ExtensionVK_KHR_bind_memory2
DeviceChild
Child of a device object
DeviceChildFence
DeviceChildHandle
Child of a device object(raw handle)
DeviceChildTransferrable
DeviceCreateRenderPass2ExtensionVK_KHR_create_renderpass2
DeviceDescriptorUpdateTemplateExtensionVK_KHR_descriptor_update_template
DeviceExternalFenceFdExtensionVK_KHR_external_fence_fd
DeviceExternalMemoryFdExtensionVK_KHR_external_memory_fd
DeviceExternalMemoryHostExtensionVK_EXT_external_memory_host
DeviceFullScreenExclusiveExtensionVK_EXT_full_screen_exclusive
DeviceGetMemoryRequirements2ExtensionVK_KHR_get_memory_requirements2
DeviceImageDrmFormatModifierExtensionVK_EXT_image_drm_format_modifier
DeviceMaintenance1ExtensionVK_KHR_maintenance1
DeviceMut
DevicePushDescriptorExtensionVK_KHR_push_descriptor
DeviceSampleLocationsExtensionVK_EXT_sample_locations
DeviceSynchronization2ExtensionVK_KHR_synchronization2
DeviceTimelineSemaphoreExtensionVK_KHR_timeline_semaphore
Event
EventMut
Extendable
Fence
FenceMut
Framebuffer
Instance
A Vulkan Instance interface
InstanceAcquireXlibDisplayExtensionVK_EXT_acquire_xlib_display
InstanceChild
InstanceChildTransferrable
InstanceDebugReportExtensionVK_EXT_debug_report
InstanceDebugUtilsExtensionVK_EXT_debug_utils
InstanceDirectModeDisplayExtensionVK_EXT_direct_mode_display
InstanceExternalFenceCapabilitiesExtensionVK_KHR_external_fence_capabilities
InstanceFullScreenExclusiveExtensionVK_EXT_full_screen_exclusive
InstanceGetPhysicalDeviceProperties2ExtensionVK_KHR_get_physical_device_properties2
InstanceGetSurfaceCapabilities2ExtensionVK_KHR_get_surface_capabilities2
InstanceSampleLocationsExtensionVK_EXT_sample_locations
PhysicalDevice
A PhysicalDevice interface
Pipeline
PipelineCache
PipelineCacheMut
PipelineLayout
PixelFormat
For testing format traits
QueryPool
Queue
QueueMut
RenderPass
ResolverInterfaceImplements
Semaphore
SemaphoreMut
ShaderModule
SinkStructureChainQuery
SparseBindingOpBatch
SpecializationConstants
A trait for types that can be used as specialization constants.
Status
StructureChainQuery
SubmissionBatchDeprecated
SurfaceVK_KHR_surface
SurfaceCreateInfoVK_KHR_surface
SwapchainVK_KHR_surface and VK_KHR_swapchain
SwapchainImageExtVK_KHR_surface and VK_KHR_swapchain
SwapchainMutVK_KHR_surface and VK_KHR_swapchain
TransferSurfaceObjectVK_KHR_surface
TypedVulkanSinkStructure
Trait for Vulkan structures that have a known [crate::vk::VkStructureType] at compile time.
TypedVulkanStructure
Trait for Vulkan structures that have a known [crate::vk::VkStructureType] at compile time.
VkDeviceChildNonExtDestroyable
VkHandle
Wrapping a Vulkan Dispatchable/Nondispatchable Handler
VkHandleExt
Extension methods(not dyn compatible) for VkHandle
VkHandleMut
Wrapping a Vulkan Dispatchable/Nondispatchable Mutable Handler
VkObject
An object in Vulkan
VkRawHandle
VulkanSinkStructure
Trait for Vulkan structures that can be cast to GenericVulkanSinkStructure safely.
VulkanStructure
Trait for Vulkan structures that can be cast to GenericVulkanStructure safely.
VulkanStructureProvider

Functions§

chain_structures
chains a list of vulkan structures
instance_extension_properties_allocalloc and Implements
Returns up to all of global extension properties
instance_extension_properties_str_allocalloc and Implements
Returns up to all of global extension properties
instance_layer_properties_allocalloc and Implements
Returns up to all of global layer properties
instance_versionImplements
Query instance-level version before instance creation
load_function_unconstraintedImplements
Loads a function using the resolver, without any constraints on the function’s type.
load_symbol_unconstraintedImplements
Loads a symbol using the resolver, without any constraints on the symbol’s type.
uninit_sink

Type Aliases§

DeviceSize
DisplayPlanePropertiesVK_KHR_display
Format
PhysicalDeviceFeatures
PhysicalDeviceProperties
PhysicalDeviceVulkan11FeaturesAllow1_2APIs
PhysicalDeviceVulkan11PropertiesAllow1_2APIs
Result

Derive Macros§

SpecializationConstants
Provides safe implementation for SpecializationConstants by deriving from structs.