Fix struct generation with constant sized arrays
This commit is contained in:
parent
659b10c5ae
commit
71ab88531e
130
ash/src/vk.rs
130
ash/src/vk.rs
|
@ -8011,8 +8011,8 @@ pub struct PhysicalDeviceProperties {
|
||||||
pub vendor_id: u32,
|
pub vendor_id: u32,
|
||||||
pub device_id: u32,
|
pub device_id: u32,
|
||||||
pub device_type: PhysicalDeviceType,
|
pub device_type: PhysicalDeviceType,
|
||||||
pub device_name: &[c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE],
|
pub device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE],
|
||||||
pub pipeline_cache_uuid: &[u8; UUID_SIZE],
|
pub pipeline_cache_uuid: [u8; UUID_SIZE],
|
||||||
pub limits: PhysicalDeviceLimits,
|
pub limits: PhysicalDeviceLimits,
|
||||||
pub sparse_properties: PhysicalDeviceSparseProperties,
|
pub sparse_properties: PhysicalDeviceSparseProperties,
|
||||||
}
|
}
|
||||||
|
@ -8098,14 +8098,14 @@ impl<'a> PhysicalDevicePropertiesBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn device_name(
|
pub fn device_name(
|
||||||
mut self,
|
mut self,
|
||||||
device_name: &[c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE],
|
device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE],
|
||||||
) -> PhysicalDevicePropertiesBuilder<'a> {
|
) -> PhysicalDevicePropertiesBuilder<'a> {
|
||||||
self.inner.device_name = device_name;
|
self.inner.device_name = device_name;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn pipeline_cache_uuid(
|
pub fn pipeline_cache_uuid(
|
||||||
mut self,
|
mut self,
|
||||||
pipeline_cache_uuid: &[u8; UUID_SIZE],
|
pipeline_cache_uuid: [u8; UUID_SIZE],
|
||||||
) -> PhysicalDevicePropertiesBuilder<'a> {
|
) -> PhysicalDevicePropertiesBuilder<'a> {
|
||||||
self.inner.pipeline_cache_uuid = pipeline_cache_uuid;
|
self.inner.pipeline_cache_uuid = pipeline_cache_uuid;
|
||||||
self
|
self
|
||||||
|
@ -8128,7 +8128,7 @@ impl<'a> PhysicalDevicePropertiesBuilder<'a> {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct ExtensionProperties {
|
pub struct ExtensionProperties {
|
||||||
pub extension_name: &[c_char; MAX_EXTENSION_NAME_SIZE],
|
pub extension_name: [c_char; MAX_EXTENSION_NAME_SIZE],
|
||||||
pub spec_version: u32,
|
pub spec_version: u32,
|
||||||
}
|
}
|
||||||
impl fmt::Debug for ExtensionProperties {
|
impl fmt::Debug for ExtensionProperties {
|
||||||
|
@ -8176,7 +8176,7 @@ impl<'a> ::std::ops::DerefMut for ExtensionPropertiesBuilder<'a> {
|
||||||
impl<'a> ExtensionPropertiesBuilder<'a> {
|
impl<'a> ExtensionPropertiesBuilder<'a> {
|
||||||
pub fn extension_name(
|
pub fn extension_name(
|
||||||
mut self,
|
mut self,
|
||||||
extension_name: &[c_char; MAX_EXTENSION_NAME_SIZE],
|
extension_name: [c_char; MAX_EXTENSION_NAME_SIZE],
|
||||||
) -> ExtensionPropertiesBuilder<'a> {
|
) -> ExtensionPropertiesBuilder<'a> {
|
||||||
self.inner.extension_name = extension_name;
|
self.inner.extension_name = extension_name;
|
||||||
self
|
self
|
||||||
|
@ -8192,10 +8192,10 @@ impl<'a> ExtensionPropertiesBuilder<'a> {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct LayerProperties {
|
pub struct LayerProperties {
|
||||||
pub layer_name: &[c_char; MAX_EXTENSION_NAME_SIZE],
|
pub layer_name: [c_char; MAX_EXTENSION_NAME_SIZE],
|
||||||
pub spec_version: u32,
|
pub spec_version: u32,
|
||||||
pub implementation_version: u32,
|
pub implementation_version: u32,
|
||||||
pub description: &[c_char; MAX_DESCRIPTION_SIZE],
|
pub description: [c_char; MAX_DESCRIPTION_SIZE],
|
||||||
}
|
}
|
||||||
impl fmt::Debug for LayerProperties {
|
impl fmt::Debug for LayerProperties {
|
||||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
@ -8248,7 +8248,7 @@ impl<'a> ::std::ops::DerefMut for LayerPropertiesBuilder<'a> {
|
||||||
impl<'a> LayerPropertiesBuilder<'a> {
|
impl<'a> LayerPropertiesBuilder<'a> {
|
||||||
pub fn layer_name(
|
pub fn layer_name(
|
||||||
mut self,
|
mut self,
|
||||||
layer_name: &[c_char; MAX_EXTENSION_NAME_SIZE],
|
layer_name: [c_char; MAX_EXTENSION_NAME_SIZE],
|
||||||
) -> LayerPropertiesBuilder<'a> {
|
) -> LayerPropertiesBuilder<'a> {
|
||||||
self.inner.layer_name = layer_name;
|
self.inner.layer_name = layer_name;
|
||||||
self
|
self
|
||||||
|
@ -8266,7 +8266,7 @@ impl<'a> LayerPropertiesBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn description(
|
pub fn description(
|
||||||
mut self,
|
mut self,
|
||||||
description: &[c_char; MAX_DESCRIPTION_SIZE],
|
description: [c_char; MAX_DESCRIPTION_SIZE],
|
||||||
) -> LayerPropertiesBuilder<'a> {
|
) -> LayerPropertiesBuilder<'a> {
|
||||||
self.inner.description = description;
|
self.inner.description = description;
|
||||||
self
|
self
|
||||||
|
@ -8843,9 +8843,9 @@ impl<'a> QueueFamilyPropertiesBuilder<'a> {
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
pub struct PhysicalDeviceMemoryProperties {
|
pub struct PhysicalDeviceMemoryProperties {
|
||||||
pub memory_type_count: u32,
|
pub memory_type_count: u32,
|
||||||
pub memory_types: &[MemoryType; MAX_MEMORY_TYPES],
|
pub memory_types: [MemoryType; MAX_MEMORY_TYPES],
|
||||||
pub memory_heap_count: u32,
|
pub memory_heap_count: u32,
|
||||||
pub memory_heaps: &[MemoryHeap; MAX_MEMORY_HEAPS],
|
pub memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS],
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for PhysicalDeviceMemoryProperties {
|
impl ::std::default::Default for PhysicalDeviceMemoryProperties {
|
||||||
fn default() -> PhysicalDeviceMemoryProperties {
|
fn default() -> PhysicalDeviceMemoryProperties {
|
||||||
|
@ -8891,7 +8891,7 @@ impl<'a> PhysicalDeviceMemoryPropertiesBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn memory_types(
|
pub fn memory_types(
|
||||||
mut self,
|
mut self,
|
||||||
memory_types: &[MemoryType; MAX_MEMORY_TYPES],
|
memory_types: [MemoryType; MAX_MEMORY_TYPES],
|
||||||
) -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
|
) -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
|
||||||
self.inner.memory_types = memory_types;
|
self.inner.memory_types = memory_types;
|
||||||
self
|
self
|
||||||
|
@ -8905,7 +8905,7 @@ impl<'a> PhysicalDeviceMemoryPropertiesBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn memory_heaps(
|
pub fn memory_heaps(
|
||||||
mut self,
|
mut self,
|
||||||
memory_heaps: &[MemoryHeap; MAX_MEMORY_HEAPS],
|
memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS],
|
||||||
) -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
|
) -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
|
||||||
self.inner.memory_heaps = memory_heaps;
|
self.inner.memory_heaps = memory_heaps;
|
||||||
self
|
self
|
||||||
|
@ -11261,9 +11261,9 @@ impl<'a> ImageCopyBuilder<'a> {
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
pub struct ImageBlit {
|
pub struct ImageBlit {
|
||||||
pub src_subresource: ImageSubresourceLayers,
|
pub src_subresource: ImageSubresourceLayers,
|
||||||
pub src_offsets: &[Offset3D; 2],
|
pub src_offsets: [Offset3D; 2],
|
||||||
pub dst_subresource: ImageSubresourceLayers,
|
pub dst_subresource: ImageSubresourceLayers,
|
||||||
pub dst_offsets: &[Offset3D; 2],
|
pub dst_offsets: [Offset3D; 2],
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for ImageBlit {
|
impl ::std::default::Default for ImageBlit {
|
||||||
fn default() -> ImageBlit {
|
fn default() -> ImageBlit {
|
||||||
|
@ -11307,7 +11307,7 @@ impl<'a> ImageBlitBuilder<'a> {
|
||||||
self.inner.src_subresource = src_subresource;
|
self.inner.src_subresource = src_subresource;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn src_offsets(mut self, src_offsets: &[Offset3D; 2]) -> ImageBlitBuilder<'a> {
|
pub fn src_offsets(mut self, src_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a> {
|
||||||
self.inner.src_offsets = src_offsets;
|
self.inner.src_offsets = src_offsets;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -11318,7 +11318,7 @@ impl<'a> ImageBlitBuilder<'a> {
|
||||||
self.inner.dst_subresource = dst_subresource;
|
self.inner.dst_subresource = dst_subresource;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn dst_offsets(mut self, dst_offsets: &[Offset3D; 2]) -> ImageBlitBuilder<'a> {
|
pub fn dst_offsets(mut self, dst_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a> {
|
||||||
self.inner.dst_offsets = dst_offsets;
|
self.inner.dst_offsets = dst_offsets;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -13078,7 +13078,7 @@ pub struct PipelineColorBlendStateCreateInfo {
|
||||||
pub logic_op: LogicOp,
|
pub logic_op: LogicOp,
|
||||||
pub attachment_count: u32,
|
pub attachment_count: u32,
|
||||||
pub p_attachments: *const PipelineColorBlendAttachmentState,
|
pub p_attachments: *const PipelineColorBlendAttachmentState,
|
||||||
pub blend_constants: &[f32; 4],
|
pub blend_constants: [f32; 4],
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for PipelineColorBlendStateCreateInfo {
|
impl ::std::default::Default for PipelineColorBlendStateCreateInfo {
|
||||||
fn default() -> PipelineColorBlendStateCreateInfo {
|
fn default() -> PipelineColorBlendStateCreateInfo {
|
||||||
|
@ -13148,7 +13148,7 @@ impl<'a> PipelineColorBlendStateCreateInfoBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn blend_constants(
|
pub fn blend_constants(
|
||||||
mut self,
|
mut self,
|
||||||
blend_constants: &[f32; 4],
|
blend_constants: [f32; 4],
|
||||||
) -> PipelineColorBlendStateCreateInfoBuilder<'a> {
|
) -> PipelineColorBlendStateCreateInfoBuilder<'a> {
|
||||||
self.inner.blend_constants = blend_constants;
|
self.inner.blend_constants = blend_constants;
|
||||||
self
|
self
|
||||||
|
@ -14511,9 +14511,9 @@ impl<'a> RenderPassBeginInfoBuilder<'a> {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub union ClearColorValue {
|
pub union ClearColorValue {
|
||||||
pub float32: &[f32; 4],
|
pub float32: [f32; 4],
|
||||||
pub int32: &[i32; 4],
|
pub int32: [i32; 4],
|
||||||
pub uint32: &[u32; 4],
|
pub uint32: [u32; 4],
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for ClearColorValue {
|
impl ::std::default::Default for ClearColorValue {
|
||||||
fn default() -> ClearColorValue {
|
fn default() -> ClearColorValue {
|
||||||
|
@ -15749,9 +15749,9 @@ pub struct PhysicalDeviceLimits {
|
||||||
pub max_fragment_dual_src_attachments: u32,
|
pub max_fragment_dual_src_attachments: u32,
|
||||||
pub max_fragment_combined_output_resources: u32,
|
pub max_fragment_combined_output_resources: u32,
|
||||||
pub max_compute_shared_memory_size: u32,
|
pub max_compute_shared_memory_size: u32,
|
||||||
pub max_compute_work_group_count: &[u32; 3],
|
pub max_compute_work_group_count: [u32; 3],
|
||||||
pub max_compute_work_group_invocations: u32,
|
pub max_compute_work_group_invocations: u32,
|
||||||
pub max_compute_work_group_size: &[u32; 3],
|
pub max_compute_work_group_size: [u32; 3],
|
||||||
pub sub_pixel_precision_bits: u32,
|
pub sub_pixel_precision_bits: u32,
|
||||||
pub sub_texel_precision_bits: u32,
|
pub sub_texel_precision_bits: u32,
|
||||||
pub mipmap_precision_bits: u32,
|
pub mipmap_precision_bits: u32,
|
||||||
|
@ -15760,8 +15760,8 @@ pub struct PhysicalDeviceLimits {
|
||||||
pub max_sampler_lod_bias: f32,
|
pub max_sampler_lod_bias: f32,
|
||||||
pub max_sampler_anisotropy: f32,
|
pub max_sampler_anisotropy: f32,
|
||||||
pub max_viewports: u32,
|
pub max_viewports: u32,
|
||||||
pub max_viewport_dimensions: &[u32; 2],
|
pub max_viewport_dimensions: [u32; 2],
|
||||||
pub viewport_bounds_range: &[f32; 2],
|
pub viewport_bounds_range: [f32; 2],
|
||||||
pub viewport_sub_pixel_bits: u32,
|
pub viewport_sub_pixel_bits: u32,
|
||||||
pub min_memory_map_alignment: usize,
|
pub min_memory_map_alignment: usize,
|
||||||
pub min_texel_buffer_offset_alignment: DeviceSize,
|
pub min_texel_buffer_offset_alignment: DeviceSize,
|
||||||
|
@ -15794,8 +15794,8 @@ pub struct PhysicalDeviceLimits {
|
||||||
pub max_cull_distances: u32,
|
pub max_cull_distances: u32,
|
||||||
pub max_combined_clip_and_cull_distances: u32,
|
pub max_combined_clip_and_cull_distances: u32,
|
||||||
pub discrete_queue_priorities: u32,
|
pub discrete_queue_priorities: u32,
|
||||||
pub point_size_range: &[f32; 2],
|
pub point_size_range: [f32; 2],
|
||||||
pub line_width_range: &[f32; 2],
|
pub line_width_range: [f32; 2],
|
||||||
pub point_size_granularity: f32,
|
pub point_size_granularity: f32,
|
||||||
pub line_width_granularity: f32,
|
pub line_width_granularity: f32,
|
||||||
pub strict_lines: Bool32,
|
pub strict_lines: Bool32,
|
||||||
|
@ -16323,7 +16323,7 @@ impl<'a> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn max_compute_work_group_count(
|
pub fn max_compute_work_group_count(
|
||||||
mut self,
|
mut self,
|
||||||
max_compute_work_group_count: &[u32; 3],
|
max_compute_work_group_count: [u32; 3],
|
||||||
) -> PhysicalDeviceLimitsBuilder<'a> {
|
) -> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
self.inner.max_compute_work_group_count = max_compute_work_group_count;
|
self.inner.max_compute_work_group_count = max_compute_work_group_count;
|
||||||
self
|
self
|
||||||
|
@ -16337,7 +16337,7 @@ impl<'a> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn max_compute_work_group_size(
|
pub fn max_compute_work_group_size(
|
||||||
mut self,
|
mut self,
|
||||||
max_compute_work_group_size: &[u32; 3],
|
max_compute_work_group_size: [u32; 3],
|
||||||
) -> PhysicalDeviceLimitsBuilder<'a> {
|
) -> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
self.inner.max_compute_work_group_size = max_compute_work_group_size;
|
self.inner.max_compute_work_group_size = max_compute_work_group_size;
|
||||||
self
|
self
|
||||||
|
@ -16397,14 +16397,14 @@ impl<'a> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn max_viewport_dimensions(
|
pub fn max_viewport_dimensions(
|
||||||
mut self,
|
mut self,
|
||||||
max_viewport_dimensions: &[u32; 2],
|
max_viewport_dimensions: [u32; 2],
|
||||||
) -> PhysicalDeviceLimitsBuilder<'a> {
|
) -> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
self.inner.max_viewport_dimensions = max_viewport_dimensions;
|
self.inner.max_viewport_dimensions = max_viewport_dimensions;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn viewport_bounds_range(
|
pub fn viewport_bounds_range(
|
||||||
mut self,
|
mut self,
|
||||||
viewport_bounds_range: &[f32; 2],
|
viewport_bounds_range: [f32; 2],
|
||||||
) -> PhysicalDeviceLimitsBuilder<'a> {
|
) -> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
self.inner.viewport_bounds_range = viewport_bounds_range;
|
self.inner.viewport_bounds_range = viewport_bounds_range;
|
||||||
self
|
self
|
||||||
|
@ -16627,14 +16627,14 @@ impl<'a> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn point_size_range(
|
pub fn point_size_range(
|
||||||
mut self,
|
mut self,
|
||||||
point_size_range: &[f32; 2],
|
point_size_range: [f32; 2],
|
||||||
) -> PhysicalDeviceLimitsBuilder<'a> {
|
) -> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
self.inner.point_size_range = point_size_range;
|
self.inner.point_size_range = point_size_range;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn line_width_range(
|
pub fn line_width_range(
|
||||||
mut self,
|
mut self,
|
||||||
line_width_range: &[f32; 2],
|
line_width_range: [f32; 2],
|
||||||
) -> PhysicalDeviceLimitsBuilder<'a> {
|
) -> PhysicalDeviceLimitsBuilder<'a> {
|
||||||
self.inner.line_width_range = line_width_range;
|
self.inner.line_width_range = line_width_range;
|
||||||
self
|
self
|
||||||
|
@ -19250,7 +19250,7 @@ pub struct DebugMarkerMarkerInfoEXT {
|
||||||
pub s_type: StructureType,
|
pub s_type: StructureType,
|
||||||
pub p_next: *const c_void,
|
pub p_next: *const c_void,
|
||||||
pub p_marker_name: *const c_char,
|
pub p_marker_name: *const c_char,
|
||||||
pub color: &[f32; 4],
|
pub color: [f32; 4],
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for DebugMarkerMarkerInfoEXT {
|
impl ::std::default::Default for DebugMarkerMarkerInfoEXT {
|
||||||
fn default() -> DebugMarkerMarkerInfoEXT {
|
fn default() -> DebugMarkerMarkerInfoEXT {
|
||||||
|
@ -19295,7 +19295,7 @@ impl<'a> DebugMarkerMarkerInfoEXTBuilder<'a> {
|
||||||
self.inner.p_marker_name = marker_name.as_ptr();
|
self.inner.p_marker_name = marker_name.as_ptr();
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn color(mut self, color: &[f32; 4]) -> DebugMarkerMarkerInfoEXTBuilder<'a> {
|
pub fn color(mut self, color: [f32; 4]) -> DebugMarkerMarkerInfoEXTBuilder<'a> {
|
||||||
self.inner.color = color;
|
self.inner.color = color;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -21738,8 +21738,8 @@ pub struct PhysicalDeviceDriverPropertiesKHR {
|
||||||
pub s_type: StructureType,
|
pub s_type: StructureType,
|
||||||
pub p_next: *mut c_void,
|
pub p_next: *mut c_void,
|
||||||
pub driver_id: DriverIdKHR,
|
pub driver_id: DriverIdKHR,
|
||||||
pub driver_name: &[c_char; MAX_DRIVER_NAME_SIZE_KHR],
|
pub driver_name: [c_char; MAX_DRIVER_NAME_SIZE_KHR],
|
||||||
pub driver_info: &[c_char; MAX_DRIVER_INFO_SIZE_KHR],
|
pub driver_info: [c_char; MAX_DRIVER_INFO_SIZE_KHR],
|
||||||
pub conformance_version: ConformanceVersionKHR,
|
pub conformance_version: ConformanceVersionKHR,
|
||||||
}
|
}
|
||||||
impl fmt::Debug for PhysicalDeviceDriverPropertiesKHR {
|
impl fmt::Debug for PhysicalDeviceDriverPropertiesKHR {
|
||||||
|
@ -21806,14 +21806,14 @@ impl<'a> PhysicalDeviceDriverPropertiesKHRBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn driver_name(
|
pub fn driver_name(
|
||||||
mut self,
|
mut self,
|
||||||
driver_name: &[c_char; MAX_DRIVER_NAME_SIZE_KHR],
|
driver_name: [c_char; MAX_DRIVER_NAME_SIZE_KHR],
|
||||||
) -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> {
|
) -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> {
|
||||||
self.inner.driver_name = driver_name;
|
self.inner.driver_name = driver_name;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn driver_info(
|
pub fn driver_info(
|
||||||
mut self,
|
mut self,
|
||||||
driver_info: &[c_char; MAX_DRIVER_INFO_SIZE_KHR],
|
driver_info: [c_char; MAX_DRIVER_INFO_SIZE_KHR],
|
||||||
) -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> {
|
) -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> {
|
||||||
self.inner.driver_info = driver_info;
|
self.inner.driver_info = driver_info;
|
||||||
self
|
self
|
||||||
|
@ -22370,9 +22370,9 @@ impl<'a> ExternalBufferPropertiesBuilder<'a> {
|
||||||
pub struct PhysicalDeviceIDProperties {
|
pub struct PhysicalDeviceIDProperties {
|
||||||
pub s_type: StructureType,
|
pub s_type: StructureType,
|
||||||
pub p_next: *mut c_void,
|
pub p_next: *mut c_void,
|
||||||
pub device_uuid: &[u8; UUID_SIZE],
|
pub device_uuid: [u8; UUID_SIZE],
|
||||||
pub driver_uuid: &[u8; UUID_SIZE],
|
pub driver_uuid: [u8; UUID_SIZE],
|
||||||
pub device_luid: &[u8; LUID_SIZE],
|
pub device_luid: [u8; LUID_SIZE],
|
||||||
pub device_node_mask: u32,
|
pub device_node_mask: u32,
|
||||||
pub device_luid_valid: Bool32,
|
pub device_luid_valid: Bool32,
|
||||||
}
|
}
|
||||||
|
@ -22418,21 +22418,21 @@ impl<'a> ::std::ops::DerefMut for PhysicalDeviceIDPropertiesBuilder<'a> {
|
||||||
impl<'a> PhysicalDeviceIDPropertiesBuilder<'a> {
|
impl<'a> PhysicalDeviceIDPropertiesBuilder<'a> {
|
||||||
pub fn device_uuid(
|
pub fn device_uuid(
|
||||||
mut self,
|
mut self,
|
||||||
device_uuid: &[u8; UUID_SIZE],
|
device_uuid: [u8; UUID_SIZE],
|
||||||
) -> PhysicalDeviceIDPropertiesBuilder<'a> {
|
) -> PhysicalDeviceIDPropertiesBuilder<'a> {
|
||||||
self.inner.device_uuid = device_uuid;
|
self.inner.device_uuid = device_uuid;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn driver_uuid(
|
pub fn driver_uuid(
|
||||||
mut self,
|
mut self,
|
||||||
driver_uuid: &[u8; UUID_SIZE],
|
driver_uuid: [u8; UUID_SIZE],
|
||||||
) -> PhysicalDeviceIDPropertiesBuilder<'a> {
|
) -> PhysicalDeviceIDPropertiesBuilder<'a> {
|
||||||
self.inner.driver_uuid = driver_uuid;
|
self.inner.driver_uuid = driver_uuid;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn device_luid(
|
pub fn device_luid(
|
||||||
mut self,
|
mut self,
|
||||||
device_luid: &[u8; LUID_SIZE],
|
device_luid: [u8; LUID_SIZE],
|
||||||
) -> PhysicalDeviceIDPropertiesBuilder<'a> {
|
) -> PhysicalDeviceIDPropertiesBuilder<'a> {
|
||||||
self.inner.device_luid = device_luid;
|
self.inner.device_luid = device_luid;
|
||||||
self
|
self
|
||||||
|
@ -25130,7 +25130,7 @@ pub struct PhysicalDeviceGroupProperties {
|
||||||
pub s_type: StructureType,
|
pub s_type: StructureType,
|
||||||
pub p_next: *mut c_void,
|
pub p_next: *mut c_void,
|
||||||
pub physical_device_count: u32,
|
pub physical_device_count: u32,
|
||||||
pub physical_devices: &[PhysicalDevice; MAX_DEVICE_GROUP_SIZE],
|
pub physical_devices: [PhysicalDevice; MAX_DEVICE_GROUP_SIZE],
|
||||||
pub subset_allocation: Bool32,
|
pub subset_allocation: Bool32,
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for PhysicalDeviceGroupProperties {
|
impl ::std::default::Default for PhysicalDeviceGroupProperties {
|
||||||
|
@ -25179,7 +25179,7 @@ impl<'a> PhysicalDeviceGroupPropertiesBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn physical_devices(
|
pub fn physical_devices(
|
||||||
mut self,
|
mut self,
|
||||||
physical_devices: &[PhysicalDevice; MAX_DEVICE_GROUP_SIZE],
|
physical_devices: [PhysicalDevice; MAX_DEVICE_GROUP_SIZE],
|
||||||
) -> PhysicalDeviceGroupPropertiesBuilder<'a> {
|
) -> PhysicalDeviceGroupPropertiesBuilder<'a> {
|
||||||
self.inner.physical_devices = physical_devices;
|
self.inner.physical_devices = physical_devices;
|
||||||
self
|
self
|
||||||
|
@ -25816,7 +25816,7 @@ impl<'a> DeviceGroupBindSparseInfoBuilder<'a> {
|
||||||
pub struct DeviceGroupPresentCapabilitiesKHR {
|
pub struct DeviceGroupPresentCapabilitiesKHR {
|
||||||
pub s_type: StructureType,
|
pub s_type: StructureType,
|
||||||
pub p_next: *const c_void,
|
pub p_next: *const c_void,
|
||||||
pub present_mask: &[u32; MAX_DEVICE_GROUP_SIZE],
|
pub present_mask: [u32; MAX_DEVICE_GROUP_SIZE],
|
||||||
pub modes: DeviceGroupPresentModeFlagsKHR,
|
pub modes: DeviceGroupPresentModeFlagsKHR,
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for DeviceGroupPresentCapabilitiesKHR {
|
impl ::std::default::Default for DeviceGroupPresentCapabilitiesKHR {
|
||||||
|
@ -25857,7 +25857,7 @@ impl<'a> ::std::ops::DerefMut for DeviceGroupPresentCapabilitiesKHRBuilder<'a> {
|
||||||
impl<'a> DeviceGroupPresentCapabilitiesKHRBuilder<'a> {
|
impl<'a> DeviceGroupPresentCapabilitiesKHRBuilder<'a> {
|
||||||
pub fn present_mask(
|
pub fn present_mask(
|
||||||
mut self,
|
mut self,
|
||||||
present_mask: &[u32; MAX_DEVICE_GROUP_SIZE],
|
present_mask: [u32; MAX_DEVICE_GROUP_SIZE],
|
||||||
) -> DeviceGroupPresentCapabilitiesKHRBuilder<'a> {
|
) -> DeviceGroupPresentCapabilitiesKHRBuilder<'a> {
|
||||||
self.inner.present_mask = present_mask;
|
self.inner.present_mask = present_mask;
|
||||||
self
|
self
|
||||||
|
@ -30219,7 +30219,7 @@ pub struct PhysicalDeviceSampleLocationsPropertiesEXT {
|
||||||
pub p_next: *mut c_void,
|
pub p_next: *mut c_void,
|
||||||
pub sample_location_sample_counts: SampleCountFlags,
|
pub sample_location_sample_counts: SampleCountFlags,
|
||||||
pub max_sample_location_grid_size: Extent2D,
|
pub max_sample_location_grid_size: Extent2D,
|
||||||
pub sample_location_coordinate_range: &[f32; 2],
|
pub sample_location_coordinate_range: [f32; 2],
|
||||||
pub sample_location_sub_pixel_bits: u32,
|
pub sample_location_sub_pixel_bits: u32,
|
||||||
pub variable_sample_locations: Bool32,
|
pub variable_sample_locations: Bool32,
|
||||||
}
|
}
|
||||||
|
@ -30282,7 +30282,7 @@ impl<'a> PhysicalDeviceSampleLocationsPropertiesEXTBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn sample_location_coordinate_range(
|
pub fn sample_location_coordinate_range(
|
||||||
mut self,
|
mut self,
|
||||||
sample_location_coordinate_range: &[f32; 2],
|
sample_location_coordinate_range: [f32; 2],
|
||||||
) -> PhysicalDeviceSampleLocationsPropertiesEXTBuilder<'a> {
|
) -> PhysicalDeviceSampleLocationsPropertiesEXTBuilder<'a> {
|
||||||
self.inner.sample_location_coordinate_range = sample_location_coordinate_range;
|
self.inner.sample_location_coordinate_range = sample_location_coordinate_range;
|
||||||
self
|
self
|
||||||
|
@ -31839,7 +31839,7 @@ pub struct ShaderStatisticsInfoAMD {
|
||||||
pub num_physical_sgprs: u32,
|
pub num_physical_sgprs: u32,
|
||||||
pub num_available_vgprs: u32,
|
pub num_available_vgprs: u32,
|
||||||
pub num_available_sgprs: u32,
|
pub num_available_sgprs: u32,
|
||||||
pub compute_work_group_size: &[u32; 3],
|
pub compute_work_group_size: [u32; 3],
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for ShaderStatisticsInfoAMD {
|
impl ::std::default::Default for ShaderStatisticsInfoAMD {
|
||||||
fn default() -> ShaderStatisticsInfoAMD {
|
fn default() -> ShaderStatisticsInfoAMD {
|
||||||
|
@ -31923,7 +31923,7 @@ impl<'a> ShaderStatisticsInfoAMDBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn compute_work_group_size(
|
pub fn compute_work_group_size(
|
||||||
mut self,
|
mut self,
|
||||||
compute_work_group_size: &[u32; 3],
|
compute_work_group_size: [u32; 3],
|
||||||
) -> ShaderStatisticsInfoAMDBuilder<'a> {
|
) -> ShaderStatisticsInfoAMDBuilder<'a> {
|
||||||
self.inner.compute_work_group_size = compute_work_group_size;
|
self.inner.compute_work_group_size = compute_work_group_size;
|
||||||
self
|
self
|
||||||
|
@ -32165,7 +32165,7 @@ pub struct DebugUtilsLabelEXT {
|
||||||
pub s_type: StructureType,
|
pub s_type: StructureType,
|
||||||
pub p_next: *const c_void,
|
pub p_next: *const c_void,
|
||||||
pub p_label_name: *const c_char,
|
pub p_label_name: *const c_char,
|
||||||
pub color: &[f32; 4],
|
pub color: [f32; 4],
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for DebugUtilsLabelEXT {
|
impl ::std::default::Default for DebugUtilsLabelEXT {
|
||||||
fn default() -> DebugUtilsLabelEXT {
|
fn default() -> DebugUtilsLabelEXT {
|
||||||
|
@ -32207,7 +32207,7 @@ impl<'a> DebugUtilsLabelEXTBuilder<'a> {
|
||||||
self.inner.p_label_name = label_name.as_ptr();
|
self.inner.p_label_name = label_name.as_ptr();
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn color(mut self, color: &[f32; 4]) -> DebugUtilsLabelEXTBuilder<'a> {
|
pub fn color(mut self, color: [f32; 4]) -> DebugUtilsLabelEXTBuilder<'a> {
|
||||||
self.inner.color = color;
|
self.inner.color = color;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -37274,11 +37274,11 @@ pub struct PhysicalDeviceMeshShaderPropertiesNV {
|
||||||
pub p_next: *mut c_void,
|
pub p_next: *mut c_void,
|
||||||
pub max_draw_mesh_tasks_count: u32,
|
pub max_draw_mesh_tasks_count: u32,
|
||||||
pub max_task_work_group_invocations: u32,
|
pub max_task_work_group_invocations: u32,
|
||||||
pub max_task_work_group_size: &[u32; 3],
|
pub max_task_work_group_size: [u32; 3],
|
||||||
pub max_task_total_memory_size: u32,
|
pub max_task_total_memory_size: u32,
|
||||||
pub max_task_output_count: u32,
|
pub max_task_output_count: u32,
|
||||||
pub max_mesh_work_group_invocations: u32,
|
pub max_mesh_work_group_invocations: u32,
|
||||||
pub max_mesh_work_group_size: &[u32; 3],
|
pub max_mesh_work_group_size: [u32; 3],
|
||||||
pub max_mesh_total_memory_size: u32,
|
pub max_mesh_total_memory_size: u32,
|
||||||
pub max_mesh_output_vertices: u32,
|
pub max_mesh_output_vertices: u32,
|
||||||
pub max_mesh_output_primitives: u32,
|
pub max_mesh_output_primitives: u32,
|
||||||
|
@ -37350,7 +37350,7 @@ impl<'a> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn max_task_work_group_size(
|
pub fn max_task_work_group_size(
|
||||||
mut self,
|
mut self,
|
||||||
max_task_work_group_size: &[u32; 3],
|
max_task_work_group_size: [u32; 3],
|
||||||
) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> {
|
) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> {
|
||||||
self.inner.max_task_work_group_size = max_task_work_group_size;
|
self.inner.max_task_work_group_size = max_task_work_group_size;
|
||||||
self
|
self
|
||||||
|
@ -37378,7 +37378,7 @@ impl<'a> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> {
|
||||||
}
|
}
|
||||||
pub fn max_mesh_work_group_size(
|
pub fn max_mesh_work_group_size(
|
||||||
mut self,
|
mut self,
|
||||||
max_mesh_work_group_size: &[u32; 3],
|
max_mesh_work_group_size: [u32; 3],
|
||||||
) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> {
|
) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> {
|
||||||
self.inner.max_mesh_work_group_size = max_mesh_work_group_size;
|
self.inner.max_mesh_work_group_size = max_mesh_work_group_size;
|
||||||
self
|
self
|
||||||
|
@ -39322,8 +39322,8 @@ impl<'a> PhysicalDeviceScalarBlockLayoutFeaturesEXTBuilder<'a> {
|
||||||
pub struct PhysicalDeviceMemoryBudgetPropertiesEXT {
|
pub struct PhysicalDeviceMemoryBudgetPropertiesEXT {
|
||||||
pub s_type: StructureType,
|
pub s_type: StructureType,
|
||||||
pub p_next: *mut c_void,
|
pub p_next: *mut c_void,
|
||||||
pub heap_budget: &[DeviceSize; MAX_MEMORY_HEAPS],
|
pub heap_budget: [DeviceSize; MAX_MEMORY_HEAPS],
|
||||||
pub heap_usage: &[DeviceSize; MAX_MEMORY_HEAPS],
|
pub heap_usage: [DeviceSize; MAX_MEMORY_HEAPS],
|
||||||
}
|
}
|
||||||
impl ::std::default::Default for PhysicalDeviceMemoryBudgetPropertiesEXT {
|
impl ::std::default::Default for PhysicalDeviceMemoryBudgetPropertiesEXT {
|
||||||
fn default() -> PhysicalDeviceMemoryBudgetPropertiesEXT {
|
fn default() -> PhysicalDeviceMemoryBudgetPropertiesEXT {
|
||||||
|
@ -39367,14 +39367,14 @@ impl<'a> ::std::ops::DerefMut for PhysicalDeviceMemoryBudgetPropertiesEXTBuilder
|
||||||
impl<'a> PhysicalDeviceMemoryBudgetPropertiesEXTBuilder<'a> {
|
impl<'a> PhysicalDeviceMemoryBudgetPropertiesEXTBuilder<'a> {
|
||||||
pub fn heap_budget(
|
pub fn heap_budget(
|
||||||
mut self,
|
mut self,
|
||||||
heap_budget: &[DeviceSize; MAX_MEMORY_HEAPS],
|
heap_budget: [DeviceSize; MAX_MEMORY_HEAPS],
|
||||||
) -> PhysicalDeviceMemoryBudgetPropertiesEXTBuilder<'a> {
|
) -> PhysicalDeviceMemoryBudgetPropertiesEXTBuilder<'a> {
|
||||||
self.inner.heap_budget = heap_budget;
|
self.inner.heap_budget = heap_budget;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn heap_usage(
|
pub fn heap_usage(
|
||||||
mut self,
|
mut self,
|
||||||
heap_usage: &[DeviceSize; MAX_MEMORY_HEAPS],
|
heap_usage: [DeviceSize; MAX_MEMORY_HEAPS],
|
||||||
) -> PhysicalDeviceMemoryBudgetPropertiesEXTBuilder<'a> {
|
) -> PhysicalDeviceMemoryBudgetPropertiesEXTBuilder<'a> {
|
||||||
self.inner.heap_usage = heap_usage;
|
self.inner.heap_usage = heap_usage;
|
||||||
self
|
self
|
||||||
|
|
|
@ -562,8 +562,10 @@ pub trait FieldExt {
|
||||||
/// keywords
|
/// keywords
|
||||||
fn param_ident(&self) -> Ident;
|
fn param_ident(&self) -> Ident;
|
||||||
|
|
||||||
/// Returns the basetype ident and removes the 'Vk' prefix
|
/// Returns the basetype ident and removes the 'Vk' prefix. When `is_ffi_param` is `true`
|
||||||
fn type_tokens(&self) -> Tokens;
|
/// array types (e.g. `[f32; 3]`) will be converted to pointer types (e.g. `&[f32; 3]`),
|
||||||
|
/// which is needed for `C` function parameters. Set to `false` for struct definitions.
|
||||||
|
fn type_tokens(&self, is_ffi_param: bool) -> Tokens;
|
||||||
fn is_clone(&self) -> bool;
|
fn is_clone(&self) -> bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,7 +643,7 @@ impl FieldExt for vkxml::Field {
|
||||||
Ident::from(name_corrected.to_snake_case().as_str())
|
Ident::from(name_corrected.to_snake_case().as_str())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn type_tokens(&self) -> Tokens {
|
fn type_tokens(&self, is_ffi_param: bool) -> Tokens {
|
||||||
let ty = name_to_tokens(&self.basetype);
|
let ty = name_to_tokens(&self.basetype);
|
||||||
let pointer = self
|
let pointer = self
|
||||||
.reference
|
.reference
|
||||||
|
@ -662,9 +664,16 @@ impl FieldExt for vkxml::Field {
|
||||||
// used inside the static array
|
// used inside the static array
|
||||||
let size = constant_name(size);
|
let size = constant_name(size);
|
||||||
let size = Term::intern(&size);
|
let size = Term::intern(&size);
|
||||||
|
// arrays in c are always passed as a pointer
|
||||||
|
if is_ffi_param {
|
||||||
Some(quote! {
|
Some(quote! {
|
||||||
&[#ty; #size]
|
&[#ty; #size]
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
Some(quote! {
|
||||||
|
[#ty; #size]
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
|
@ -713,7 +722,7 @@ fn generate_function_pointers<'a>(
|
||||||
.iter()
|
.iter()
|
||||||
.map(|field| {
|
.map(|field| {
|
||||||
let name = field.param_ident();
|
let name = field.param_ident();
|
||||||
let ty = field.type_tokens();
|
let ty = field.type_tokens(true);
|
||||||
(name, ty)
|
(name, ty)
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
@ -758,7 +767,7 @@ fn generate_function_pointers<'a>(
|
||||||
|
|
||||||
let return_types: Vec<_> = commands
|
let return_types: Vec<_> = commands
|
||||||
.iter()
|
.iter()
|
||||||
.map(|cmd| cmd.return_type.type_tokens())
|
.map(|cmd| cmd.return_type.type_tokens(true))
|
||||||
.collect();
|
.collect();
|
||||||
let return_types_ref = &return_types;
|
let return_types_ref = &return_types;
|
||||||
|
|
||||||
|
@ -776,7 +785,7 @@ fn generate_function_pointers<'a>(
|
||||||
.iter()
|
.iter()
|
||||||
.map(|field| {
|
.map(|field| {
|
||||||
let name = field.param_ident();
|
let name = field.param_ident();
|
||||||
let ty = field.type_tokens();
|
let ty = field.type_tokens(true);
|
||||||
quote! { #name: #ty }
|
quote! { #name: #ty }
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
@ -787,7 +796,7 @@ fn generate_function_pointers<'a>(
|
||||||
|
|
||||||
let pfn_return_types: Vec<_> = pfn_commands
|
let pfn_return_types: Vec<_> = pfn_commands
|
||||||
.iter()
|
.iter()
|
||||||
.map(|cmd| cmd.return_type.type_tokens())
|
.map(|cmd| cmd.return_type.type_tokens(true))
|
||||||
.collect();
|
.collect();
|
||||||
let pfn_return_types_ref = &pfn_return_types;
|
let pfn_return_types_ref = &pfn_return_types;
|
||||||
|
|
||||||
|
@ -1300,7 +1309,7 @@ pub fn derive_default(_struct: &vkxml::Struct) -> Option<Tokens> {
|
||||||
#param_ident: unsafe { ::std::mem::zeroed() }
|
#param_ident: unsafe { ::std::mem::zeroed() }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let ty = field.type_tokens();
|
let ty = field.type_tokens(false);
|
||||||
quote! {
|
quote! {
|
||||||
#param_ident: #ty::default()
|
#param_ident: #ty::default()
|
||||||
}
|
}
|
||||||
|
@ -1399,7 +1408,7 @@ pub fn derive_setters(
|
||||||
.find(|field| field.param_ident().to_string() == "p_next")
|
.find(|field| field.param_ident().to_string() == "p_next")
|
||||||
{
|
{
|
||||||
Some(p_next) => {
|
Some(p_next) => {
|
||||||
if p_next.type_tokens().to_string().starts_with("*const") {
|
if p_next.type_tokens(false).to_string().starts_with("*const") {
|
||||||
(true, true)
|
(true, true)
|
||||||
} else {
|
} else {
|
||||||
(true, false)
|
(true, false)
|
||||||
|
@ -1442,7 +1451,7 @@ pub fn derive_setters(
|
||||||
|
|
||||||
let setters = members.clone().filter_map(|field| {
|
let setters = members.clone().filter_map(|field| {
|
||||||
let param_ident = field.param_ident();
|
let param_ident = field.param_ident();
|
||||||
let param_ty_tokens = field.type_tokens();
|
let param_ty_tokens = field.type_tokens(false);
|
||||||
let param_ty_string = param_ty_tokens.to_string();
|
let param_ty_string = param_ty_tokens.to_string();
|
||||||
|
|
||||||
let param_ident_string = param_ident.to_string();
|
let param_ident_string = param_ident.to_string();
|
||||||
|
@ -1718,7 +1727,7 @@ pub fn generate_struct(
|
||||||
|
|
||||||
let params = members.clone().map(|field| {
|
let params = members.clone().map(|field| {
|
||||||
let param_ident = field.param_ident();
|
let param_ident = field.param_ident();
|
||||||
let param_ty_tokens = field.type_tokens();
|
let param_ty_tokens = field.type_tokens(false);
|
||||||
quote! {pub #param_ident: #param_ty_tokens}
|
quote! {pub #param_ident: #param_ty_tokens}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1774,10 +1783,10 @@ pub fn generate_handle(handle: &vkxml::Handle) -> Option<Tokens> {
|
||||||
}
|
}
|
||||||
fn generate_funcptr(fnptr: &vkxml::FunctionPointer) -> Tokens {
|
fn generate_funcptr(fnptr: &vkxml::FunctionPointer) -> Tokens {
|
||||||
let name = Ident::from(fnptr.name.as_str());
|
let name = Ident::from(fnptr.name.as_str());
|
||||||
let ret_ty_tokens = fnptr.return_type.type_tokens();
|
let ret_ty_tokens = fnptr.return_type.type_tokens(true);
|
||||||
let params = fnptr.param.iter().map(|field| {
|
let params = fnptr.param.iter().map(|field| {
|
||||||
let ident = field.param_ident();
|
let ident = field.param_ident();
|
||||||
let type_tokens = field.type_tokens();
|
let type_tokens = field.type_tokens(true);
|
||||||
quote! {
|
quote! {
|
||||||
#ident: #type_tokens
|
#ident: #type_tokens
|
||||||
}
|
}
|
||||||
|
@ -1792,7 +1801,7 @@ fn generate_union(union: &vkxml::Union) -> Tokens {
|
||||||
let name = to_type_tokens(&union.name, None);
|
let name = to_type_tokens(&union.name, None);
|
||||||
let fields = union.elements.iter().map(|field| {
|
let fields = union.elements.iter().map(|field| {
|
||||||
let name = field.param_ident();
|
let name = field.param_ident();
|
||||||
let ty = field.type_tokens();
|
let ty = field.type_tokens(false);
|
||||||
quote! {
|
quote! {
|
||||||
pub #name: #ty
|
pub #name: #ty
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue