Skip to content

Instantly share code, notes, and snippets.

@Osspial
Created May 19, 2016 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Osspial/7ddb67a197b10bba42418e1ff744cfd8 to your computer and use it in GitHub Desktop.
Save Osspial/7ddb67a197b10bba42418e1ff744cfd8 to your computer and use it in GitHub Desktop.
fn main() {} mod vk {
pub use std::os::raw::c_ulonglong;
pub use self::types::*;
pub use self::cmds::*;
#[doc(hidden)]
#[allow(dead_code)]
pub fn unloaded_function_panic() -> ! {
panic!("Attempted to run unloaded vulkan function")
}
macro_rules! handle_nondispatchable {
($name: ident) => {
#[repr(C)]
#[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash)]
pub struct $name (uint64_t);
impl fmt::Pointer for $name {
fn fmt(&self, f: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
write!(f, "0x{:x}", self.0)
}
}
impl fmt::Debug for $name {
fn fmt(&self, f: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
write!(f, "0x{:x}", self.0)
}
}
}
}
macro_rules! vk_bitflags_wrapped {
($name: ident, $all: expr, $flag_type: ty) => {
#[repr(C)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct $name {flags: $flag_type}
impl fmt::Debug for $name {
fn fmt(&self, f: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
write!(f, "{}({:b})", stringify!($name), self.flags)
}
}
impl $name {
#[inline]
pub fn empty() -> $name {
$name {flags: 0}
}
#[inline]
pub fn all() -> $name {
$name {flags: $all}
}
#[inline]
pub fn flags(self) -> $flag_type {
self.flags
}
#[inline]
pub fn from_flags(flags: $flag_type) -> Option<$name> {
if flags & !$all == 0 {
Some($name {flags: flags})
} else {
None
}
}
#[inline]
pub fn from_flags_truncate(flags: $flag_type) -> $name {
$name {flags: flags & $all}
}
#[inline]
pub fn is_empty(self) -> bool {
self == $name::empty()
}
#[inline]
pub fn is_all(self) -> bool {
self & $name::all() == $name::all()
}
#[inline]
pub fn intersects(self, other: $name) -> bool {
self & other != $name::empty()
}
/// Returns true of `other` is a subset of `self`
#[inline]
pub fn subset(self, other: $name) -> bool {
self & other == other
}
}
impl BitOr for $name {
type Output = $name;
#[inline]
fn bitor(self, rhs: $name) -> $name {
$name {flags: self.flags | rhs.flags }
}
}
impl BitOrAssign for $name {
#[inline]
fn bitor_assign(&mut self, rhs: $name) {
*self = *self | rhs
}
}
impl BitAnd for $name {
type Output = $name;
#[inline]
fn bitand(self, rhs: $name) -> $name {
$name {flags: self.flags & rhs.flags}
}
}
impl BitAndAssign for $name {
#[inline]
fn bitand_assign(&mut self, rhs: $name) {
*self = *self & rhs
}
}
impl BitXor for $name {
type Output = $name;
#[inline]
fn bitxor(self, rhs: $name) -> $name {
$name {flags: self.flags ^ rhs.flags}
}
}
impl BitXorAssign for $name {
#[inline]
fn bitxor_assign(&mut self, rhs: $name) {
*self = *self ^ rhs
}
}
impl Sub for $name {
type Output = $name;
#[inline]
fn sub(self, rhs: $name) -> $name {
self & !rhs
}
}
impl SubAssign for $name {
#[inline]
fn sub_assign(&mut self, rhs: $name) {
*self = *self - rhs
}
}
impl Not for $name {
type Output = $name;
#[inline]
fn not(self) -> $name {
self ^ $name::all()
}
}
}
}
macro_rules! vk_struct_bindings {
($($raw_name: expr, $name: ident ($($param_name: ident: $param: ty),*,) -> $ret: ty);+;) => {
$(type $name = unsafe extern "system" fn($($param),*) -> $ret);+;
pub struct FnPtr {
pub raw_name: &'static str,
fn_ptr: *const ()
}
impl FnPtr {
pub fn is_loaded(&self) -> bool {
self.fn_ptr != unloaded_function_panic as *const ()
}
}
pub struct Vk {
$($name: FnPtr),+
}
impl Vk {
pub fn new() -> Vk {unsafe{
use std::mem;
let mut vk: Vk = mem::uninitialized();
$(
vk.$name = FnPtr{ raw_name: $raw_name, fn_ptr: unloaded_function_panic as *const ()};
)+
vk
}}
pub fn load_with<F: FnMut(&str) -> *const ()>(&mut self, mut load_fn: F) -> ::std::result::Result<(), Vec<&'static str>> {
use std::ptr;
let mut fn_buf: *const ();
let mut unloaded_fns = Vec::new();
$(
fn_buf = load_fn($raw_name);
if ptr::null() != fn_buf {
self.$name = FnPtr{ raw_name: $raw_name, fn_ptr: fn_buf };
} else if self.$name.fn_ptr != unloaded_function_panic as *const () {
unloaded_fns.push($raw_name)
}
)+
if 0 == unloaded_fns.len() {
Ok(())
} else {
Err(unloaded_fns)
}
}
$(
pub unsafe extern "system" fn $name(&self, $($param_name: $param),*) -> $ret {
use std::mem;
mem::transmute::<_, $name>(self.$name.fn_ptr)($($param_name),*)
}
)+
}
}
}
#[macro_export]
macro_rules! vk_make_version {
($major: expr, $minor: expr, $patch: expr) => ((($major as uint32_t) << 22) | (($minor as uint32_t) << 12) | $patch as uint32_t)
}
#[macro_export]
macro_rules! vk_version_major {
($major: expr) => (($major as uint32_t) << 22)
}
#[macro_export]
macro_rules! vk_version_minor {
($minor: expr) => ((($minor as uint32_t) << 12) & 0x3ff)
}
#[macro_export]
macro_rules! vk_version_patch {
($minor: expr) => (($minor as uint32_t) & 0xfff)
}
pub mod types {
#![allow(non_camel_case_types, dead_code)]
use std::fmt; use std::ops::*; use std::ffi::CStr; use super::*;
pub type c_void = ();
pub type c_char = i8;
pub type uint32_t = u32;
pub type size_t = usize;
pub type uint64_t = u64;
pub type uint8_t = u8;
pub type c_float = f32;
pub type int32_t = i32;
pub type VkInstanceCreateFlags = VkFlags;
pub type VkFlags = uint32_t;
pub type VkBool32 = uint32_t;
pub type VkDeviceSize = uint64_t;
pub type VkDeviceCreateFlags = VkFlags;
pub type VkDeviceQueueCreateFlags = VkFlags;
pub type VkMemoryMapFlags = VkFlags;
pub type VkSemaphoreCreateFlags = VkFlags;
pub type VkEventCreateFlags = VkFlags;
pub type VkQueryPoolCreateFlags = VkFlags;
pub type VkBufferViewCreateFlags = VkFlags;
pub type VkImageViewCreateFlags = VkFlags;
pub type VkShaderModuleCreateFlags = VkFlags;
pub type VkPipelineCacheCreateFlags = VkFlags;
pub type VkPipelineShaderStageCreateFlags = VkFlags;
pub type VkPipelineVertexInputStateCreateFlags = VkFlags;
pub type VkPipelineInputAssemblyStateCreateFlags = VkFlags;
pub type VkPipelineTessellationStateCreateFlags = VkFlags;
pub type VkPipelineViewportStateCreateFlags = VkFlags;
pub type VkPipelineRasterizationStateCreateFlags = VkFlags;
pub type VkPipelineMultisampleStateCreateFlags = VkFlags;
pub type VkSampleMask = uint32_t;
pub type VkPipelineDepthStencilStateCreateFlags = VkFlags;
pub type VkPipelineColorBlendStateCreateFlags = VkFlags;
pub type VkPipelineDynamicStateCreateFlags = VkFlags;
pub type VkPipelineLayoutCreateFlags = VkFlags;
pub type VkSamplerCreateFlags = VkFlags;
pub type VkDescriptorSetLayoutCreateFlags = VkFlags;
pub type VkDescriptorPoolResetFlags = VkFlags;
pub type VkFramebufferCreateFlags = VkFlags;
pub type VkRenderPassCreateFlags = VkFlags;
pub type VkSubpassDescriptionFlags = VkFlags;
pub const VK_MAX_PHYSICAL_DEVICE_NAME_SIZE: size_t = 256;
pub const VK_UUID_SIZE: size_t = 16;
pub const VK_MAX_EXTENSION_NAME_SIZE: size_t = 256;
pub const VK_MAX_DESCRIPTION_SIZE: size_t = 256;
pub const VK_MAX_MEMORY_TYPES: size_t = 32;
pub const VK_MAX_MEMORY_HEAPS: size_t = 16;
pub const VK_LOD_CLAMP_NONE: c_float = 1000.0;
pub const VK_REMAINING_MIP_LEVELS: uint32_t = !0;
pub const VK_REMAINING_ARRAY_LAYERS: uint32_t = !0;
pub const VK_WHOLE_SIZE: c_ulonglong =!0;
pub const VK_ATTACHMENT_UNUSED: uint32_t = !0;
pub const VK_TRUE: uint32_t = 1;
pub const VK_FALSE: uint32_t = 0;
pub const VK_QUEUE_FAMILY_IGNORED: uint32_t = !0;
pub const VK_SUBPASS_EXTERNAL: uint32_t = !0;
pub const VK_KHR_SURFACE_SPEC_VERSION: uint32_t = 25;
pub const VK_KHR_SURFACE_EXTENSION_NAME: &'static str = "VK_KHR_surface";
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkInstanceCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkInstanceCreateFlags,
pub p_application_info: *const VkApplicationInfo,
pub enabled_layer_count: uint32_t,
pub pp_enabled_layer_names: *const *const c_char,
pub enabled_extension_count: uint32_t,
pub pp_enabled_extension_names: *const *const c_char,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkApplicationInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub p_application_name: *const c_char,
pub application_version: uint32_t,
pub p_engine_name: *const c_char,
pub engine_version: uint32_t,
pub api_version: uint32_t,
}
#[repr(C)]
pub struct VkAllocationCallbacks {
pub p_user_data: *mut c_void,
pub pfn_allocation: PFN_vkAllocationFunction,
pub pfn_reallocation: PFN_vkReallocationFunction,
pub pfn_free: PFN_vkFreeFunction,
pub pfn_internal_allocation: PFN_vkInternalAllocationNotification,
pub pfn_internal_free: PFN_vkInternalFreeNotification,
}
impl Clone for VkAllocationCallbacks {
fn clone(&self) -> VkAllocationCallbacks {
VkAllocationCallbacks {
p_user_data: self.p_user_data.clone(),
pfn_allocation: self.pfn_allocation,
pfn_reallocation: self.pfn_reallocation,
pfn_free: self.pfn_free,
pfn_internal_allocation: self.pfn_internal_allocation,
pfn_internal_free: self.pfn_internal_free,
}
}
}
impl fmt::Debug for VkAllocationCallbacks {
fn fmt(&self, fmt: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
fmt.debug_struct("VkAllocationCallbacks")
.field("p_user_data", &self.p_user_data)
.field("pfn_allocation", &(self.pfn_allocation as *const ()))
.field("pfn_reallocation", &(self.pfn_reallocation as *const ()))
.field("pfn_free", &(self.pfn_free as *const ()))
.field("pfn_internal_allocation", &(self.pfn_internal_allocation as *const ()))
.field("pfn_internal_free", &(self.pfn_internal_free as *const ()))
.finish()
}
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPhysicalDeviceFeatures {
pub robust_buffer_access: VkBool32,
pub full_draw_index_uint32: VkBool32,
pub image_cube_array: VkBool32,
pub independent_blend: VkBool32,
pub geometry_shader: VkBool32,
pub tessellation_shader: VkBool32,
pub sample_rate_shading: VkBool32,
pub dual_src_blend: VkBool32,
pub logic_op: VkBool32,
pub multi_draw_indirect: VkBool32,
pub draw_indirect_first_instance: VkBool32,
pub depth_clamp: VkBool32,
pub depth_bias_clamp: VkBool32,
pub fill_mode_non_solid: VkBool32,
pub depth_bounds: VkBool32,
pub wide_lines: VkBool32,
pub large_points: VkBool32,
pub alpha_to_one: VkBool32,
pub multi_viewport: VkBool32,
pub sampler_anisotropy: VkBool32,
pub texture_compression_etc2: VkBool32,
pub texture_compression_astc_ldr: VkBool32,
pub texture_compression_bc: VkBool32,
pub occlusion_query_precise: VkBool32,
pub pipeline_statistics_query: VkBool32,
pub vertex_pipeline_stores_and_atomics: VkBool32,
pub fragment_stores_and_atomics: VkBool32,
pub shader_tessellation_and_geometry_point_size: VkBool32,
pub shader_image_gather_extended: VkBool32,
pub shader_storage_image_extended_formats: VkBool32,
pub shader_storage_image_multisample: VkBool32,
pub shader_storage_image_read_without_format: VkBool32,
pub shader_storage_image_write_without_format: VkBool32,
pub shader_uniform_buffer_array_dynamic_indexing: VkBool32,
pub shader_sampled_image_array_dynamic_indexing: VkBool32,
pub shader_storage_buffer_array_dynamic_indexing: VkBool32,
pub shader_storage_image_array_dynamic_indexing: VkBool32,
pub shader_clip_distance: VkBool32,
pub shader_cull_distance: VkBool32,
pub shader_float64: VkBool32,
pub shader_int64: VkBool32,
pub shader_int16: VkBool32,
pub shader_resource_residency: VkBool32,
pub shader_resource_min_lod: VkBool32,
pub sparse_binding: VkBool32,
pub sparse_residency_buffer: VkBool32,
pub sparse_residency_image2d: VkBool32,
pub sparse_residency_image3d: VkBool32,
pub sparse_residency2samples: VkBool32,
pub sparse_residency4samples: VkBool32,
pub sparse_residency8samples: VkBool32,
pub sparse_residency16samples: VkBool32,
pub sparse_residency_aliased: VkBool32,
pub variable_multisample_rate: VkBool32,
pub inherited_queries: VkBool32,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkFormatProperties {
pub linear_tiling_features: VkFormatFeatureFlags,
pub optimal_tiling_features: VkFormatFeatureFlags,
pub buffer_features: VkFormatFeatureFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkImageFormatProperties {
pub max_extent: VkExtent3D,
pub max_mip_levels: uint32_t,
pub max_array_layers: uint32_t,
pub sample_counts: VkSampleCountFlags,
pub max_resource_size: VkDeviceSize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkExtent3D {
pub width: uint32_t,
pub height: uint32_t,
pub depth: uint32_t,
}
#[repr(C)]
pub struct VkPhysicalDeviceProperties {
pub api_version: uint32_t,
pub driver_version: uint32_t,
pub vendor_id: uint32_t,
pub device_id: uint32_t,
pub device_type: VkPhysicalDeviceType,
pub device_name: [c_char; VK_MAX_PHYSICAL_DEVICE_NAME_SIZE],
pub pipeline_cache_uuid: [uint8_t; VK_UUID_SIZE],
pub limits: VkPhysicalDeviceLimits,
pub sparse_properties: VkPhysicalDeviceSparseProperties,
}
impl Clone for VkPhysicalDeviceProperties {
fn clone(&self) -> VkPhysicalDeviceProperties {
VkPhysicalDeviceProperties {
api_version: self.api_version.clone(),
driver_version: self.driver_version.clone(),
vendor_id: self.vendor_id.clone(),
device_id: self.device_id.clone(),
device_type: self.device_type.clone(),
device_name: {
use std::mem;
let mut array: [_; VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.device_name[i].clone();
}
array
},
pipeline_cache_uuid: {
use std::mem;
let mut array: [_; VK_UUID_SIZE] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.pipeline_cache_uuid[i].clone();
}
array
},
limits: self.limits.clone(),
sparse_properties: self.sparse_properties.clone(),
}
}
}
impl fmt::Debug for VkPhysicalDeviceProperties {
fn fmt(&self, fmt: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
fmt.debug_struct("VkPhysicalDeviceProperties")
.field("api_version", &self.api_version)
.field("driver_version", &self.driver_version)
.field("vendor_id", &self.vendor_id)
.field("device_id", &self.device_id)
.field("device_type", &self.device_type)
.field("device_name", &unsafe{ CStr::from_ptr(&self.device_name[0]) })
.field("pipeline_cache_uuid", &&self.pipeline_cache_uuid[..])
.field("limits", &self.limits)
.field("sparse_properties", &self.sparse_properties)
.finish()
}
}
#[repr(C)]
pub struct VkPhysicalDeviceLimits {
pub max_image_dimension1d: uint32_t,
pub max_image_dimension2d: uint32_t,
pub max_image_dimension3d: uint32_t,
pub max_image_dimension_cube: uint32_t,
pub max_image_array_layers: uint32_t,
pub max_texel_buffer_elements: uint32_t,
pub max_uniform_buffer_range: uint32_t,
pub max_storage_buffer_range: uint32_t,
pub max_push_constants_size: uint32_t,
pub max_memory_allocation_count: uint32_t,
pub max_sampler_allocation_count: uint32_t,
pub buffer_image_granularity: VkDeviceSize,
pub sparse_address_space_size: VkDeviceSize,
pub max_bound_descriptor_sets: uint32_t,
pub max_per_stage_descriptor_samplers: uint32_t,
pub max_per_stage_descriptor_uniform_buffers: uint32_t,
pub max_per_stage_descriptor_storage_buffers: uint32_t,
pub max_per_stage_descriptor_sampled_images: uint32_t,
pub max_per_stage_descriptor_storage_images: uint32_t,
pub max_per_stage_descriptor_input_attachments: uint32_t,
pub max_per_stage_resources: uint32_t,
pub max_descriptor_set_samplers: uint32_t,
pub max_descriptor_set_uniform_buffers: uint32_t,
pub max_descriptor_set_uniform_buffers_dynamic: uint32_t,
pub max_descriptor_set_storage_buffers: uint32_t,
pub max_descriptor_set_storage_buffers_dynamic: uint32_t,
pub max_descriptor_set_sampled_images: uint32_t,
pub max_descriptor_set_storage_images: uint32_t,
pub max_descriptor_set_input_attachments: uint32_t,
pub max_vertex_input_attributes: uint32_t,
pub max_vertex_input_bindings: uint32_t,
pub max_vertex_input_attribute_offset: uint32_t,
pub max_vertex_input_binding_stride: uint32_t,
pub max_vertex_output_components: uint32_t,
pub max_tessellation_generation_level: uint32_t,
pub max_tessellation_patch_size: uint32_t,
pub max_tessellation_control_per_vertex_input_components: uint32_t,
pub max_tessellation_control_per_vertex_output_components: uint32_t,
pub max_tessellation_control_per_patch_output_components: uint32_t,
pub max_tessellation_control_total_output_components: uint32_t,
pub max_tessellation_evaluation_input_components: uint32_t,
pub max_tessellation_evaluation_output_components: uint32_t,
pub max_geometry_shader_invocations: uint32_t,
pub max_geometry_input_components: uint32_t,
pub max_geometry_output_components: uint32_t,
pub max_geometry_output_vertices: uint32_t,
pub max_geometry_total_output_components: uint32_t,
pub max_fragment_input_components: uint32_t,
pub max_fragment_output_attachments: uint32_t,
pub max_fragment_dual_src_attachments: uint32_t,
pub max_fragment_combined_output_resources: uint32_t,
pub max_compute_shared_memory_size: uint32_t,
pub max_compute_work_group_count: [uint32_t; 3],
pub max_compute_work_group_invocations: uint32_t,
pub max_compute_work_group_size: [uint32_t; 3],
pub sub_pixel_precision_bits: uint32_t,
pub sub_texel_precision_bits: uint32_t,
pub mipmap_precision_bits: uint32_t,
pub max_draw_indexed_index_value: uint32_t,
pub max_draw_indirect_count: uint32_t,
pub max_sampler_lod_bias: c_float,
pub max_sampler_anisotropy: c_float,
pub max_viewports: uint32_t,
pub max_viewport_dimensions: [uint32_t; 2],
pub viewport_bounds_range: [c_float; 2],
pub viewport_sub_pixel_bits: uint32_t,
pub min_memory_map_alignment: size_t,
pub min_texel_buffer_offset_alignment: VkDeviceSize,
pub min_uniform_buffer_offset_alignment: VkDeviceSize,
pub min_storage_buffer_offset_alignment: VkDeviceSize,
pub min_texel_offset: int32_t,
pub max_texel_offset: uint32_t,
pub min_texel_gather_offset: int32_t,
pub max_texel_gather_offset: uint32_t,
pub min_interpolation_offset: c_float,
pub max_interpolation_offset: c_float,
pub sub_pixel_interpolation_offset_bits: uint32_t,
pub max_framebuffer_width: uint32_t,
pub max_framebuffer_height: uint32_t,
pub max_framebuffer_layers: uint32_t,
pub framebuffer_color_sample_counts: VkSampleCountFlags,
pub framebuffer_depth_sample_counts: VkSampleCountFlags,
pub framebuffer_stencil_sample_counts: VkSampleCountFlags,
pub framebuffer_no_attachments_sample_counts: VkSampleCountFlags,
pub max_color_attachments: uint32_t,
pub sampled_image_color_sample_counts: VkSampleCountFlags,
pub sampled_image_integer_sample_counts: VkSampleCountFlags,
pub sampled_image_depth_sample_counts: VkSampleCountFlags,
pub sampled_image_stencil_sample_counts: VkSampleCountFlags,
pub storage_image_sample_counts: VkSampleCountFlags,
pub max_sample_mask_words: uint32_t,
pub timestamp_compute_and_graphics: VkBool32,
pub timestamp_period: c_float,
pub max_clip_distances: uint32_t,
pub max_cull_distances: uint32_t,
pub max_combined_clip_and_cull_distances: uint32_t,
pub discrete_queue_priorities: uint32_t,
pub point_size_range: [c_float; 2],
pub line_width_range: [c_float; 2],
pub point_size_granularity: c_float,
pub line_width_granularity: c_float,
pub strict_lines: VkBool32,
pub standard_sample_locations: VkBool32,
pub optimal_buffer_copy_offset_alignment: VkDeviceSize,
pub optimal_buffer_copy_row_pitch_alignment: VkDeviceSize,
pub non_coherent_atom_size: VkDeviceSize,
}
impl Clone for VkPhysicalDeviceLimits {
fn clone(&self) -> VkPhysicalDeviceLimits {
VkPhysicalDeviceLimits {
max_image_dimension1d: self.max_image_dimension1d.clone(),
max_image_dimension2d: self.max_image_dimension2d.clone(),
max_image_dimension3d: self.max_image_dimension3d.clone(),
max_image_dimension_cube: self.max_image_dimension_cube.clone(),
max_image_array_layers: self.max_image_array_layers.clone(),
max_texel_buffer_elements: self.max_texel_buffer_elements.clone(),
max_uniform_buffer_range: self.max_uniform_buffer_range.clone(),
max_storage_buffer_range: self.max_storage_buffer_range.clone(),
max_push_constants_size: self.max_push_constants_size.clone(),
max_memory_allocation_count: self.max_memory_allocation_count.clone(),
max_sampler_allocation_count: self.max_sampler_allocation_count.clone(),
buffer_image_granularity: self.buffer_image_granularity.clone(),
sparse_address_space_size: self.sparse_address_space_size.clone(),
max_bound_descriptor_sets: self.max_bound_descriptor_sets.clone(),
max_per_stage_descriptor_samplers: self.max_per_stage_descriptor_samplers.clone(),
max_per_stage_descriptor_uniform_buffers: self.max_per_stage_descriptor_uniform_buffers.clone(),
max_per_stage_descriptor_storage_buffers: self.max_per_stage_descriptor_storage_buffers.clone(),
max_per_stage_descriptor_sampled_images: self.max_per_stage_descriptor_sampled_images.clone(),
max_per_stage_descriptor_storage_images: self.max_per_stage_descriptor_storage_images.clone(),
max_per_stage_descriptor_input_attachments: self.max_per_stage_descriptor_input_attachments.clone(),
max_per_stage_resources: self.max_per_stage_resources.clone(),
max_descriptor_set_samplers: self.max_descriptor_set_samplers.clone(),
max_descriptor_set_uniform_buffers: self.max_descriptor_set_uniform_buffers.clone(),
max_descriptor_set_uniform_buffers_dynamic: self.max_descriptor_set_uniform_buffers_dynamic.clone(),
max_descriptor_set_storage_buffers: self.max_descriptor_set_storage_buffers.clone(),
max_descriptor_set_storage_buffers_dynamic: self.max_descriptor_set_storage_buffers_dynamic.clone(),
max_descriptor_set_sampled_images: self.max_descriptor_set_sampled_images.clone(),
max_descriptor_set_storage_images: self.max_descriptor_set_storage_images.clone(),
max_descriptor_set_input_attachments: self.max_descriptor_set_input_attachments.clone(),
max_vertex_input_attributes: self.max_vertex_input_attributes.clone(),
max_vertex_input_bindings: self.max_vertex_input_bindings.clone(),
max_vertex_input_attribute_offset: self.max_vertex_input_attribute_offset.clone(),
max_vertex_input_binding_stride: self.max_vertex_input_binding_stride.clone(),
max_vertex_output_components: self.max_vertex_output_components.clone(),
max_tessellation_generation_level: self.max_tessellation_generation_level.clone(),
max_tessellation_patch_size: self.max_tessellation_patch_size.clone(),
max_tessellation_control_per_vertex_input_components: self.max_tessellation_control_per_vertex_input_components.clone(),
max_tessellation_control_per_vertex_output_components: self.max_tessellation_control_per_vertex_output_components.clone(),
max_tessellation_control_per_patch_output_components: self.max_tessellation_control_per_patch_output_components.clone(),
max_tessellation_control_total_output_components: self.max_tessellation_control_total_output_components.clone(),
max_tessellation_evaluation_input_components: self.max_tessellation_evaluation_input_components.clone(),
max_tessellation_evaluation_output_components: self.max_tessellation_evaluation_output_components.clone(),
max_geometry_shader_invocations: self.max_geometry_shader_invocations.clone(),
max_geometry_input_components: self.max_geometry_input_components.clone(),
max_geometry_output_components: self.max_geometry_output_components.clone(),
max_geometry_output_vertices: self.max_geometry_output_vertices.clone(),
max_geometry_total_output_components: self.max_geometry_total_output_components.clone(),
max_fragment_input_components: self.max_fragment_input_components.clone(),
max_fragment_output_attachments: self.max_fragment_output_attachments.clone(),
max_fragment_dual_src_attachments: self.max_fragment_dual_src_attachments.clone(),
max_fragment_combined_output_resources: self.max_fragment_combined_output_resources.clone(),
max_compute_shared_memory_size: self.max_compute_shared_memory_size.clone(),
max_compute_work_group_count: {
use std::mem;
let mut array: [_; 3] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.max_compute_work_group_count[i].clone();
}
array
},
max_compute_work_group_invocations: self.max_compute_work_group_invocations.clone(),
max_compute_work_group_size: {
use std::mem;
let mut array: [_; 3] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.max_compute_work_group_size[i].clone();
}
array
},
sub_pixel_precision_bits: self.sub_pixel_precision_bits.clone(),
sub_texel_precision_bits: self.sub_texel_precision_bits.clone(),
mipmap_precision_bits: self.mipmap_precision_bits.clone(),
max_draw_indexed_index_value: self.max_draw_indexed_index_value.clone(),
max_draw_indirect_count: self.max_draw_indirect_count.clone(),
max_sampler_lod_bias: self.max_sampler_lod_bias.clone(),
max_sampler_anisotropy: self.max_sampler_anisotropy.clone(),
max_viewports: self.max_viewports.clone(),
max_viewport_dimensions: {
use std::mem;
let mut array: [_; 2] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.max_viewport_dimensions[i].clone();
}
array
},
viewport_bounds_range: {
use std::mem;
let mut array: [_; 2] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.viewport_bounds_range[i].clone();
}
array
},
viewport_sub_pixel_bits: self.viewport_sub_pixel_bits.clone(),
min_memory_map_alignment: self.min_memory_map_alignment.clone(),
min_texel_buffer_offset_alignment: self.min_texel_buffer_offset_alignment.clone(),
min_uniform_buffer_offset_alignment: self.min_uniform_buffer_offset_alignment.clone(),
min_storage_buffer_offset_alignment: self.min_storage_buffer_offset_alignment.clone(),
min_texel_offset: self.min_texel_offset.clone(),
max_texel_offset: self.max_texel_offset.clone(),
min_texel_gather_offset: self.min_texel_gather_offset.clone(),
max_texel_gather_offset: self.max_texel_gather_offset.clone(),
min_interpolation_offset: self.min_interpolation_offset.clone(),
max_interpolation_offset: self.max_interpolation_offset.clone(),
sub_pixel_interpolation_offset_bits: self.sub_pixel_interpolation_offset_bits.clone(),
max_framebuffer_width: self.max_framebuffer_width.clone(),
max_framebuffer_height: self.max_framebuffer_height.clone(),
max_framebuffer_layers: self.max_framebuffer_layers.clone(),
framebuffer_color_sample_counts: self.framebuffer_color_sample_counts.clone(),
framebuffer_depth_sample_counts: self.framebuffer_depth_sample_counts.clone(),
framebuffer_stencil_sample_counts: self.framebuffer_stencil_sample_counts.clone(),
framebuffer_no_attachments_sample_counts: self.framebuffer_no_attachments_sample_counts.clone(),
max_color_attachments: self.max_color_attachments.clone(),
sampled_image_color_sample_counts: self.sampled_image_color_sample_counts.clone(),
sampled_image_integer_sample_counts: self.sampled_image_integer_sample_counts.clone(),
sampled_image_depth_sample_counts: self.sampled_image_depth_sample_counts.clone(),
sampled_image_stencil_sample_counts: self.sampled_image_stencil_sample_counts.clone(),
storage_image_sample_counts: self.storage_image_sample_counts.clone(),
max_sample_mask_words: self.max_sample_mask_words.clone(),
timestamp_compute_and_graphics: self.timestamp_compute_and_graphics.clone(),
timestamp_period: self.timestamp_period.clone(),
max_clip_distances: self.max_clip_distances.clone(),
max_cull_distances: self.max_cull_distances.clone(),
max_combined_clip_and_cull_distances: self.max_combined_clip_and_cull_distances.clone(),
discrete_queue_priorities: self.discrete_queue_priorities.clone(),
point_size_range: {
use std::mem;
let mut array: [_; 2] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.point_size_range[i].clone();
}
array
},
line_width_range: {
use std::mem;
let mut array: [_; 2] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.line_width_range[i].clone();
}
array
},
point_size_granularity: self.point_size_granularity.clone(),
line_width_granularity: self.line_width_granularity.clone(),
strict_lines: self.strict_lines.clone(),
standard_sample_locations: self.standard_sample_locations.clone(),
optimal_buffer_copy_offset_alignment: self.optimal_buffer_copy_offset_alignment.clone(),
optimal_buffer_copy_row_pitch_alignment: self.optimal_buffer_copy_row_pitch_alignment.clone(),
non_coherent_atom_size: self.non_coherent_atom_size.clone(),
}
}
}
impl fmt::Debug for VkPhysicalDeviceLimits {
fn fmt(&self, fmt: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
fmt.debug_struct("VkPhysicalDeviceLimits")
.field("max_image_dimension1d", &self.max_image_dimension1d)
.field("max_image_dimension2d", &self.max_image_dimension2d)
.field("max_image_dimension3d", &self.max_image_dimension3d)
.field("max_image_dimension_cube", &self.max_image_dimension_cube)
.field("max_image_array_layers", &self.max_image_array_layers)
.field("max_texel_buffer_elements", &self.max_texel_buffer_elements)
.field("max_uniform_buffer_range", &self.max_uniform_buffer_range)
.field("max_storage_buffer_range", &self.max_storage_buffer_range)
.field("max_push_constants_size", &self.max_push_constants_size)
.field("max_memory_allocation_count", &self.max_memory_allocation_count)
.field("max_sampler_allocation_count", &self.max_sampler_allocation_count)
.field("buffer_image_granularity", &self.buffer_image_granularity)
.field("sparse_address_space_size", &self.sparse_address_space_size)
.field("max_bound_descriptor_sets", &self.max_bound_descriptor_sets)
.field("max_per_stage_descriptor_samplers", &self.max_per_stage_descriptor_samplers)
.field("max_per_stage_descriptor_uniform_buffers", &self.max_per_stage_descriptor_uniform_buffers)
.field("max_per_stage_descriptor_storage_buffers", &self.max_per_stage_descriptor_storage_buffers)
.field("max_per_stage_descriptor_sampled_images", &self.max_per_stage_descriptor_sampled_images)
.field("max_per_stage_descriptor_storage_images", &self.max_per_stage_descriptor_storage_images)
.field("max_per_stage_descriptor_input_attachments", &self.max_per_stage_descriptor_input_attachments)
.field("max_per_stage_resources", &self.max_per_stage_resources)
.field("max_descriptor_set_samplers", &self.max_descriptor_set_samplers)
.field("max_descriptor_set_uniform_buffers", &self.max_descriptor_set_uniform_buffers)
.field("max_descriptor_set_uniform_buffers_dynamic", &self.max_descriptor_set_uniform_buffers_dynamic)
.field("max_descriptor_set_storage_buffers", &self.max_descriptor_set_storage_buffers)
.field("max_descriptor_set_storage_buffers_dynamic", &self.max_descriptor_set_storage_buffers_dynamic)
.field("max_descriptor_set_sampled_images", &self.max_descriptor_set_sampled_images)
.field("max_descriptor_set_storage_images", &self.max_descriptor_set_storage_images)
.field("max_descriptor_set_input_attachments", &self.max_descriptor_set_input_attachments)
.field("max_vertex_input_attributes", &self.max_vertex_input_attributes)
.field("max_vertex_input_bindings", &self.max_vertex_input_bindings)
.field("max_vertex_input_attribute_offset", &self.max_vertex_input_attribute_offset)
.field("max_vertex_input_binding_stride", &self.max_vertex_input_binding_stride)
.field("max_vertex_output_components", &self.max_vertex_output_components)
.field("max_tessellation_generation_level", &self.max_tessellation_generation_level)
.field("max_tessellation_patch_size", &self.max_tessellation_patch_size)
.field("max_tessellation_control_per_vertex_input_components", &self.max_tessellation_control_per_vertex_input_components)
.field("max_tessellation_control_per_vertex_output_components", &self.max_tessellation_control_per_vertex_output_components)
.field("max_tessellation_control_per_patch_output_components", &self.max_tessellation_control_per_patch_output_components)
.field("max_tessellation_control_total_output_components", &self.max_tessellation_control_total_output_components)
.field("max_tessellation_evaluation_input_components", &self.max_tessellation_evaluation_input_components)
.field("max_tessellation_evaluation_output_components", &self.max_tessellation_evaluation_output_components)
.field("max_geometry_shader_invocations", &self.max_geometry_shader_invocations)
.field("max_geometry_input_components", &self.max_geometry_input_components)
.field("max_geometry_output_components", &self.max_geometry_output_components)
.field("max_geometry_output_vertices", &self.max_geometry_output_vertices)
.field("max_geometry_total_output_components", &self.max_geometry_total_output_components)
.field("max_fragment_input_components", &self.max_fragment_input_components)
.field("max_fragment_output_attachments", &self.max_fragment_output_attachments)
.field("max_fragment_dual_src_attachments", &self.max_fragment_dual_src_attachments)
.field("max_fragment_combined_output_resources", &self.max_fragment_combined_output_resources)
.field("max_compute_shared_memory_size", &self.max_compute_shared_memory_size)
.field("max_compute_work_group_count", &&self.max_compute_work_group_count[..])
.field("max_compute_work_group_invocations", &self.max_compute_work_group_invocations)
.field("max_compute_work_group_size", &&self.max_compute_work_group_size[..])
.field("sub_pixel_precision_bits", &self.sub_pixel_precision_bits)
.field("sub_texel_precision_bits", &self.sub_texel_precision_bits)
.field("mipmap_precision_bits", &self.mipmap_precision_bits)
.field("max_draw_indexed_index_value", &self.max_draw_indexed_index_value)
.field("max_draw_indirect_count", &self.max_draw_indirect_count)
.field("max_sampler_lod_bias", &self.max_sampler_lod_bias)
.field("max_sampler_anisotropy", &self.max_sampler_anisotropy)
.field("max_viewports", &self.max_viewports)
.field("max_viewport_dimensions", &&self.max_viewport_dimensions[..])
.field("viewport_bounds_range", &&self.viewport_bounds_range[..])
.field("viewport_sub_pixel_bits", &self.viewport_sub_pixel_bits)
.field("min_memory_map_alignment", &self.min_memory_map_alignment)
.field("min_texel_buffer_offset_alignment", &self.min_texel_buffer_offset_alignment)
.field("min_uniform_buffer_offset_alignment", &self.min_uniform_buffer_offset_alignment)
.field("min_storage_buffer_offset_alignment", &self.min_storage_buffer_offset_alignment)
.field("min_texel_offset", &self.min_texel_offset)
.field("max_texel_offset", &self.max_texel_offset)
.field("min_texel_gather_offset", &self.min_texel_gather_offset)
.field("max_texel_gather_offset", &self.max_texel_gather_offset)
.field("min_interpolation_offset", &self.min_interpolation_offset)
.field("max_interpolation_offset", &self.max_interpolation_offset)
.field("sub_pixel_interpolation_offset_bits", &self.sub_pixel_interpolation_offset_bits)
.field("max_framebuffer_width", &self.max_framebuffer_width)
.field("max_framebuffer_height", &self.max_framebuffer_height)
.field("max_framebuffer_layers", &self.max_framebuffer_layers)
.field("framebuffer_color_sample_counts", &self.framebuffer_color_sample_counts)
.field("framebuffer_depth_sample_counts", &self.framebuffer_depth_sample_counts)
.field("framebuffer_stencil_sample_counts", &self.framebuffer_stencil_sample_counts)
.field("framebuffer_no_attachments_sample_counts", &self.framebuffer_no_attachments_sample_counts)
.field("max_color_attachments", &self.max_color_attachments)
.field("sampled_image_color_sample_counts", &self.sampled_image_color_sample_counts)
.field("sampled_image_integer_sample_counts", &self.sampled_image_integer_sample_counts)
.field("sampled_image_depth_sample_counts", &self.sampled_image_depth_sample_counts)
.field("sampled_image_stencil_sample_counts", &self.sampled_image_stencil_sample_counts)
.field("storage_image_sample_counts", &self.storage_image_sample_counts)
.field("max_sample_mask_words", &self.max_sample_mask_words)
.field("timestamp_compute_and_graphics", &self.timestamp_compute_and_graphics)
.field("timestamp_period", &self.timestamp_period)
.field("max_clip_distances", &self.max_clip_distances)
.field("max_cull_distances", &self.max_cull_distances)
.field("max_combined_clip_and_cull_distances", &self.max_combined_clip_and_cull_distances)
.field("discrete_queue_priorities", &self.discrete_queue_priorities)
.field("point_size_range", &&self.point_size_range[..])
.field("line_width_range", &&self.line_width_range[..])
.field("point_size_granularity", &self.point_size_granularity)
.field("line_width_granularity", &self.line_width_granularity)
.field("strict_lines", &self.strict_lines)
.field("standard_sample_locations", &self.standard_sample_locations)
.field("optimal_buffer_copy_offset_alignment", &self.optimal_buffer_copy_offset_alignment)
.field("optimal_buffer_copy_row_pitch_alignment", &self.optimal_buffer_copy_row_pitch_alignment)
.field("non_coherent_atom_size", &self.non_coherent_atom_size)
.finish()
}
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPhysicalDeviceSparseProperties {
pub residency_standard2dblock_shape: VkBool32,
pub residency_standard2dmultisample_block_shape: VkBool32,
pub residency_standard3dblock_shape: VkBool32,
pub residency_aligned_mip_size: VkBool32,
pub residency_non_resident_strict: VkBool32,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkQueueFamilyProperties {
pub queue_flags: VkQueueFlags,
pub queue_count: uint32_t,
pub timestamp_valid_bits: uint32_t,
pub min_image_transfer_granularity: VkExtent3D,
}
#[repr(C)]
pub struct VkPhysicalDeviceMemoryProperties {
pub memory_type_count: uint32_t,
pub memory_types: [VkMemoryType; VK_MAX_MEMORY_TYPES],
pub memory_heap_count: uint32_t,
pub memory_heaps: [VkMemoryHeap; VK_MAX_MEMORY_HEAPS],
}
impl Clone for VkPhysicalDeviceMemoryProperties {
fn clone(&self) -> VkPhysicalDeviceMemoryProperties {
VkPhysicalDeviceMemoryProperties {
memory_type_count: self.memory_type_count.clone(),
memory_types: {
use std::mem;
let mut array: [_; VK_MAX_MEMORY_TYPES] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.memory_types[i].clone();
}
array
},
memory_heap_count: self.memory_heap_count.clone(),
memory_heaps: {
use std::mem;
let mut array: [_; VK_MAX_MEMORY_HEAPS] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.memory_heaps[i].clone();
}
array
},
}
}
}
impl fmt::Debug for VkPhysicalDeviceMemoryProperties {
fn fmt(&self, fmt: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
fmt.debug_struct("VkPhysicalDeviceMemoryProperties")
.field("memory_type_count", &self.memory_type_count)
.field("memory_types", &&self.memory_types[..])
.field("memory_heap_count", &self.memory_heap_count)
.field("memory_heaps", &&self.memory_heaps[..])
.finish()
}
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkMemoryType {
pub property_flags: VkMemoryPropertyFlags,
pub heap_index: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkMemoryHeap {
pub size: VkDeviceSize,
pub flags: VkMemoryHeapFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDeviceCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkDeviceCreateFlags,
pub queue_create_info_count: uint32_t,
pub p_queue_create_infos: *const VkDeviceQueueCreateInfo,
pub enabled_layer_count: uint32_t,
pub pp_enabled_layer_names: *const *const c_char,
pub enabled_extension_count: uint32_t,
pub pp_enabled_extension_names: *const *const c_char,
pub p_enabled_features: *const VkPhysicalDeviceFeatures,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDeviceQueueCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkDeviceQueueCreateFlags,
pub queue_family_index: uint32_t,
pub queue_count: uint32_t,
pub p_queue_priorities: *const c_float,
}
#[repr(C)]
pub struct VkExtensionProperties {
pub extension_name: [c_char; VK_MAX_EXTENSION_NAME_SIZE],
pub spec_version: uint32_t,
}
impl Clone for VkExtensionProperties {
fn clone(&self) -> VkExtensionProperties {
VkExtensionProperties {
extension_name: {
use std::mem;
let mut array: [_; VK_MAX_EXTENSION_NAME_SIZE] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.extension_name[i].clone();
}
array
},
spec_version: self.spec_version.clone(),
}
}
}
impl fmt::Debug for VkExtensionProperties {
fn fmt(&self, fmt: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
fmt.debug_struct("VkExtensionProperties")
.field("extension_name", &unsafe{ CStr::from_ptr(&self.extension_name[0]) })
.field("spec_version", &self.spec_version)
.finish()
}
}
#[repr(C)]
pub struct VkLayerProperties {
pub layer_name: [c_char; VK_MAX_EXTENSION_NAME_SIZE],
pub spec_version: uint32_t,
pub implementation_version: uint32_t,
pub description: [c_char; VK_MAX_DESCRIPTION_SIZE],
}
impl Clone for VkLayerProperties {
fn clone(&self) -> VkLayerProperties {
VkLayerProperties {
layer_name: {
use std::mem;
let mut array: [_; VK_MAX_EXTENSION_NAME_SIZE] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.layer_name[i].clone();
}
array
},
spec_version: self.spec_version.clone(),
implementation_version: self.implementation_version.clone(),
description: {
use std::mem;
let mut array: [_; VK_MAX_DESCRIPTION_SIZE] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.description[i].clone();
}
array
},
}
}
}
impl fmt::Debug for VkLayerProperties {
fn fmt(&self, fmt: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
fmt.debug_struct("VkLayerProperties")
.field("layer_name", &unsafe{ CStr::from_ptr(&self.layer_name[0]) })
.field("spec_version", &self.spec_version)
.field("implementation_version", &self.implementation_version)
.field("description", &unsafe{ CStr::from_ptr(&self.description[0]) })
.finish()
}
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSubmitInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub wait_semaphore_count: uint32_t,
pub p_wait_semaphores: *const VkSemaphore,
pub p_wait_dst_stage_mask: *const VkPipelineStageFlags,
pub command_buffer_count: uint32_t,
pub p_command_buffers: *const VkCommandBuffer,
pub signal_semaphore_count: uint32_t,
pub p_signal_semaphores: *const VkSemaphore,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkMemoryAllocateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub allocation_size: VkDeviceSize,
pub memory_type_index: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkMappedMemoryRange {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub memory: VkDeviceMemory,
pub offset: VkDeviceSize,
pub size: VkDeviceSize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkMemoryRequirements {
pub size: VkDeviceSize,
pub alignment: VkDeviceSize,
pub memory_type_bits: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSparseImageMemoryRequirements {
pub format_properties: VkSparseImageFormatProperties,
pub image_mip_tail_first_lod: uint32_t,
pub image_mip_tail_size: VkDeviceSize,
pub image_mip_tail_offset: VkDeviceSize,
pub image_mip_tail_stride: VkDeviceSize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSparseImageFormatProperties {
pub aspect_mask: VkImageAspectFlags,
pub image_granularity: VkExtent3D,
pub flags: VkSparseImageFormatFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkBindSparseInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub wait_semaphore_count: uint32_t,
pub p_wait_semaphores: *const VkSemaphore,
pub buffer_bind_count: uint32_t,
pub p_buffer_binds: *const VkSparseBufferMemoryBindInfo,
pub image_opaque_bind_count: uint32_t,
pub p_image_opaque_binds: *const VkSparseImageOpaqueMemoryBindInfo,
pub image_bind_count: uint32_t,
pub p_image_binds: *const VkSparseImageMemoryBindInfo,
pub signal_semaphore_count: uint32_t,
pub p_signal_semaphores: *const VkSemaphore,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSparseBufferMemoryBindInfo {
pub buffer: VkBuffer,
pub bind_count: uint32_t,
pub p_binds: *const VkSparseMemoryBind,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSparseMemoryBind {
pub resource_offset: VkDeviceSize,
pub size: VkDeviceSize,
pub memory: VkDeviceMemory,
pub memory_offset: VkDeviceSize,
pub flags: VkSparseMemoryBindFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSparseImageOpaqueMemoryBindInfo {
pub image: VkImage,
pub bind_count: uint32_t,
pub p_binds: *const VkSparseMemoryBind,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSparseImageMemoryBindInfo {
pub image: VkImage,
pub bind_count: uint32_t,
pub p_binds: *const VkSparseImageMemoryBind,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSparseImageMemoryBind {
pub subresource: VkImageSubresource,
pub offset: VkOffset3D,
pub extent: VkExtent3D,
pub memory: VkDeviceMemory,
pub memory_offset: VkDeviceSize,
pub flags: VkSparseMemoryBindFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkImageSubresource {
pub aspect_mask: VkImageAspectFlags,
pub mip_level: uint32_t,
pub array_layer: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkOffset3D {
pub x: int32_t,
pub y: int32_t,
pub z: int32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkFenceCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkFenceCreateFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSemaphoreCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkSemaphoreCreateFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkEventCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkEventCreateFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkQueryPoolCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkQueryPoolCreateFlags,
pub query_type: VkQueryType,
pub query_count: uint32_t,
pub pipeline_statistics: VkQueryPipelineStatisticFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkBufferCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkBufferCreateFlags,
pub size: VkDeviceSize,
pub usage: VkBufferUsageFlags,
pub sharing_mode: VkSharingMode,
pub queue_family_index_count: uint32_t,
pub p_queue_family_indices: *const uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkBufferViewCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkBufferViewCreateFlags,
pub buffer: VkBuffer,
pub format: VkFormat,
pub offset: VkDeviceSize,
pub range: VkDeviceSize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkImageCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkImageCreateFlags,
pub image_type: VkImageType,
pub format: VkFormat,
pub extent: VkExtent3D,
pub mip_levels: uint32_t,
pub array_layers: uint32_t,
pub samples: VkSampleCountFlags,
pub tiling: VkImageTiling,
pub usage: VkImageUsageFlags,
pub sharing_mode: VkSharingMode,
pub queue_family_index_count: uint32_t,
pub p_queue_family_indices: *const uint32_t,
pub initial_layout: VkImageLayout,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSubresourceLayout {
pub offset: VkDeviceSize,
pub size: VkDeviceSize,
pub row_pitch: VkDeviceSize,
pub array_pitch: VkDeviceSize,
pub depth_pitch: VkDeviceSize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkImageViewCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkImageViewCreateFlags,
pub image: VkImage,
pub view_type: VkImageViewType,
pub format: VkFormat,
pub components: VkComponentMapping,
pub subresource_range: VkImageSubresourceRange,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkComponentMapping {
pub r: VkComponentSwizzle,
pub g: VkComponentSwizzle,
pub b: VkComponentSwizzle,
pub a: VkComponentSwizzle,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkImageSubresourceRange {
pub aspect_mask: VkImageAspectFlags,
pub base_mip_level: uint32_t,
pub level_count: uint32_t,
pub base_array_layer: uint32_t,
pub layer_count: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkShaderModuleCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkShaderModuleCreateFlags,
pub code_size: size_t,
pub p_code: *const uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineCacheCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineCacheCreateFlags,
pub initial_data_size: size_t,
pub p_initial_data: *const c_void,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkGraphicsPipelineCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineCreateFlags,
pub stage_count: uint32_t,
pub p_stages: *const VkPipelineShaderStageCreateInfo,
pub p_vertex_input_state: *const VkPipelineVertexInputStateCreateInfo,
pub p_input_assembly_state: *const VkPipelineInputAssemblyStateCreateInfo,
pub p_tessellation_state: *const VkPipelineTessellationStateCreateInfo,
pub p_viewport_state: *const VkPipelineViewportStateCreateInfo,
pub p_rasterization_state: *const VkPipelineRasterizationStateCreateInfo,
pub p_multisample_state: *const VkPipelineMultisampleStateCreateInfo,
pub p_depth_stencil_state: *const VkPipelineDepthStencilStateCreateInfo,
pub p_color_blend_state: *const VkPipelineColorBlendStateCreateInfo,
pub p_dynamic_state: *const VkPipelineDynamicStateCreateInfo,
pub layout: VkPipelineLayout,
pub render_pass: VkRenderPass,
pub subpass: uint32_t,
pub base_pipeline_handle: VkPipeline,
pub base_pipeline_index: int32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineShaderStageCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineShaderStageCreateFlags,
pub stage: VkShaderStageFlags,
pub module: VkShaderModule,
pub p_name: *const c_char,
pub p_specialization_info: *const VkSpecializationInfo,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSpecializationInfo {
pub map_entry_count: uint32_t,
pub p_map_entries: *const VkSpecializationMapEntry,
pub data_size: size_t,
pub p_data: *const c_void,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSpecializationMapEntry {
pub constant_id: uint32_t,
pub offset: uint32_t,
pub size: size_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineVertexInputStateCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineVertexInputStateCreateFlags,
pub vertex_binding_description_count: uint32_t,
pub p_vertex_binding_descriptions: *const VkVertexInputBindingDescription,
pub vertex_attribute_description_count: uint32_t,
pub p_vertex_attribute_descriptions: *const VkVertexInputAttributeDescription,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkVertexInputBindingDescription {
pub binding: uint32_t,
pub stride: uint32_t,
pub input_rate: VkVertexInputRate,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkVertexInputAttributeDescription {
pub location: uint32_t,
pub binding: uint32_t,
pub format: VkFormat,
pub offset: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineInputAssemblyStateCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineInputAssemblyStateCreateFlags,
pub topology: VkPrimitiveTopology,
pub primitive_restart_enable: VkBool32,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineTessellationStateCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineTessellationStateCreateFlags,
pub patch_control_points: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineViewportStateCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineViewportStateCreateFlags,
pub viewport_count: uint32_t,
pub p_viewports: *const VkViewport,
pub scissor_count: uint32_t,
pub p_scissors: *const VkRect2D,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkViewport {
pub x: c_float,
pub y: c_float,
pub width: c_float,
pub height: c_float,
pub min_depth: c_float,
pub max_depth: c_float,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkRect2D {
pub offset: VkOffset2D,
pub extent: VkExtent2D,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkOffset2D {
pub x: int32_t,
pub y: int32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkExtent2D {
pub width: uint32_t,
pub height: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineRasterizationStateCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineRasterizationStateCreateFlags,
pub depth_clamp_enable: VkBool32,
pub rasterizer_discard_enable: VkBool32,
pub polygon_mode: VkPolygonMode,
pub cull_mode: VkCullModeFlags,
pub front_face: VkFrontFace,
pub depth_bias_enable: VkBool32,
pub depth_bias_constant_factor: c_float,
pub depth_bias_clamp: c_float,
pub depth_bias_slope_factor: c_float,
pub line_width: c_float,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineMultisampleStateCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineMultisampleStateCreateFlags,
pub rasterization_samples: VkSampleCountFlags,
pub sample_shading_enable: VkBool32,
pub min_sample_shading: c_float,
pub p_sample_mask: *const VkSampleMask,
pub alpha_to_coverage_enable: VkBool32,
pub alpha_to_one_enable: VkBool32,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineDepthStencilStateCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineDepthStencilStateCreateFlags,
pub depth_test_enable: VkBool32,
pub depth_write_enable: VkBool32,
pub depth_compare_op: VkCompareOp,
pub depth_bounds_test_enable: VkBool32,
pub stencil_test_enable: VkBool32,
pub front: VkStencilOpState,
pub back: VkStencilOpState,
pub min_depth_bounds: c_float,
pub max_depth_bounds: c_float,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkStencilOpState {
pub fail_op: VkStencilOp,
pub pass_op: VkStencilOp,
pub depth_fail_op: VkStencilOp,
pub compare_op: VkCompareOp,
pub compare_mask: uint32_t,
pub write_mask: uint32_t,
pub reference: uint32_t,
}
#[repr(C)]
pub struct VkPipelineColorBlendStateCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineColorBlendStateCreateFlags,
pub logic_op_enable: VkBool32,
pub logic_op: VkLogicOp,
pub attachment_count: uint32_t,
pub p_attachments: *const VkPipelineColorBlendAttachmentState,
pub blend_constants: [c_float; 4],
}
impl Clone for VkPipelineColorBlendStateCreateInfo {
fn clone(&self) -> VkPipelineColorBlendStateCreateInfo {
VkPipelineColorBlendStateCreateInfo {
s_type: self.s_type.clone(),
p_next: self.p_next.clone(),
flags: self.flags.clone(),
logic_op_enable: self.logic_op_enable.clone(),
logic_op: self.logic_op.clone(),
attachment_count: self.attachment_count.clone(),
p_attachments: self.p_attachments.clone(),
blend_constants: {
use std::mem;
let mut array: [_; 4] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.blend_constants[i].clone();
}
array
},
}
}
}
impl fmt::Debug for VkPipelineColorBlendStateCreateInfo {
fn fmt(&self, fmt: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
fmt.debug_struct("VkPipelineColorBlendStateCreateInfo")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("flags", &self.flags)
.field("logic_op_enable", &self.logic_op_enable)
.field("logic_op", &self.logic_op)
.field("attachment_count", &self.attachment_count)
.field("p_attachments", &self.p_attachments)
.field("blend_constants", &&self.blend_constants[..])
.finish()
}
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineColorBlendAttachmentState {
pub blend_enable: VkBool32,
pub src_color_blend_factor: VkBlendFactor,
pub dst_color_blend_factor: VkBlendFactor,
pub color_blend_op: VkBlendOp,
pub src_alpha_blend_factor: VkBlendFactor,
pub dst_alpha_blend_factor: VkBlendFactor,
pub alpha_blend_op: VkBlendOp,
pub color_write_mask: VkColorComponentFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineDynamicStateCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineDynamicStateCreateFlags,
pub dynamic_state_count: uint32_t,
pub p_dynamic_states: *const VkDynamicState,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkComputePipelineCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineCreateFlags,
pub stage: VkPipelineShaderStageCreateInfo,
pub layout: VkPipelineLayout,
pub base_pipeline_handle: VkPipeline,
pub base_pipeline_index: int32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPipelineLayoutCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkPipelineLayoutCreateFlags,
pub set_layout_count: uint32_t,
pub p_set_layouts: *const VkDescriptorSetLayout,
pub push_constant_range_count: uint32_t,
pub p_push_constant_ranges: *const VkPushConstantRange,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkPushConstantRange {
pub stage_flags: VkShaderStageFlags,
pub offset: uint32_t,
pub size: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSamplerCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkSamplerCreateFlags,
pub mag_filter: VkFilter,
pub min_filter: VkFilter,
pub mipmap_mode: VkSamplerMipmapMode,
pub address_mode_u: VkSamplerAddressMode,
pub address_mode_v: VkSamplerAddressMode,
pub address_mode_w: VkSamplerAddressMode,
pub mip_lod_bias: c_float,
pub anisotropy_enable: VkBool32,
pub max_anisotropy: c_float,
pub compare_enable: VkBool32,
pub compare_op: VkCompareOp,
pub min_lod: c_float,
pub max_lod: c_float,
pub border_color: VkBorderColor,
pub unnormalized_coordinates: VkBool32,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDescriptorSetLayoutCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkDescriptorSetLayoutCreateFlags,
pub binding_count: uint32_t,
pub p_bindings: *const VkDescriptorSetLayoutBinding,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDescriptorSetLayoutBinding {
pub binding: uint32_t,
pub descriptor_type: VkDescriptorType,
pub descriptor_count: uint32_t,
pub stage_flags: VkShaderStageFlags,
pub p_immutable_samplers: *const VkSampler,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDescriptorPoolCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkDescriptorPoolCreateFlags,
pub max_sets: uint32_t,
pub pool_size_count: uint32_t,
pub p_pool_sizes: *const VkDescriptorPoolSize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDescriptorPoolSize {
pub typ: VkDescriptorType,
pub descriptor_count: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDescriptorSetAllocateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub descriptor_pool: VkDescriptorPool,
pub descriptor_set_count: uint32_t,
pub p_set_layouts: *const VkDescriptorSetLayout,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkWriteDescriptorSet {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub dst_set: VkDescriptorSet,
pub dst_binding: uint32_t,
pub dst_array_element: uint32_t,
pub descriptor_count: uint32_t,
pub descriptor_type: VkDescriptorType,
pub p_image_info: *const VkDescriptorImageInfo,
pub p_buffer_info: *const VkDescriptorBufferInfo,
pub p_texel_buffer_view: *const VkBufferView,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDescriptorImageInfo {
pub sampler: VkSampler,
pub image_view: VkImageView,
pub image_layout: VkImageLayout,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDescriptorBufferInfo {
pub buffer: VkBuffer,
pub offset: VkDeviceSize,
pub range: VkDeviceSize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkCopyDescriptorSet {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub src_set: VkDescriptorSet,
pub src_binding: uint32_t,
pub src_array_element: uint32_t,
pub dst_set: VkDescriptorSet,
pub dst_binding: uint32_t,
pub dst_array_element: uint32_t,
pub descriptor_count: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkFramebufferCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkFramebufferCreateFlags,
pub render_pass: VkRenderPass,
pub attachment_count: uint32_t,
pub p_attachments: *const VkImageView,
pub width: uint32_t,
pub height: uint32_t,
pub layers: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkRenderPassCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkRenderPassCreateFlags,
pub attachment_count: uint32_t,
pub p_attachments: *const VkAttachmentDescription,
pub subpass_count: uint32_t,
pub p_subpasses: *const VkSubpassDescription,
pub dependency_count: uint32_t,
pub p_dependencies: *const VkSubpassDependency,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkAttachmentDescription {
pub flags: VkAttachmentDescriptionFlags,
pub format: VkFormat,
pub samples: VkSampleCountFlags,
pub load_op: VkAttachmentLoadOp,
pub store_op: VkAttachmentStoreOp,
pub stencil_load_op: VkAttachmentLoadOp,
pub stencil_store_op: VkAttachmentStoreOp,
pub initial_layout: VkImageLayout,
pub final_layout: VkImageLayout,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSubpassDescription {
pub flags: VkSubpassDescriptionFlags,
pub pipeline_bind_point: VkPipelineBindPoint,
pub input_attachment_count: uint32_t,
pub p_input_attachments: *const VkAttachmentReference,
pub color_attachment_count: uint32_t,
pub p_color_attachments: *const VkAttachmentReference,
pub p_resolve_attachments: *const VkAttachmentReference,
pub p_depth_stencil_attachment: *const VkAttachmentReference,
pub preserve_attachment_count: uint32_t,
pub p_preserve_attachments: *const uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkAttachmentReference {
pub attachment: uint32_t,
pub layout: VkImageLayout,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSubpassDependency {
pub src_subpass: uint32_t,
pub dst_subpass: uint32_t,
pub src_stage_mask: VkPipelineStageFlags,
pub dst_stage_mask: VkPipelineStageFlags,
pub src_access_mask: VkAccessFlags,
pub dst_access_mask: VkAccessFlags,
pub dependency_flags: VkDependencyFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkCommandPoolCreateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkCommandPoolCreateFlags,
pub queue_family_index: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkCommandBufferAllocateInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub command_pool: VkCommandPool,
pub level: VkCommandBufferLevel,
pub command_buffer_count: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkCommandBufferBeginInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub flags: VkCommandBufferUsageFlags,
pub p_inheritance_info: *const VkCommandBufferInheritanceInfo,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkCommandBufferInheritanceInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub render_pass: VkRenderPass,
pub subpass: uint32_t,
pub framebuffer: VkFramebuffer,
pub occlusion_query_enable: VkBool32,
pub query_flags: VkQueryControlFlags,
pub pipeline_statistics: VkQueryPipelineStatisticFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkBufferCopy {
pub src_offset: VkDeviceSize,
pub dst_offset: VkDeviceSize,
pub size: VkDeviceSize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkImageCopy {
pub src_subresource: VkImageSubresourceLayers,
pub src_offset: VkOffset3D,
pub dst_subresource: VkImageSubresourceLayers,
pub dst_offset: VkOffset3D,
pub extent: VkExtent3D,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkImageSubresourceLayers {
pub aspect_mask: VkImageAspectFlags,
pub mip_level: uint32_t,
pub base_array_layer: uint32_t,
pub layer_count: uint32_t,
}
#[repr(C)]
pub struct VkImageBlit {
pub src_subresource: VkImageSubresourceLayers,
pub src_offsets: [VkOffset3D; 2],
pub dst_subresource: VkImageSubresourceLayers,
pub dst_offsets: [VkOffset3D; 2],
}
impl Clone for VkImageBlit {
fn clone(&self) -> VkImageBlit {
VkImageBlit {
src_subresource: self.src_subresource.clone(),
src_offsets: {
use std::mem;
let mut array: [_; 2] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.src_offsets[i].clone();
}
array
},
dst_subresource: self.dst_subresource.clone(),
dst_offsets: {
use std::mem;
let mut array: [_; 2] = unsafe{ mem::uninitialized() };
for (i, e) in array[..].iter_mut().enumerate() {
*e = self.dst_offsets[i].clone();
}
array
},
}
}
}
impl fmt::Debug for VkImageBlit {
fn fmt(&self, fmt: &mut fmt::Formatter) -> ::std::result::Result<(), fmt::Error> {
fmt.debug_struct("VkImageBlit")
.field("src_subresource", &self.src_subresource)
.field("src_offsets", &&self.src_offsets[..])
.field("dst_subresource", &self.dst_subresource)
.field("dst_offsets", &&self.dst_offsets[..])
.finish()
}
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkBufferImageCopy {
pub buffer_offset: VkDeviceSize,
pub buffer_row_length: uint32_t,
pub buffer_image_height: uint32_t,
pub image_subresource: VkImageSubresourceLayers,
pub image_offset: VkOffset3D,
pub image_extent: VkExtent3D,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkClearDepthStencilValue {
pub depth: c_float,
pub stencil: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkClearAttachment {
pub aspect_mask: VkImageAspectFlags,
pub color_attachment: uint32_t,
pub clear_value: VkClearValue,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkClearRect {
pub rect: VkRect2D,
pub base_array_layer: uint32_t,
pub layer_count: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkImageResolve {
pub src_subresource: VkImageSubresourceLayers,
pub src_offset: VkOffset3D,
pub dst_subresource: VkImageSubresourceLayers,
pub dst_offset: VkOffset3D,
pub extent: VkExtent3D,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkMemoryBarrier {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub src_access_mask: VkAccessFlags,
pub dst_access_mask: VkAccessFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkBufferMemoryBarrier {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub src_access_mask: VkAccessFlags,
pub dst_access_mask: VkAccessFlags,
pub src_queue_family_index: uint32_t,
pub dst_queue_family_index: uint32_t,
pub buffer: VkBuffer,
pub offset: VkDeviceSize,
pub size: VkDeviceSize,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkImageMemoryBarrier {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub src_access_mask: VkAccessFlags,
pub dst_access_mask: VkAccessFlags,
pub old_layout: VkImageLayout,
pub new_layout: VkImageLayout,
pub src_queue_family_index: uint32_t,
pub dst_queue_family_index: uint32_t,
pub image: VkImage,
pub subresource_range: VkImageSubresourceRange,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkRenderPassBeginInfo {
pub s_type: VkStructureType,
pub p_next: *const c_void,
pub render_pass: VkRenderPass,
pub framebuffer: VkFramebuffer,
pub render_area: VkRect2D,
pub clear_value_count: uint32_t,
pub p_clear_values: *const VkClearValue,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDispatchIndirectCommand {
pub x: uint32_t,
pub y: uint32_t,
pub z: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDrawIndexedIndirectCommand {
pub index_count: uint32_t,
pub instance_count: uint32_t,
pub first_index: uint32_t,
pub vertex_offset: int32_t,
pub first_instance: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkDrawIndirectCommand {
pub vertex_count: uint32_t,
pub instance_count: uint32_t,
pub first_vertex: uint32_t,
pub first_instance: uint32_t,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSurfaceCapabilitiesKHR {
pub min_image_count: uint32_t,
pub max_image_count: uint32_t,
pub current_extent: VkExtent2D,
pub min_image_extent: VkExtent2D,
pub max_image_extent: VkExtent2D,
pub max_image_array_layers: uint32_t,
pub supported_transforms: VkSurfaceTransformFlagsKHR,
pub current_transform: VkSurfaceTransformFlagsKHR,
pub supported_composite_alpha: VkCompositeAlphaFlagsKHR,
pub supported_usage_flags: VkImageUsageFlags,
}
#[derive(Debug, Clone)]
#[repr(C)]
pub struct VkSurfaceFormatKHR {
pub format: VkFormat,
pub color_space: VkColorSpaceKHR,
}
/// Temporary Hard-Coded union hack; will be automatically generated when actual unions become stable
#[repr(C)]
#[derive(Debug, Clone)]
pub struct VkClearColorValue {
data: [u8; 16]
}
impl VkClearColorValue {
pub unsafe fn float32(&self) -> &[c_float; 4] {
use std::mem;
mem::transmute(&self.data)
}
pub unsafe fn int32(&self) -> &[int32_t; 4] {
use std::mem;
mem::transmute(&self.data)
}
pub unsafe fn uint32(&self) -> &[uint32_t; 4] {
use std::mem;
mem::transmute(&self.data)
}
pub unsafe fn float32_mut(&mut self) -> &mut [c_float; 4] {
use std::mem;
mem::transmute(&mut self.data)
}
pub unsafe fn int32_mut(&mut self) -> &mut [int32_t; 4] {
use std::mem;
mem::transmute(&mut self.data)
}
pub unsafe fn uint32_mut(&mut self) -> &mut [uint32_t; 4] {
use std::mem;
mem::transmute(&mut self.data)
}
pub fn new_float32(float32: [c_float; 4]) -> VkClearColorValue {
use std::mem;
unsafe {
let mut union: VkClearColorValue = mem::zeroed();
union.data = mem::transmute(float32);
union
}
}
pub fn new_int32(int32: [int32_t; 4]) -> VkClearColorValue {
use std::mem;
unsafe {
let mut union: VkClearColorValue = mem::zeroed();
union.data = mem::transmute(int32);
union
}
}
pub fn new_uint32(uint32: [uint32_t; 4]) -> VkClearColorValue {
use std::mem;
unsafe {
let mut union: VkClearColorValue = mem::zeroed();
union.data = mem::transmute(uint32);
union
}
}
}
/// Temporary Hard-Coded union hack; will be automatically generated when actual unions become stable
#[repr(C)]
#[derive(Debug, Clone)]
pub struct VkClearValue {
data: [u8; 16]
}
impl VkClearValue {
pub unsafe fn color(&self) -> &VkClearColorValue {
use std::mem;
mem::transmute(&self.data)
}
pub unsafe fn depth_stencil(&self) -> &VkClearDepthStencilValue {
use std::mem;
mem::transmute(&self.data)
}
pub unsafe fn color_mut(&mut self) -> &mut VkClearColorValue {
use std::mem;
mem::transmute(&mut self.data)
}
pub unsafe fn depth_stencil_mut(&mut self) -> &mut VkClearDepthStencilValue {
use std::mem;
mem::transmute(&mut self.data)
}
pub fn new_color(color: VkClearColorValue) -> VkClearValue {
use std::mem;
unsafe {
let mut union: VkClearValue = mem::zeroed();
union.data = mem::transmute(color);
union
}
}
pub fn new_depth_stencil(depth_stencil: VkClearDepthStencilValue) -> VkClearValue {
use std::mem;
unsafe {
let mut union: VkClearValue = mem::zeroed();
union.data = mem::transmute_copy(&depth_stencil);
union
}
}
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkPipelineCacheHeaderVersion {
One = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkStructureType {
ApplicationInfo = 0,
InstanceCreateInfo = 1,
DeviceQueueCreateInfo = 2,
DeviceCreateInfo = 3,
SubmitInfo = 4,
MemoryAllocateInfo = 5,
MappedMemoryRange = 6,
BindSparseInfo = 7,
FenceCreateInfo = 8,
SemaphoreCreateInfo = 9,
EventCreateInfo = 10,
QueryPoolCreateInfo = 11,
BufferCreateInfo = 12,
BufferViewCreateInfo = 13,
ImageCreateInfo = 14,
ImageViewCreateInfo = 15,
ShaderModuleCreateInfo = 16,
PipelineCacheCreateInfo = 17,
PipelineShaderStageCreateInfo = 18,
PipelineVertexInputStateCreateInfo = 19,
PipelineInputAssemblyStateCreateInfo = 20,
PipelineTessellationStateCreateInfo = 21,
PipelineViewportStateCreateInfo = 22,
PipelineRasterizationStateCreateInfo = 23,
PipelineMultisampleStateCreateInfo = 24,
PipelineDepthStencilStateCreateInfo = 25,
PipelineColorBlendStateCreateInfo = 26,
PipelineDynamicStateCreateInfo = 27,
GraphicsPipelineCreateInfo = 28,
ComputePipelineCreateInfo = 29,
PipelineLayoutCreateInfo = 30,
SamplerCreateInfo = 31,
DescriptorSetLayoutCreateInfo = 32,
DescriptorPoolCreateInfo = 33,
DescriptorSetAllocateInfo = 34,
WriteDescriptorSet = 35,
CopyDescriptorSet = 36,
FramebufferCreateInfo = 37,
RenderPassCreateInfo = 38,
CommandPoolCreateInfo = 39,
CommandBufferAllocateInfo = 40,
CommandBufferInheritanceInfo = 41,
CommandBufferBeginInfo = 42,
RenderPassBeginInfo = 43,
BufferMemoryBarrier = 44,
ImageMemoryBarrier = 45,
MemoryBarrier = 46,
LoaderInstanceCreateInfo = 47,
LoaderDeviceCreateInfo = 48,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkSystemAllocationScope {
Command = 0,
Object = 1,
Cache = 2,
Device = 3,
Instance = 4,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkInternalAllocationType {
Executable = 0,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkResult {
Success = 0,
NotReady = 1,
Timeout = 2,
EventSet = 3,
EventReset = 4,
Incomplete = 5,
ErrorOutOfHostMemory = -1,
ErrorOutOfDeviceMemory = -2,
ErrorInitializationFailed = -3,
ErrorDeviceLost = -4,
ErrorMemoryMapFailed = -5,
ErrorLayerNotPresent = -6,
ErrorExtensionNotPresent = -7,
ErrorFeatureNotPresent = -8,
ErrorIncompatibleDriver = -9,
ErrorTooManyObjects = -10,
ErrorFormatNotSupported = -11,
ErrorSurfaceLostKhr = -1000000000,
ErrorNativeWindowInUseKhr = -1000000001,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkFormat {
Undefined = 0,
R4g4UnormPack8 = 1,
R4g4b4a4UnormPack16 = 2,
B4g4r4a4UnormPack16 = 3,
R5g6b5UnormPack16 = 4,
B5g6r5UnormPack16 = 5,
R5g5b5a1UnormPack16 = 6,
B5g5r5a1UnormPack16 = 7,
A1r5g5b5UnormPack16 = 8,
R8Unorm = 9,
R8Snorm = 10,
R8Uscaled = 11,
R8Sscaled = 12,
R8Uint = 13,
R8Sint = 14,
R8Srgb = 15,
R8g8Unorm = 16,
R8g8Snorm = 17,
R8g8Uscaled = 18,
R8g8Sscaled = 19,
R8g8Uint = 20,
R8g8Sint = 21,
R8g8Srgb = 22,
R8g8b8Unorm = 23,
R8g8b8Snorm = 24,
R8g8b8Uscaled = 25,
R8g8b8Sscaled = 26,
R8g8b8Uint = 27,
R8g8b8Sint = 28,
R8g8b8Srgb = 29,
B8g8r8Unorm = 30,
B8g8r8Snorm = 31,
B8g8r8Uscaled = 32,
B8g8r8Sscaled = 33,
B8g8r8Uint = 34,
B8g8r8Sint = 35,
B8g8r8Srgb = 36,
R8g8b8a8Unorm = 37,
R8g8b8a8Snorm = 38,
R8g8b8a8Uscaled = 39,
R8g8b8a8Sscaled = 40,
R8g8b8a8Uint = 41,
R8g8b8a8Sint = 42,
R8g8b8a8Srgb = 43,
B8g8r8a8Unorm = 44,
B8g8r8a8Snorm = 45,
B8g8r8a8Uscaled = 46,
B8g8r8a8Sscaled = 47,
B8g8r8a8Uint = 48,
B8g8r8a8Sint = 49,
B8g8r8a8Srgb = 50,
A8b8g8r8UnormPack32 = 51,
A8b8g8r8SnormPack32 = 52,
A8b8g8r8UscaledPack32 = 53,
A8b8g8r8SscaledPack32 = 54,
A8b8g8r8UintPack32 = 55,
A8b8g8r8SintPack32 = 56,
A8b8g8r8SrgbPack32 = 57,
A2r10g10b10UnormPack32 = 58,
A2r10g10b10SnormPack32 = 59,
A2r10g10b10UscaledPack32 = 60,
A2r10g10b10SscaledPack32 = 61,
A2r10g10b10UintPack32 = 62,
A2r10g10b10SintPack32 = 63,
A2b10g10r10UnormPack32 = 64,
A2b10g10r10SnormPack32 = 65,
A2b10g10r10UscaledPack32 = 66,
A2b10g10r10SscaledPack32 = 67,
A2b10g10r10UintPack32 = 68,
A2b10g10r10SintPack32 = 69,
R16Unorm = 70,
R16Snorm = 71,
R16Uscaled = 72,
R16Sscaled = 73,
R16Uint = 74,
R16Sint = 75,
R16Sfloat = 76,
R16g16Unorm = 77,
R16g16Snorm = 78,
R16g16Uscaled = 79,
R16g16Sscaled = 80,
R16g16Uint = 81,
R16g16Sint = 82,
R16g16Sfloat = 83,
R16g16b16Unorm = 84,
R16g16b16Snorm = 85,
R16g16b16Uscaled = 86,
R16g16b16Sscaled = 87,
R16g16b16Uint = 88,
R16g16b16Sint = 89,
R16g16b16Sfloat = 90,
R16g16b16a16Unorm = 91,
R16g16b16a16Snorm = 92,
R16g16b16a16Uscaled = 93,
R16g16b16a16Sscaled = 94,
R16g16b16a16Uint = 95,
R16g16b16a16Sint = 96,
R16g16b16a16Sfloat = 97,
R32Uint = 98,
R32Sint = 99,
R32Sfloat = 100,
R32g32Uint = 101,
R32g32Sint = 102,
R32g32Sfloat = 103,
R32g32b32Uint = 104,
R32g32b32Sint = 105,
R32g32b32Sfloat = 106,
R32g32b32a32Uint = 107,
R32g32b32a32Sint = 108,
R32g32b32a32Sfloat = 109,
R64Uint = 110,
R64Sint = 111,
R64Sfloat = 112,
R64g64Uint = 113,
R64g64Sint = 114,
R64g64Sfloat = 115,
R64g64b64Uint = 116,
R64g64b64Sint = 117,
R64g64b64Sfloat = 118,
R64g64b64a64Uint = 119,
R64g64b64a64Sint = 120,
R64g64b64a64Sfloat = 121,
B10g11r11UfloatPack32 = 122,
E5b9g9r9UfloatPack32 = 123,
D16Unorm = 124,
X8D24UnormPack32 = 125,
D32Sfloat = 126,
S8Uint = 127,
D16UnormS8Uint = 128,
D24UnormS8Uint = 129,
D32SfloatS8Uint = 130,
Bc1RgbUnormBlock = 131,
Bc1RgbSrgbBlock = 132,
Bc1RgbaUnormBlock = 133,
Bc1RgbaSrgbBlock = 134,
Bc2UnormBlock = 135,
Bc2SrgbBlock = 136,
Bc3UnormBlock = 137,
Bc3SrgbBlock = 138,
Bc4UnormBlock = 139,
Bc4SnormBlock = 140,
Bc5UnormBlock = 141,
Bc5SnormBlock = 142,
Bc6hUfloatBlock = 143,
Bc6hSfloatBlock = 144,
Bc7UnormBlock = 145,
Bc7SrgbBlock = 146,
Etc2R8g8b8UnormBlock = 147,
Etc2R8g8b8SrgbBlock = 148,
Etc2R8g8b8a1UnormBlock = 149,
Etc2R8g8b8a1SrgbBlock = 150,
Etc2R8g8b8a8UnormBlock = 151,
Etc2R8g8b8a8SrgbBlock = 152,
EacR11UnormBlock = 153,
EacR11SnormBlock = 154,
EacR11g11UnormBlock = 155,
EacR11g11SnormBlock = 156,
Astc4x4UnormBlock = 157,
Astc4x4SrgbBlock = 158,
Astc5x4UnormBlock = 159,
Astc5x4SrgbBlock = 160,
Astc5x5UnormBlock = 161,
Astc5x5SrgbBlock = 162,
Astc6x5UnormBlock = 163,
Astc6x5SrgbBlock = 164,
Astc6x6UnormBlock = 165,
Astc6x6SrgbBlock = 166,
Astc8x5UnormBlock = 167,
Astc8x5SrgbBlock = 168,
Astc8x6UnormBlock = 169,
Astc8x6SrgbBlock = 170,
Astc8x8UnormBlock = 171,
Astc8x8SrgbBlock = 172,
Astc10x5UnormBlock = 173,
Astc10x5SrgbBlock = 174,
Astc10x6UnormBlock = 175,
Astc10x6SrgbBlock = 176,
Astc10x8UnormBlock = 177,
Astc10x8SrgbBlock = 178,
Astc10x10UnormBlock = 179,
Astc10x10SrgbBlock = 180,
Astc12x10UnormBlock = 181,
Astc12x10SrgbBlock = 182,
Astc12x12UnormBlock = 183,
Astc12x12SrgbBlock = 184,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkImageType {
Type1d = 0,
Type2d = 1,
Type3d = 2,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkImageTiling {
Optimal = 0,
Linear = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkPhysicalDeviceType {
Other = 0,
IntegratedGpu = 1,
DiscreteGpu = 2,
VirtualGpu = 3,
Cpu = 4,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkQueryType {
Occlusion = 0,
PipelineStatistics = 1,
Timestamp = 2,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkSharingMode {
Exclusive = 0,
Concurrent = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkImageLayout {
Undefined = 0,
General = 1,
ColorAttachmentOptimal = 2,
DepthStencilAttachmentOptimal = 3,
DepthStencilReadOnlyOptimal = 4,
ShaderReadOnlyOptimal = 5,
TransferSrcOptimal = 6,
TransferDstOptimal = 7,
Preinitialized = 8,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkImageViewType {
Type1d = 0,
Type2d = 1,
Type3d = 2,
Cube = 3,
Type1dArray = 4,
Type2dArray = 5,
CubeArray = 6,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkComponentSwizzle {
Identity = 0,
Zero = 1,
One = 2,
R = 3,
G = 4,
B = 5,
A = 6,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkVertexInputRate {
Vertex = 0,
Instance = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkPrimitiveTopology {
PointList = 0,
LineList = 1,
LineStrip = 2,
TriangleList = 3,
TriangleStrip = 4,
TriangleFan = 5,
LineListWithAdjacency = 6,
LineStripWithAdjacency = 7,
TriangleListWithAdjacency = 8,
TriangleStripWithAdjacency = 9,
PatchList = 10,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkPolygonMode {
Fill = 0,
Line = 1,
Point = 2,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkFrontFace {
CounterClockwise = 0,
Clockwise = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkCompareOp {
Never = 0,
Less = 1,
Equal = 2,
LessOrEqual = 3,
Greater = 4,
NotEqual = 5,
GreaterOrEqual = 6,
Always = 7,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkStencilOp {
Keep = 0,
Zero = 1,
Replace = 2,
IncrementAndClamp = 3,
DecrementAndClamp = 4,
Invert = 5,
IncrementAndWrap = 6,
DecrementAndWrap = 7,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkLogicOp {
Clear = 0,
And = 1,
AndReverse = 2,
Copy = 3,
AndInverted = 4,
No = 5,
Xor = 6,
Or = 7,
Nor = 8,
Equivalent = 9,
Invert = 10,
OrReverse = 11,
CopyInverted = 12,
OrInverted = 13,
Nand = 14,
Set = 15,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkBlendFactor {
Zero = 0,
One = 1,
SrcColor = 2,
OneMinusSrcColor = 3,
DstColor = 4,
OneMinusDstColor = 5,
SrcAlpha = 6,
OneMinusSrcAlpha = 7,
DstAlpha = 8,
OneMinusDstAlpha = 9,
ConstantColor = 10,
OneMinusConstantColor = 11,
ConstantAlpha = 12,
OneMinusConstantAlpha = 13,
SrcAlphaSaturate = 14,
Src1Color = 15,
OneMinusSrc1Color = 16,
Src1Alpha = 17,
OneMinusSrc1Alpha = 18,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkBlendOp {
Add = 0,
Subtract = 1,
ReverseSubtract = 2,
Min = 3,
Max = 4,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkDynamicState {
Viewport = 0,
Scissor = 1,
LineWidth = 2,
DepthBias = 3,
BlendConstants = 4,
DepthBounds = 5,
StencilCompareMask = 6,
StencilWriteMask = 7,
StencilReference = 8,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkFilter {
Nearest = 0,
Linear = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkSamplerMipmapMode {
Nearest = 0,
Linear = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkSamplerAddressMode {
Repeat = 0,
MirroredRepeat = 1,
ClampToEdge = 2,
ClampToBorder = 3,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkBorderColor {
FloatTransparentBlack = 0,
IntTransparentBlack = 1,
FloatOpaqueBlack = 2,
IntOpaqueBlack = 3,
FloatOpaqueWhite = 4,
IntOpaqueWhite = 5,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkDescriptorType {
Sampler = 0,
CombinedImageSampler = 1,
SampledImage = 2,
StorageImage = 3,
UniformTexelBuffer = 4,
StorageTexelBuffer = 5,
UniformBuffer = 6,
StorageBuffer = 7,
UniformBufferDynamic = 8,
StorageBufferDynamic = 9,
InputAttachment = 10,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkAttachmentLoadOp {
Load = 0,
Clear = 1,
DontCare = 2,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkAttachmentStoreOp {
Store = 0,
DontCare = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkPipelineBindPoint {
Graphics = 0,
Compute = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkCommandBufferLevel {
Primary = 0,
Secondary = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkIndexType {
Uint16 = 0,
Uint32 = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkSubpassContents {
Inline = 0,
SecondaryCommandBuffers = 1,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkColorSpaceKHR {
PaceSrgbNonlinear = 0,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum VkPresentModeKHR {
Immediate = 0,
Mailbox = 1,
Fifo = 2,
FifoRelaxed = 3,
}
#[repr(C)]
#[doc(hidden)]
pub struct VkInstance_T (u8);
pub type VkInstance = *mut VkInstance_T;
#[repr(C)]
#[doc(hidden)]
pub struct VkPhysicalDevice_T (u8);
pub type VkPhysicalDevice = *mut VkPhysicalDevice_T;
#[repr(C)]
#[doc(hidden)]
pub struct VkDevice_T (u8);
pub type VkDevice = *mut VkDevice_T;
#[repr(C)]
#[doc(hidden)]
pub struct VkQueue_T (u8);
pub type VkQueue = *mut VkQueue_T;
handle_nondispatchable!(VkSemaphore);
#[repr(C)]
#[doc(hidden)]
pub struct VkCommandBuffer_T (u8);
pub type VkCommandBuffer = *mut VkCommandBuffer_T;
handle_nondispatchable!(VkFence);
handle_nondispatchable!(VkDeviceMemory);
handle_nondispatchable!(VkBuffer);
handle_nondispatchable!(VkImage);
handle_nondispatchable!(VkEvent);
handle_nondispatchable!(VkQueryPool);
handle_nondispatchable!(VkBufferView);
handle_nondispatchable!(VkImageView);
handle_nondispatchable!(VkShaderModule);
handle_nondispatchable!(VkPipelineCache);
handle_nondispatchable!(VkPipelineLayout);
handle_nondispatchable!(VkRenderPass);
handle_nondispatchable!(VkPipeline);
handle_nondispatchable!(VkDescriptorSetLayout);
handle_nondispatchable!(VkSampler);
handle_nondispatchable!(VkDescriptorPool);
handle_nondispatchable!(VkDescriptorSet);
handle_nondispatchable!(VkFramebuffer);
handle_nondispatchable!(VkCommandPool);
handle_nondispatchable!(VkSurfaceKHR);
pub const FORMAT_FEATURE_SAMPLED_IMAGE_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b1};
pub const FORMAT_FEATURE_STORAGE_IMAGE_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b10};
pub const FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b100};
pub const FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b1000};
pub const FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b10000};
pub const FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b100000};
pub const FORMAT_FEATURE_VERTEX_BUFFER_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b1000000};
pub const FORMAT_FEATURE_COLOR_ATTACHMENT_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b10000000};
pub const FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b100000000};
pub const FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b1000000000};
pub const FORMAT_FEATURE_BLIT_SRC_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b10000000000};
pub const FORMAT_FEATURE_BLIT_DST_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b100000000000};
pub const FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT: VkFormatFeatureFlags = VkFormatFeatureFlags {flags: 0b1000000000000};
vk_bitflags_wrapped!(VkFormatFeatureFlags, 0b1111111111111, VkFlags);
pub const IMAGE_USAGE_TRANSFER_SRC_BIT: VkImageUsageFlags = VkImageUsageFlags {flags: 0b1};
pub const IMAGE_USAGE_TRANSFER_DST_BIT: VkImageUsageFlags = VkImageUsageFlags {flags: 0b10};
pub const IMAGE_USAGE_SAMPLED_BIT: VkImageUsageFlags = VkImageUsageFlags {flags: 0b100};
pub const IMAGE_USAGE_STORAGE_BIT: VkImageUsageFlags = VkImageUsageFlags {flags: 0b1000};
pub const IMAGE_USAGE_COLOR_ATTACHMENT_BIT: VkImageUsageFlags = VkImageUsageFlags {flags: 0b10000};
pub const IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT: VkImageUsageFlags = VkImageUsageFlags {flags: 0b100000};
pub const IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT: VkImageUsageFlags = VkImageUsageFlags {flags: 0b1000000};
pub const IMAGE_USAGE_INPUT_ATTACHMENT_BIT: VkImageUsageFlags = VkImageUsageFlags {flags: 0b10000000};
vk_bitflags_wrapped!(VkImageUsageFlags, 0b11111111, VkFlags);
pub const IMAGE_CREATE_SPARSE_BINDING_BIT: VkImageCreateFlags = VkImageCreateFlags {flags: 0b1};
pub const IMAGE_CREATE_SPARSE_RESIDENCY_BIT: VkImageCreateFlags = VkImageCreateFlags {flags: 0b10};
pub const IMAGE_CREATE_SPARSE_ALIASED_BIT: VkImageCreateFlags = VkImageCreateFlags {flags: 0b100};
pub const IMAGE_CREATE_MUTABLE_FORMAT_BIT: VkImageCreateFlags = VkImageCreateFlags {flags: 0b1000};
pub const IMAGE_CREATE_CUBE_COMPATIBLE_BIT: VkImageCreateFlags = VkImageCreateFlags {flags: 0b10000};
vk_bitflags_wrapped!(VkImageCreateFlags, 0b11111, VkFlags);
pub const SAMPLE_COUNT_1_BIT: VkSampleCountFlags = VkSampleCountFlags {flags: 0b1};
pub const SAMPLE_COUNT_2_BIT: VkSampleCountFlags = VkSampleCountFlags {flags: 0b10};
pub const SAMPLE_COUNT_4_BIT: VkSampleCountFlags = VkSampleCountFlags {flags: 0b100};
pub const SAMPLE_COUNT_8_BIT: VkSampleCountFlags = VkSampleCountFlags {flags: 0b1000};
pub const SAMPLE_COUNT_16_BIT: VkSampleCountFlags = VkSampleCountFlags {flags: 0b10000};
pub const SAMPLE_COUNT_32_BIT: VkSampleCountFlags = VkSampleCountFlags {flags: 0b100000};
pub const SAMPLE_COUNT_64_BIT: VkSampleCountFlags = VkSampleCountFlags {flags: 0b1000000};
vk_bitflags_wrapped!(VkSampleCountFlags, 0b1111111, VkFlags);
pub const QUEUE_GRAPHICS_BIT: VkQueueFlags = VkQueueFlags {flags: 0b1};
pub const QUEUE_COMPUTE_BIT: VkQueueFlags = VkQueueFlags {flags: 0b10};
pub const QUEUE_TRANSFER_BIT: VkQueueFlags = VkQueueFlags {flags: 0b100};
pub const QUEUE_SPARSE_BINDING_BIT: VkQueueFlags = VkQueueFlags {flags: 0b1000};
vk_bitflags_wrapped!(VkQueueFlags, 0b1111, VkFlags);
pub const MEMORY_PROPERTY_DEVICE_LOCAL_BIT: VkMemoryPropertyFlags = VkMemoryPropertyFlags {flags: 0b1};
pub const MEMORY_PROPERTY_HOST_VISIBLE_BIT: VkMemoryPropertyFlags = VkMemoryPropertyFlags {flags: 0b10};
pub const MEMORY_PROPERTY_HOST_COHERENT_BIT: VkMemoryPropertyFlags = VkMemoryPropertyFlags {flags: 0b100};
pub const MEMORY_PROPERTY_HOST_CACHED_BIT: VkMemoryPropertyFlags = VkMemoryPropertyFlags {flags: 0b1000};
pub const MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT: VkMemoryPropertyFlags = VkMemoryPropertyFlags {flags: 0b10000};
vk_bitflags_wrapped!(VkMemoryPropertyFlags, 0b11111, VkFlags);
pub const MEMORY_HEAP_DEVICE_LOCAL_BIT: VkMemoryHeapFlags = VkMemoryHeapFlags {flags: 0b1};
vk_bitflags_wrapped!(VkMemoryHeapFlags, 0b1, VkFlags);
pub const PIPELINE_STAGE_TOP_OF_PIPE_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b1};
pub const PIPELINE_STAGE_DRAW_INDIRECT_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b10};
pub const PIPELINE_STAGE_VERTEX_INPUT_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b100};
pub const PIPELINE_STAGE_VERTEX_SHADER_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b1000};
pub const PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b10000};
pub const PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b100000};
pub const PIPELINE_STAGE_GEOMETRY_SHADER_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b1000000};
pub const PIPELINE_STAGE_FRAGMENT_SHADER_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b10000000};
pub const PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b100000000};
pub const PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b1000000000};
pub const PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b10000000000};
pub const PIPELINE_STAGE_COMPUTE_SHADER_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b100000000000};
pub const PIPELINE_STAGE_TRANSFER_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b1000000000000};
pub const PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b10000000000000};
pub const PIPELINE_STAGE_HOST_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b100000000000000};
pub const PIPELINE_STAGE_ALL_GRAPHICS_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b1000000000000000};
pub const PIPELINE_STAGE_ALL_COMMANDS_BIT: VkPipelineStageFlags = VkPipelineStageFlags {flags: 0b10000000000000000};
vk_bitflags_wrapped!(VkPipelineStageFlags, 0b11111111111111111, VkFlags);
pub const IMAGE_ASPECT_COLOR_BIT: VkImageAspectFlags = VkImageAspectFlags {flags: 0b1};
pub const IMAGE_ASPECT_DEPTH_BIT: VkImageAspectFlags = VkImageAspectFlags {flags: 0b10};
pub const IMAGE_ASPECT_STENCIL_BIT: VkImageAspectFlags = VkImageAspectFlags {flags: 0b100};
pub const IMAGE_ASPECT_METADATA_BIT: VkImageAspectFlags = VkImageAspectFlags {flags: 0b1000};
vk_bitflags_wrapped!(VkImageAspectFlags, 0b1111, VkFlags);
pub const SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT: VkSparseImageFormatFlags = VkSparseImageFormatFlags {flags: 0b1};
pub const SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT: VkSparseImageFormatFlags = VkSparseImageFormatFlags {flags: 0b10};
pub const SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT: VkSparseImageFormatFlags = VkSparseImageFormatFlags {flags: 0b100};
vk_bitflags_wrapped!(VkSparseImageFormatFlags, 0b111, VkFlags);
pub const SPARSE_MEMORY_BIND_METADATA_BIT: VkSparseMemoryBindFlags = VkSparseMemoryBindFlags {flags: 0b1};
vk_bitflags_wrapped!(VkSparseMemoryBindFlags, 0b1, VkFlags);
pub const FENCE_CREATE_SIGNALED_BIT: VkFenceCreateFlags = VkFenceCreateFlags {flags: 0b1};
vk_bitflags_wrapped!(VkFenceCreateFlags, 0b1, VkFlags);
pub const QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b1};
pub const QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b10};
pub const QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b100};
pub const QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b1000};
pub const QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b10000};
pub const QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b100000};
pub const QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b1000000};
pub const QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b10000000};
pub const QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b100000000};
pub const QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b1000000000};
pub const QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT: VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlags {flags: 0b10000000000};
vk_bitflags_wrapped!(VkQueryPipelineStatisticFlags, 0b11111111111, VkFlags);
pub const QUERY_RESULT_64_BIT: VkQueryResultFlags = VkQueryResultFlags {flags: 0b1};
pub const QUERY_RESULT_WAIT_BIT: VkQueryResultFlags = VkQueryResultFlags {flags: 0b10};
pub const QUERY_RESULT_WITH_AVAILABILITY_BIT: VkQueryResultFlags = VkQueryResultFlags {flags: 0b100};
pub const QUERY_RESULT_PARTIAL_BIT: VkQueryResultFlags = VkQueryResultFlags {flags: 0b1000};
vk_bitflags_wrapped!(VkQueryResultFlags, 0b1111, VkFlags);
pub const BUFFER_CREATE_SPARSE_BINDING_BIT: VkBufferCreateFlags = VkBufferCreateFlags {flags: 0b1};
pub const BUFFER_CREATE_SPARSE_RESIDENCY_BIT: VkBufferCreateFlags = VkBufferCreateFlags {flags: 0b10};
pub const BUFFER_CREATE_SPARSE_ALIASED_BIT: VkBufferCreateFlags = VkBufferCreateFlags {flags: 0b100};
vk_bitflags_wrapped!(VkBufferCreateFlags, 0b111, VkFlags);
pub const BUFFER_USAGE_TRANSFER_SRC_BIT: VkBufferUsageFlags = VkBufferUsageFlags {flags: 0b1};
pub const BUFFER_USAGE_TRANSFER_DST_BIT: VkBufferUsageFlags = VkBufferUsageFlags {flags: 0b10};
pub const BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT: VkBufferUsageFlags = VkBufferUsageFlags {flags: 0b100};
pub const BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT: VkBufferUsageFlags = VkBufferUsageFlags {flags: 0b1000};
pub const BUFFER_USAGE_UNIFORM_BUFFER_BIT: VkBufferUsageFlags = VkBufferUsageFlags {flags: 0b10000};
pub const BUFFER_USAGE_STORAGE_BUFFER_BIT: VkBufferUsageFlags = VkBufferUsageFlags {flags: 0b100000};
pub const BUFFER_USAGE_INDEX_BUFFER_BIT: VkBufferUsageFlags = VkBufferUsageFlags {flags: 0b1000000};
pub const BUFFER_USAGE_VERTEX_BUFFER_BIT: VkBufferUsageFlags = VkBufferUsageFlags {flags: 0b10000000};
pub const BUFFER_USAGE_INDIRECT_BUFFER_BIT: VkBufferUsageFlags = VkBufferUsageFlags {flags: 0b100000000};
vk_bitflags_wrapped!(VkBufferUsageFlags, 0b111111111, VkFlags);
pub const PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT: VkPipelineCreateFlags = VkPipelineCreateFlags {flags: 0b1};
pub const PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT: VkPipelineCreateFlags = VkPipelineCreateFlags {flags: 0b10};
pub const PIPELINE_CREATE_DERIVATIVE_BIT: VkPipelineCreateFlags = VkPipelineCreateFlags {flags: 0b100};
vk_bitflags_wrapped!(VkPipelineCreateFlags, 0b111, VkFlags);
pub const SHADER_STAGE_VERTEX_BIT: VkShaderStageFlags = VkShaderStageFlags {flags: 0b1};
pub const SHADER_STAGE_TESSELLATION_CONTROL_BIT: VkShaderStageFlags = VkShaderStageFlags {flags: 0b10};
pub const SHADER_STAGE_TESSELLATION_EVALUATION_BIT: VkShaderStageFlags = VkShaderStageFlags {flags: 0b100};
pub const SHADER_STAGE_GEOMETRY_BIT: VkShaderStageFlags = VkShaderStageFlags {flags: 0b1000};
pub const SHADER_STAGE_FRAGMENT_BIT: VkShaderStageFlags = VkShaderStageFlags {flags: 0b10000};
pub const SHADER_STAGE_COMPUTE_BIT: VkShaderStageFlags = VkShaderStageFlags {flags: 0b100000};
pub const SHADER_STAGE_ALL_GRAPHICS: VkShaderStageFlags = VkShaderStageFlags {flags: 0b11111};
pub const SHADER_STAGE_ALL: VkShaderStageFlags = VkShaderStageFlags {flags: 0b1111111111111111111111111111111};
vk_bitflags_wrapped!(VkShaderStageFlags, 0b1111111111111111111111111111111, VkFlags);
pub const CULL_MODE_NONE: VkCullModeFlags = VkCullModeFlags {flags: 0b0};
pub const CULL_MODE_FRONT_BIT: VkCullModeFlags = VkCullModeFlags {flags: 0b1};
pub const CULL_MODE_BACK_BIT: VkCullModeFlags = VkCullModeFlags {flags: 0b10};
pub const CULL_MODE_FRONT_AND_BACK: VkCullModeFlags = VkCullModeFlags {flags: 0b11};
vk_bitflags_wrapped!(VkCullModeFlags, 0b11, VkFlags);
pub const COLOR_COMPONENT_R_BIT: VkColorComponentFlags = VkColorComponentFlags {flags: 0b1};
pub const COLOR_COMPONENT_G_BIT: VkColorComponentFlags = VkColorComponentFlags {flags: 0b10};
pub const COLOR_COMPONENT_B_BIT: VkColorComponentFlags = VkColorComponentFlags {flags: 0b100};
pub const COLOR_COMPONENT_A_BIT: VkColorComponentFlags = VkColorComponentFlags {flags: 0b1000};
vk_bitflags_wrapped!(VkColorComponentFlags, 0b1111, VkFlags);
pub const DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT: VkDescriptorPoolCreateFlags = VkDescriptorPoolCreateFlags {flags: 0b1};
vk_bitflags_wrapped!(VkDescriptorPoolCreateFlags, 0b1, VkFlags);
pub const ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT: VkAttachmentDescriptionFlags = VkAttachmentDescriptionFlags {flags: 0b1};
vk_bitflags_wrapped!(VkAttachmentDescriptionFlags, 0b1, VkFlags);
pub const ACCESS_INDIRECT_COMMAND_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b1};
pub const ACCESS_INDEX_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b10};
pub const ACCESS_VERTEX_ATTRIBUTE_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b100};
pub const ACCESS_UNIFORM_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b1000};
pub const ACCESS_INPUT_ATTACHMENT_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b10000};
pub const ACCESS_SHADER_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b100000};
pub const ACCESS_SHADER_WRITE_BIT: VkAccessFlags = VkAccessFlags {flags: 0b1000000};
pub const ACCESS_COLOR_ATTACHMENT_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b10000000};
pub const ACCESS_COLOR_ATTACHMENT_WRITE_BIT: VkAccessFlags = VkAccessFlags {flags: 0b100000000};
pub const ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b1000000000};
pub const ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT: VkAccessFlags = VkAccessFlags {flags: 0b10000000000};
pub const ACCESS_TRANSFER_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b100000000000};
pub const ACCESS_TRANSFER_WRITE_BIT: VkAccessFlags = VkAccessFlags {flags: 0b1000000000000};
pub const ACCESS_HOST_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b10000000000000};
pub const ACCESS_HOST_WRITE_BIT: VkAccessFlags = VkAccessFlags {flags: 0b100000000000000};
pub const ACCESS_MEMORY_READ_BIT: VkAccessFlags = VkAccessFlags {flags: 0b1000000000000000};
pub const ACCESS_MEMORY_WRITE_BIT: VkAccessFlags = VkAccessFlags {flags: 0b10000000000000000};
vk_bitflags_wrapped!(VkAccessFlags, 0b11111111111111111, VkFlags);
pub const DEPENDENCY_BY_REGION_BIT: VkDependencyFlags = VkDependencyFlags {flags: 0b1};
vk_bitflags_wrapped!(VkDependencyFlags, 0b1, VkFlags);
pub const COMMAND_POOL_CREATE_TRANSIENT_BIT: VkCommandPoolCreateFlags = VkCommandPoolCreateFlags {flags: 0b1};
pub const COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT: VkCommandPoolCreateFlags = VkCommandPoolCreateFlags {flags: 0b10};
vk_bitflags_wrapped!(VkCommandPoolCreateFlags, 0b11, VkFlags);
pub const COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT: VkCommandPoolResetFlags = VkCommandPoolResetFlags {flags: 0b1};
vk_bitflags_wrapped!(VkCommandPoolResetFlags, 0b1, VkFlags);
pub const COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT: VkCommandBufferUsageFlags = VkCommandBufferUsageFlags {flags: 0b1};
pub const COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT: VkCommandBufferUsageFlags = VkCommandBufferUsageFlags {flags: 0b10};
pub const COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT: VkCommandBufferUsageFlags = VkCommandBufferUsageFlags {flags: 0b100};
vk_bitflags_wrapped!(VkCommandBufferUsageFlags, 0b111, VkFlags);
pub const QUERY_CONTROL_PRECISE_BIT: VkQueryControlFlags = VkQueryControlFlags {flags: 0b1};
vk_bitflags_wrapped!(VkQueryControlFlags, 0b1, VkFlags);
pub const COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT: VkCommandBufferResetFlags = VkCommandBufferResetFlags {flags: 0b1};
vk_bitflags_wrapped!(VkCommandBufferResetFlags, 0b1, VkFlags);
pub const STENCIL_FACE_FRONT_BIT: VkStencilFaceFlags = VkStencilFaceFlags {flags: 0b1};
pub const STENCIL_FACE_BACK_BIT: VkStencilFaceFlags = VkStencilFaceFlags {flags: 0b10};
pub const STENCIL_FRONT_AND_BACK: VkStencilFaceFlags = VkStencilFaceFlags {flags: 0b11};
vk_bitflags_wrapped!(VkStencilFaceFlags, 0b11, VkFlags);
pub const SURFACE_TRANSFORM_IDENTITY_BIT_KHR: VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagsKHR {flags: 0b1};
pub const SURFACE_TRANSFORM_ROTATE_90_BIT_KHR: VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagsKHR {flags: 0b10};
pub const SURFACE_TRANSFORM_ROTATE_180_BIT_KHR: VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagsKHR {flags: 0b100};
pub const SURFACE_TRANSFORM_ROTATE_270_BIT_KHR: VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagsKHR {flags: 0b1000};
pub const SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR: VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagsKHR {flags: 0b10000};
pub const SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR: VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagsKHR {flags: 0b100000};
pub const SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR: VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagsKHR {flags: 0b1000000};
pub const SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR: VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagsKHR {flags: 0b10000000};
pub const SURFACE_TRANSFORM_INHERIT_BIT_KHR: VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagsKHR {flags: 0b100000000};
vk_bitflags_wrapped!(VkSurfaceTransformFlagsKHR, 0b111111111, VkFlags);
pub const COMPOSITE_ALPHA_OPAQUE_BIT_KHR: VkCompositeAlphaFlagsKHR = VkCompositeAlphaFlagsKHR {flags: 0b1};
pub const COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR: VkCompositeAlphaFlagsKHR = VkCompositeAlphaFlagsKHR {flags: 0b10};
pub const COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR: VkCompositeAlphaFlagsKHR = VkCompositeAlphaFlagsKHR {flags: 0b100};
pub const COMPOSITE_ALPHA_INHERIT_BIT_KHR: VkCompositeAlphaFlagsKHR = VkCompositeAlphaFlagsKHR {flags: 0b1000};
vk_bitflags_wrapped!(VkCompositeAlphaFlagsKHR, 0b1111, VkFlags);
pub type PFN_vkAllocationFunction = unsafe extern "system" fn(
*mut c_void,
size_t,
size_t,
VkSystemAllocationScope,
) -> *mut c_void;
pub type PFN_vkReallocationFunction = unsafe extern "system" fn(
*mut c_void,
*mut c_void,
size_t,
size_t,
VkSystemAllocationScope,
) -> *mut c_void;
pub type PFN_vkFreeFunction = unsafe extern "system" fn(
*mut c_void,
*mut c_void,
);
pub type PFN_vkInternalAllocationNotification = unsafe extern "system" fn(
*mut c_void,
size_t,
VkInternalAllocationType,
VkSystemAllocationScope,
);
pub type PFN_vkInternalFreeNotification = unsafe extern "system" fn(
*mut c_void,
size_t,
VkInternalAllocationType,
VkSystemAllocationScope,
);
pub type PFN_vkVoidFunction = unsafe extern "system" fn(
);
}
pub mod cmds {
#![allow(dead_code)]
#![allow(non_camel_case_types)]
use super::*;
vk_struct_bindings!{
"vkCreateInstance", create_instance(
p_create_info: *const VkInstanceCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_instance: *mut VkInstance,
) -> VkResult;
"vkDestroyInstance", destroy_instance(
instance: VkInstance,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkEnumeratePhysicalDevices", enumerate_physical_devices(
instance: VkInstance,
p_physical_device_count: *mut uint32_t,
p_physical_devices: *mut VkPhysicalDevice,
) -> VkResult;
"vkGetPhysicalDeviceFeatures", get_physical_device_features(
physical_device: VkPhysicalDevice,
p_features: *mut VkPhysicalDeviceFeatures,
) -> ();
"vkGetPhysicalDeviceFormatProperties", get_physical_device_format_properties(
physical_device: VkPhysicalDevice,
format: VkFormat,
p_format_properties: *mut VkFormatProperties,
) -> ();
"vkGetPhysicalDeviceImageFormatProperties", get_physical_device_image_format_properties(
physical_device: VkPhysicalDevice,
format: VkFormat,
typ: VkImageType,
tiling: VkImageTiling,
usage: VkImageUsageFlags,
flags: VkImageCreateFlags,
p_image_format_properties: *mut VkImageFormatProperties,
) -> VkResult;
"vkGetPhysicalDeviceProperties", get_physical_device_properties(
physical_device: VkPhysicalDevice,
p_properties: *mut VkPhysicalDeviceProperties,
) -> ();
"vkGetPhysicalDeviceQueueFamilyProperties", get_physical_device_queue_family_properties(
physical_device: VkPhysicalDevice,
p_queue_family_property_count: *mut uint32_t,
p_queue_family_properties: *mut VkQueueFamilyProperties,
) -> ();
"vkGetPhysicalDeviceMemoryProperties", get_physical_device_memory_properties(
physical_device: VkPhysicalDevice,
p_memory_properties: *mut VkPhysicalDeviceMemoryProperties,
) -> ();
"vkGetInstanceProcAddr", get_instance_proc_addr(
instance: VkInstance,
p_name: *const c_char,
) -> PFN_vkVoidFunction;
"vkGetDeviceProcAddr", get_device_proc_addr(
device: VkDevice,
p_name: *const c_char,
) -> PFN_vkVoidFunction;
"vkCreateDevice", create_device(
physical_device: VkPhysicalDevice,
p_create_info: *const VkDeviceCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_device: *mut VkDevice,
) -> VkResult;
"vkDestroyDevice", destroy_device(
device: VkDevice,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkEnumerateInstanceExtensionProperties", enumerate_instance_extension_properties(
p_layer_name: *const c_char,
p_property_count: *mut uint32_t,
p_properties: *mut VkExtensionProperties,
) -> VkResult;
"vkEnumerateDeviceExtensionProperties", enumerate_device_extension_properties(
physical_device: VkPhysicalDevice,
p_layer_name: *const c_char,
p_property_count: *mut uint32_t,
p_properties: *mut VkExtensionProperties,
) -> VkResult;
"vkEnumerateInstanceLayerProperties", enumerate_instance_layer_properties(
p_property_count: *mut uint32_t,
p_properties: *mut VkLayerProperties,
) -> VkResult;
"vkEnumerateDeviceLayerProperties", enumerate_device_layer_properties(
physical_device: VkPhysicalDevice,
p_property_count: *mut uint32_t,
p_properties: *mut VkLayerProperties,
) -> VkResult;
"vkGetDeviceQueue", get_device_queue(
device: VkDevice,
queue_family_index: uint32_t,
queue_index: uint32_t,
p_queue: *mut VkQueue,
) -> ();
"vkQueueSubmit", queue_submit(
queue: VkQueue,
submit_count: uint32_t,
p_submits: *const VkSubmitInfo,
fence: VkFence,
) -> VkResult;
"vkQueueWaitIdle", queue_wait_idle(
queue: VkQueue,
) -> VkResult;
"vkDeviceWaitIdle", device_wait_idle(
device: VkDevice,
) -> VkResult;
"vkAllocateMemory", allocate_memory(
device: VkDevice,
p_allocate_info: *const VkMemoryAllocateInfo,
p_allocator: *const VkAllocationCallbacks,
p_memory: *mut VkDeviceMemory,
) -> VkResult;
"vkFreeMemory", free_memory(
device: VkDevice,
memory: VkDeviceMemory,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkMapMemory", map_memory(
device: VkDevice,
memory: VkDeviceMemory,
offset: VkDeviceSize,
size: VkDeviceSize,
flags: VkMemoryMapFlags,
pp_data: *mut *mut c_void,
) -> VkResult;
"vkUnmapMemory", unmap_memory(
device: VkDevice,
memory: VkDeviceMemory,
) -> ();
"vkFlushMappedMemoryRanges", flush_mapped_memory_ranges(
device: VkDevice,
memory_range_count: uint32_t,
p_memory_ranges: *const VkMappedMemoryRange,
) -> VkResult;
"vkInvalidateMappedMemoryRanges", invalidate_mapped_memory_ranges(
device: VkDevice,
memory_range_count: uint32_t,
p_memory_ranges: *const VkMappedMemoryRange,
) -> VkResult;
"vkGetDeviceMemoryCommitment", get_device_memory_commitment(
device: VkDevice,
memory: VkDeviceMemory,
p_committed_memory_in_bytes: *mut VkDeviceSize,
) -> ();
"vkBindBufferMemory", bind_buffer_memory(
device: VkDevice,
buffer: VkBuffer,
memory: VkDeviceMemory,
memory_offset: VkDeviceSize,
) -> VkResult;
"vkBindImageMemory", bind_image_memory(
device: VkDevice,
image: VkImage,
memory: VkDeviceMemory,
memory_offset: VkDeviceSize,
) -> VkResult;
"vkGetBufferMemoryRequirements", get_buffer_memory_requirements(
device: VkDevice,
buffer: VkBuffer,
p_memory_requirements: *mut VkMemoryRequirements,
) -> ();
"vkGetImageMemoryRequirements", get_image_memory_requirements(
device: VkDevice,
image: VkImage,
p_memory_requirements: *mut VkMemoryRequirements,
) -> ();
"vkGetImageSparseMemoryRequirements", get_image_sparse_memory_requirements(
device: VkDevice,
image: VkImage,
p_sparse_memory_requirement_count: *mut uint32_t,
p_sparse_memory_requirements: *mut VkSparseImageMemoryRequirements,
) -> ();
"vkGetPhysicalDeviceSparseImageFormatProperties", get_physical_device_sparse_image_format_properties(
physical_device: VkPhysicalDevice,
format: VkFormat,
typ: VkImageType,
samples: VkSampleCountFlags,
usage: VkImageUsageFlags,
tiling: VkImageTiling,
p_property_count: *mut uint32_t,
p_properties: *mut VkSparseImageFormatProperties,
) -> ();
"vkQueueBindSparse", queue_bind_sparse(
queue: VkQueue,
bind_info_count: uint32_t,
p_bind_info: *const VkBindSparseInfo,
fence: VkFence,
) -> VkResult;
"vkCreateFence", create_fence(
device: VkDevice,
p_create_info: *const VkFenceCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_fence: *mut VkFence,
) -> VkResult;
"vkDestroyFence", destroy_fence(
device: VkDevice,
fence: VkFence,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkResetFences", reset_fences(
device: VkDevice,
fence_count: uint32_t,
p_fences: *const VkFence,
) -> VkResult;
"vkGetFenceStatus", get_fence_status(
device: VkDevice,
fence: VkFence,
) -> VkResult;
"vkWaitForFences", wait_for_fences(
device: VkDevice,
fence_count: uint32_t,
p_fences: *const VkFence,
wait_all: VkBool32,
timeout: uint64_t,
) -> VkResult;
"vkCreateSemaphore", create_semaphore(
device: VkDevice,
p_create_info: *const VkSemaphoreCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_semaphore: *mut VkSemaphore,
) -> VkResult;
"vkDestroySemaphore", destroy_semaphore(
device: VkDevice,
semaphore: VkSemaphore,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreateEvent", create_event(
device: VkDevice,
p_create_info: *const VkEventCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_event: *mut VkEvent,
) -> VkResult;
"vkDestroyEvent", destroy_event(
device: VkDevice,
event: VkEvent,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkGetEventStatus", get_event_status(
device: VkDevice,
event: VkEvent,
) -> VkResult;
"vkSetEvent", set_event(
device: VkDevice,
event: VkEvent,
) -> VkResult;
"vkResetEvent", reset_event(
device: VkDevice,
event: VkEvent,
) -> VkResult;
"vkCreateQueryPool", create_query_pool(
device: VkDevice,
p_create_info: *const VkQueryPoolCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_query_pool: *mut VkQueryPool,
) -> VkResult;
"vkDestroyQueryPool", destroy_query_pool(
device: VkDevice,
query_pool: VkQueryPool,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkGetQueryPoolResults", get_query_pool_results(
device: VkDevice,
query_pool: VkQueryPool,
first_query: uint32_t,
query_count: uint32_t,
data_size: size_t,
p_data: *mut c_void,
stride: VkDeviceSize,
flags: VkQueryResultFlags,
) -> VkResult;
"vkCreateBuffer", create_buffer(
device: VkDevice,
p_create_info: *const VkBufferCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_buffer: *mut VkBuffer,
) -> VkResult;
"vkDestroyBuffer", destroy_buffer(
device: VkDevice,
buffer: VkBuffer,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreateBufferView", create_buffer_view(
device: VkDevice,
p_create_info: *const VkBufferViewCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_view: *mut VkBufferView,
) -> VkResult;
"vkDestroyBufferView", destroy_buffer_view(
device: VkDevice,
buffer_view: VkBufferView,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreateImage", create_image(
device: VkDevice,
p_create_info: *const VkImageCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_image: *mut VkImage,
) -> VkResult;
"vkDestroyImage", destroy_image(
device: VkDevice,
image: VkImage,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkGetImageSubresourceLayout", get_image_subresource_layout(
device: VkDevice,
image: VkImage,
p_subresource: *const VkImageSubresource,
p_layout: *mut VkSubresourceLayout,
) -> ();
"vkCreateImageView", create_image_view(
device: VkDevice,
p_create_info: *const VkImageViewCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_view: *mut VkImageView,
) -> VkResult;
"vkDestroyImageView", destroy_image_view(
device: VkDevice,
image_view: VkImageView,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreateShaderModule", create_shader_module(
device: VkDevice,
p_create_info: *const VkShaderModuleCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_shader_module: *mut VkShaderModule,
) -> VkResult;
"vkDestroyShaderModule", destroy_shader_module(
device: VkDevice,
shader_module: VkShaderModule,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreatePipelineCache", create_pipeline_cache(
device: VkDevice,
p_create_info: *const VkPipelineCacheCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_pipeline_cache: *mut VkPipelineCache,
) -> VkResult;
"vkDestroyPipelineCache", destroy_pipeline_cache(
device: VkDevice,
pipeline_cache: VkPipelineCache,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkGetPipelineCacheData", get_pipeline_cache_data(
device: VkDevice,
pipeline_cache: VkPipelineCache,
p_data_size: *mut size_t,
p_data: *mut c_void,
) -> VkResult;
"vkMergePipelineCaches", merge_pipeline_caches(
device: VkDevice,
dst_cache: VkPipelineCache,
src_cache_count: uint32_t,
p_src_caches: *const VkPipelineCache,
) -> VkResult;
"vkCreateGraphicsPipelines", create_graphics_pipelines(
device: VkDevice,
pipeline_cache: VkPipelineCache,
create_info_count: uint32_t,
p_create_infos: *const VkGraphicsPipelineCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_pipelines: *mut VkPipeline,
) -> VkResult;
"vkCreateComputePipelines", create_compute_pipelines(
device: VkDevice,
pipeline_cache: VkPipelineCache,
create_info_count: uint32_t,
p_create_infos: *const VkComputePipelineCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_pipelines: *mut VkPipeline,
) -> VkResult;
"vkDestroyPipeline", destroy_pipeline(
device: VkDevice,
pipeline: VkPipeline,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreatePipelineLayout", create_pipeline_layout(
device: VkDevice,
p_create_info: *const VkPipelineLayoutCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_pipeline_layout: *mut VkPipelineLayout,
) -> VkResult;
"vkDestroyPipelineLayout", destroy_pipeline_layout(
device: VkDevice,
pipeline_layout: VkPipelineLayout,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreateSampler", create_sampler(
device: VkDevice,
p_create_info: *const VkSamplerCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_sampler: *mut VkSampler,
) -> VkResult;
"vkDestroySampler", destroy_sampler(
device: VkDevice,
sampler: VkSampler,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreateDescriptorSetLayout", create_descriptor_set_layout(
device: VkDevice,
p_create_info: *const VkDescriptorSetLayoutCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_set_layout: *mut VkDescriptorSetLayout,
) -> VkResult;
"vkDestroyDescriptorSetLayout", destroy_descriptor_set_layout(
device: VkDevice,
descriptor_set_layout: VkDescriptorSetLayout,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreateDescriptorPool", create_descriptor_pool(
device: VkDevice,
p_create_info: *const VkDescriptorPoolCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_descriptor_pool: *mut VkDescriptorPool,
) -> VkResult;
"vkDestroyDescriptorPool", destroy_descriptor_pool(
device: VkDevice,
descriptor_pool: VkDescriptorPool,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkResetDescriptorPool", reset_descriptor_pool(
device: VkDevice,
descriptor_pool: VkDescriptorPool,
flags: VkDescriptorPoolResetFlags,
) -> VkResult;
"vkAllocateDescriptorSets", allocate_descriptor_sets(
device: VkDevice,
p_allocate_info: *const VkDescriptorSetAllocateInfo,
p_descriptor_sets: *mut VkDescriptorSet,
) -> VkResult;
"vkFreeDescriptorSets", free_descriptor_sets(
device: VkDevice,
descriptor_pool: VkDescriptorPool,
descriptor_set_count: uint32_t,
p_descriptor_sets: *const VkDescriptorSet,
) -> VkResult;
"vkUpdateDescriptorSets", update_descriptor_sets(
device: VkDevice,
descriptor_write_count: uint32_t,
p_descriptor_writes: *const VkWriteDescriptorSet,
descriptor_copy_count: uint32_t,
p_descriptor_copies: *const VkCopyDescriptorSet,
) -> ();
"vkCreateFramebuffer", create_framebuffer(
device: VkDevice,
p_create_info: *const VkFramebufferCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_framebuffer: *mut VkFramebuffer,
) -> VkResult;
"vkDestroyFramebuffer", destroy_framebuffer(
device: VkDevice,
framebuffer: VkFramebuffer,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkCreateRenderPass", create_render_pass(
device: VkDevice,
p_create_info: *const VkRenderPassCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_render_pass: *mut VkRenderPass,
) -> VkResult;
"vkDestroyRenderPass", destroy_render_pass(
device: VkDevice,
render_pass: VkRenderPass,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkGetRenderAreaGranularity", get_render_area_granularity(
device: VkDevice,
render_pass: VkRenderPass,
p_granularity: *mut VkExtent2D,
) -> ();
"vkCreateCommandPool", create_command_pool(
device: VkDevice,
p_create_info: *const VkCommandPoolCreateInfo,
p_allocator: *const VkAllocationCallbacks,
p_command_pool: *mut VkCommandPool,
) -> VkResult;
"vkDestroyCommandPool", destroy_command_pool(
device: VkDevice,
command_pool: VkCommandPool,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkResetCommandPool", reset_command_pool(
device: VkDevice,
command_pool: VkCommandPool,
flags: VkCommandPoolResetFlags,
) -> VkResult;
"vkAllocateCommandBuffers", allocate_command_buffers(
device: VkDevice,
p_allocate_info: *const VkCommandBufferAllocateInfo,
p_command_buffers: *mut VkCommandBuffer,
) -> VkResult;
"vkFreeCommandBuffers", free_command_buffers(
device: VkDevice,
command_pool: VkCommandPool,
command_buffer_count: uint32_t,
p_command_buffers: *const VkCommandBuffer,
) -> ();
"vkBeginCommandBuffer", begin_command_buffer(
command_buffer: VkCommandBuffer,
p_begin_info: *const VkCommandBufferBeginInfo,
) -> VkResult;
"vkEndCommandBuffer", end_command_buffer(
command_buffer: VkCommandBuffer,
) -> VkResult;
"vkResetCommandBuffer", reset_command_buffer(
command_buffer: VkCommandBuffer,
flags: VkCommandBufferResetFlags,
) -> VkResult;
"vkCmdBindPipeline", cmd_bind_pipeline(
command_buffer: VkCommandBuffer,
pipeline_bind_point: VkPipelineBindPoint,
pipeline: VkPipeline,
) -> ();
"vkCmdSetViewport", cmd_set_viewport(
command_buffer: VkCommandBuffer,
first_viewport: uint32_t,
viewport_count: uint32_t,
p_viewports: *const VkViewport,
) -> ();
"vkCmdSetScissor", cmd_set_scissor(
command_buffer: VkCommandBuffer,
first_scissor: uint32_t,
scissor_count: uint32_t,
p_scissors: *const VkRect2D,
) -> ();
"vkCmdSetLineWidth", cmd_set_line_width(
command_buffer: VkCommandBuffer,
line_width: c_float,
) -> ();
"vkCmdSetDepthBias", cmd_set_depth_bias(
command_buffer: VkCommandBuffer,
depth_bias_constant_factor: c_float,
depth_bias_clamp: c_float,
depth_bias_slope_factor: c_float,
) -> ();
"vkCmdSetBlendConstants", cmd_set_blend_constants(
command_buffer: VkCommandBuffer,
blend_constants: *const [c_float; 4],
) -> ();
"vkCmdSetDepthBounds", cmd_set_depth_bounds(
command_buffer: VkCommandBuffer,
min_depth_bounds: c_float,
max_depth_bounds: c_float,
) -> ();
"vkCmdSetStencilCompareMask", cmd_set_stencil_compare_mask(
command_buffer: VkCommandBuffer,
face_mask: VkStencilFaceFlags,
compare_mask: uint32_t,
) -> ();
"vkCmdSetStencilWriteMask", cmd_set_stencil_write_mask(
command_buffer: VkCommandBuffer,
face_mask: VkStencilFaceFlags,
write_mask: uint32_t,
) -> ();
"vkCmdSetStencilReference", cmd_set_stencil_reference(
command_buffer: VkCommandBuffer,
face_mask: VkStencilFaceFlags,
reference: uint32_t,
) -> ();
"vkCmdBindDescriptorSets", cmd_bind_descriptor_sets(
command_buffer: VkCommandBuffer,
pipeline_bind_point: VkPipelineBindPoint,
layout: VkPipelineLayout,
first_set: uint32_t,
descriptor_set_count: uint32_t,
p_descriptor_sets: *const VkDescriptorSet,
dynamic_offset_count: uint32_t,
p_dynamic_offsets: *const uint32_t,
) -> ();
"vkCmdBindIndexBuffer", cmd_bind_index_buffer(
command_buffer: VkCommandBuffer,
buffer: VkBuffer,
offset: VkDeviceSize,
index_type: VkIndexType,
) -> ();
"vkCmdBindVertexBuffers", cmd_bind_vertex_buffers(
command_buffer: VkCommandBuffer,
first_binding: uint32_t,
binding_count: uint32_t,
p_buffers: *const VkBuffer,
p_offsets: *const VkDeviceSize,
) -> ();
"vkCmdDraw", cmd_draw(
command_buffer: VkCommandBuffer,
vertex_count: uint32_t,
instance_count: uint32_t,
first_vertex: uint32_t,
first_instance: uint32_t,
) -> ();
"vkCmdDrawIndexed", cmd_draw_indexed(
command_buffer: VkCommandBuffer,
index_count: uint32_t,
instance_count: uint32_t,
first_index: uint32_t,
vertex_offset: int32_t,
first_instance: uint32_t,
) -> ();
"vkCmdDrawIndirect", cmd_draw_indirect(
command_buffer: VkCommandBuffer,
buffer: VkBuffer,
offset: VkDeviceSize,
draw_count: uint32_t,
stride: uint32_t,
) -> ();
"vkCmdDrawIndexedIndirect", cmd_draw_indexed_indirect(
command_buffer: VkCommandBuffer,
buffer: VkBuffer,
offset: VkDeviceSize,
draw_count: uint32_t,
stride: uint32_t,
) -> ();
"vkCmdDispatch", cmd_dispatch(
command_buffer: VkCommandBuffer,
x: uint32_t,
y: uint32_t,
z: uint32_t,
) -> ();
"vkCmdDispatchIndirect", cmd_dispatch_indirect(
command_buffer: VkCommandBuffer,
buffer: VkBuffer,
offset: VkDeviceSize,
) -> ();
"vkCmdCopyBuffer", cmd_copy_buffer(
command_buffer: VkCommandBuffer,
src_buffer: VkBuffer,
dst_buffer: VkBuffer,
region_count: uint32_t,
p_regions: *const VkBufferCopy,
) -> ();
"vkCmdCopyImage", cmd_copy_image(
command_buffer: VkCommandBuffer,
src_image: VkImage,
src_image_layout: VkImageLayout,
dst_image: VkImage,
dst_image_layout: VkImageLayout,
region_count: uint32_t,
p_regions: *const VkImageCopy,
) -> ();
"vkCmdBlitImage", cmd_blit_image(
command_buffer: VkCommandBuffer,
src_image: VkImage,
src_image_layout: VkImageLayout,
dst_image: VkImage,
dst_image_layout: VkImageLayout,
region_count: uint32_t,
p_regions: *const VkImageBlit,
filter: VkFilter,
) -> ();
"vkCmdCopyBufferToImage", cmd_copy_buffer_to_image(
command_buffer: VkCommandBuffer,
src_buffer: VkBuffer,
dst_image: VkImage,
dst_image_layout: VkImageLayout,
region_count: uint32_t,
p_regions: *const VkBufferImageCopy,
) -> ();
"vkCmdCopyImageToBuffer", cmd_copy_image_to_buffer(
command_buffer: VkCommandBuffer,
src_image: VkImage,
src_image_layout: VkImageLayout,
dst_buffer: VkBuffer,
region_count: uint32_t,
p_regions: *const VkBufferImageCopy,
) -> ();
"vkCmdUpdateBuffer", cmd_update_buffer(
command_buffer: VkCommandBuffer,
dst_buffer: VkBuffer,
dst_offset: VkDeviceSize,
data_size: VkDeviceSize,
p_data: *const uint32_t,
) -> ();
"vkCmdFillBuffer", cmd_fill_buffer(
command_buffer: VkCommandBuffer,
dst_buffer: VkBuffer,
dst_offset: VkDeviceSize,
size: VkDeviceSize,
data: uint32_t,
) -> ();
"vkCmdClearColorImage", cmd_clear_color_image(
command_buffer: VkCommandBuffer,
image: VkImage,
image_layout: VkImageLayout,
p_color: *const VkClearColorValue,
range_count: uint32_t,
p_ranges: *const VkImageSubresourceRange,
) -> ();
"vkCmdClearDepthStencilImage", cmd_clear_depth_stencil_image(
command_buffer: VkCommandBuffer,
image: VkImage,
image_layout: VkImageLayout,
p_depth_stencil: *const VkClearDepthStencilValue,
range_count: uint32_t,
p_ranges: *const VkImageSubresourceRange,
) -> ();
"vkCmdClearAttachments", cmd_clear_attachments(
command_buffer: VkCommandBuffer,
attachment_count: uint32_t,
p_attachments: *const VkClearAttachment,
rect_count: uint32_t,
p_rects: *const VkClearRect,
) -> ();
"vkCmdResolveImage", cmd_resolve_image(
command_buffer: VkCommandBuffer,
src_image: VkImage,
src_image_layout: VkImageLayout,
dst_image: VkImage,
dst_image_layout: VkImageLayout,
region_count: uint32_t,
p_regions: *const VkImageResolve,
) -> ();
"vkCmdSetEvent", cmd_set_event(
command_buffer: VkCommandBuffer,
event: VkEvent,
stage_mask: VkPipelineStageFlags,
) -> ();
"vkCmdResetEvent", cmd_reset_event(
command_buffer: VkCommandBuffer,
event: VkEvent,
stage_mask: VkPipelineStageFlags,
) -> ();
"vkCmdWaitEvents", cmd_wait_events(
command_buffer: VkCommandBuffer,
event_count: uint32_t,
p_events: *const VkEvent,
src_stage_mask: VkPipelineStageFlags,
dst_stage_mask: VkPipelineStageFlags,
memory_barrier_count: uint32_t,
p_memory_barriers: *const VkMemoryBarrier,
buffer_memory_barrier_count: uint32_t,
p_buffer_memory_barriers: *const VkBufferMemoryBarrier,
image_memory_barrier_count: uint32_t,
p_image_memory_barriers: *const VkImageMemoryBarrier,
) -> ();
"vkCmdPipelineBarrier", cmd_pipeline_barrier(
command_buffer: VkCommandBuffer,
src_stage_mask: VkPipelineStageFlags,
dst_stage_mask: VkPipelineStageFlags,
dependency_flags: VkDependencyFlags,
memory_barrier_count: uint32_t,
p_memory_barriers: *const VkMemoryBarrier,
buffer_memory_barrier_count: uint32_t,
p_buffer_memory_barriers: *const VkBufferMemoryBarrier,
image_memory_barrier_count: uint32_t,
p_image_memory_barriers: *const VkImageMemoryBarrier,
) -> ();
"vkCmdBeginQuery", cmd_begin_query(
command_buffer: VkCommandBuffer,
query_pool: VkQueryPool,
query: uint32_t,
flags: VkQueryControlFlags,
) -> ();
"vkCmdEndQuery", cmd_end_query(
command_buffer: VkCommandBuffer,
query_pool: VkQueryPool,
query: uint32_t,
) -> ();
"vkCmdResetQueryPool", cmd_reset_query_pool(
command_buffer: VkCommandBuffer,
query_pool: VkQueryPool,
first_query: uint32_t,
query_count: uint32_t,
) -> ();
"vkCmdWriteTimestamp", cmd_write_timestamp(
command_buffer: VkCommandBuffer,
pipeline_stage: VkPipelineStageFlags,
query_pool: VkQueryPool,
query: uint32_t,
) -> ();
"vkCmdCopyQueryPoolResults", cmd_copy_query_pool_results(
command_buffer: VkCommandBuffer,
query_pool: VkQueryPool,
first_query: uint32_t,
query_count: uint32_t,
dst_buffer: VkBuffer,
dst_offset: VkDeviceSize,
stride: VkDeviceSize,
flags: VkQueryResultFlags,
) -> ();
"vkCmdPushConstants", cmd_push_constants(
command_buffer: VkCommandBuffer,
layout: VkPipelineLayout,
stage_flags: VkShaderStageFlags,
offset: uint32_t,
size: uint32_t,
p_values: *const c_void,
) -> ();
"vkCmdBeginRenderPass", cmd_begin_render_pass(
command_buffer: VkCommandBuffer,
p_render_pass_begin: *const VkRenderPassBeginInfo,
contents: VkSubpassContents,
) -> ();
"vkCmdNextSubpass", cmd_next_subpass(
command_buffer: VkCommandBuffer,
contents: VkSubpassContents,
) -> ();
"vkCmdEndRenderPass", cmd_end_render_pass(
command_buffer: VkCommandBuffer,
) -> ();
"vkCmdExecuteCommands", cmd_execute_commands(
command_buffer: VkCommandBuffer,
command_buffer_count: uint32_t,
p_command_buffers: *const VkCommandBuffer,
) -> ();
"vkDestroySurfaceKHR", destroy_surface_khr(
instance: VkInstance,
surface: VkSurfaceKHR,
p_allocator: *const VkAllocationCallbacks,
) -> ();
"vkGetPhysicalDeviceSurfaceSupportKHR", get_physical_device_surface_support_khr(
physical_device: VkPhysicalDevice,
queue_family_index: uint32_t,
surface: VkSurfaceKHR,
p_supported: *mut VkBool32,
) -> VkResult;
"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", get_physical_device_surface_capabilities_khr(
physical_device: VkPhysicalDevice,
surface: VkSurfaceKHR,
p_surface_capabilities: *mut VkSurfaceCapabilitiesKHR,
) -> VkResult;
"vkGetPhysicalDeviceSurfaceFormatsKHR", get_physical_device_surface_formats_khr(
physical_device: VkPhysicalDevice,
surface: VkSurfaceKHR,
p_surface_format_count: *mut uint32_t,
p_surface_formats: *mut VkSurfaceFormatKHR,
) -> VkResult;
"vkGetPhysicalDeviceSurfacePresentModesKHR", get_physical_device_surface_present_modes_khr(
physical_device: VkPhysicalDevice,
surface: VkSurfaceKHR,
p_present_mode_count: *mut uint32_t,
p_present_modes: *mut VkPresentModeKHR,
) -> VkResult;
}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment