Update to 2018 edition
This commit is contained in:
parent
19771a8200
commit
284043b605
|
@ -8,6 +8,7 @@ repository = "https://github.com/MaikKlein/ash"
|
|||
readme = "../README.md"
|
||||
keywords = ["vulkan", "graphic"]
|
||||
documentation = "https://docs.rs/ash"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
shared_library = "0.1.9"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::mem;
|
||||
use std::os::raw::c_void;
|
||||
use std::ptr;
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
pub trait DeviceV1_1: DeviceV1_0 {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use instance::Instance;
|
||||
use prelude::*;
|
||||
use crate::instance::Instance;
|
||||
use crate::prelude::*;
|
||||
use shared_library::dynamic_library::DynamicLibrary;
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
|
@ -9,8 +9,8 @@ use std::os::raw::c_void;
|
|||
use std::path::Path;
|
||||
use std::ptr;
|
||||
use std::sync::Arc;
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[cfg(windows)]
|
||||
const LIB_PATH: &'static str = "vulkan-1.dll";
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
use std::fmt;
|
||||
use std::os::raw::*;
|
||||
use vk::*;
|
||||
use crate::vk::*;
|
||||
|
||||
// Extension: `VK_AMD_gpa_interface`
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{DeviceV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use crate::version::{DeviceV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct DebugMarker {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct DebugReport {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use {vk, RawPtr};
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::{vk, RawPtr};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct DebugUtils {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct AndroidSurface {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{DeviceV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{DeviceV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct DisplaySwapchain {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Surface {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use version::{DeviceV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{DeviceV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Swapchain {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct WaylandSurface {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Win32Surface {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct XcbSurface {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct XlibSurface {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct IOSSurface {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{EntryV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{EntryV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct MacOSSurface {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#![allow(dead_code)]
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{DeviceV1_0, InstanceV1_0};
|
||||
use vk;
|
||||
use crate::version::{DeviceV1_0, InstanceV1_0};
|
||||
use crate::vk;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct MeshShader {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(dead_code)]
|
||||
use prelude::*;
|
||||
use crate::prelude::*;
|
||||
use std::ffi::CStr;
|
||||
use std::mem;
|
||||
use version::{DeviceV1_0, InstanceV1_0, InstanceV1_1};
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::version::{DeviceV1_0, InstanceV1_0, InstanceV1_1};
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct RayTracing {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#![allow(dead_code)]
|
||||
use device::Device;
|
||||
use prelude::*;
|
||||
use crate::device::Device;
|
||||
use crate::prelude::*;
|
||||
use std::mem;
|
||||
use std::os::raw::c_char;
|
||||
use std::ptr;
|
||||
use vk;
|
||||
use RawPtr;
|
||||
use crate::vk;
|
||||
use crate::RawPtr;
|
||||
|
||||
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkInstance.html>"]
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
|
||||
extern crate shared_library;
|
||||
|
||||
pub use device::Device;
|
||||
pub use entry::{Entry, EntryCustom, InstanceError, LoadingError};
|
||||
pub use instance::Instance;
|
||||
pub use crate::device::Device;
|
||||
pub use crate::entry::{Entry, EntryCustom, InstanceError, LoadingError};
|
||||
pub use crate::instance::Instance;
|
||||
|
||||
mod device;
|
||||
mod entry;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
use vk;
|
||||
use crate::vk;
|
||||
pub type VkResult<T> = Result<T, vk::Result>;
|
||||
|
|
|
@ -3,7 +3,7 @@ use std::marker::PhantomData;
|
|||
use std::mem::size_of;
|
||||
use std::os::raw::c_void;
|
||||
use std::{io, slice};
|
||||
use vk;
|
||||
use crate::vk;
|
||||
|
||||
/// `Align` handles dynamic alignment. The is useful for dynamic uniform buffers where
|
||||
/// the alignment might be different. For example a 4x4 f32 matrix has a size of 64 bytes
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
pub use device::{DeviceV1_0, DeviceV1_1};
|
||||
pub use entry::{EntryV1_0, EntryV1_1};
|
||||
pub use instance::{InstanceV1_0, InstanceV1_1};
|
||||
pub use crate::device::{DeviceV1_0, DeviceV1_1};
|
||||
pub use crate::entry::{EntryV1_0, EntryV1_1};
|
||||
pub use crate::instance::{InstanceV1_0, InstanceV1_1};
|
||||
|
|
|
@ -18,7 +18,7 @@ pub(crate) unsafe fn ptr_chain_iter<T>(ptr: &mut T) -> impl Iterator<Item = *mut
|
|||
pub trait Handle {
|
||||
const TYPE: ObjectType;
|
||||
fn as_raw(self) -> u64;
|
||||
fn from_raw(u64) -> Self;
|
||||
fn from_raw(_: u64) -> Self;
|
||||
}
|
||||
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VK_MAKE_VERSION.html>"]
|
||||
#[macro_export]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
name = "generator"
|
||||
version = "0.1.0"
|
||||
authors = ["Maik Klein <maikklein@googlemail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
vk-parse = "0.2"
|
||||
|
|
|
@ -1432,7 +1432,7 @@ pub fn derive_setters(
|
|||
_ => None,
|
||||
});
|
||||
|
||||
let (has_next, is_next_const) = match members
|
||||
let (has_next, _is_next_const) = match members
|
||||
.clone()
|
||||
.find(|field| field.param_ident().to_string() == "p_next")
|
||||
{
|
||||
|
@ -2275,7 +2275,7 @@ pub fn write_source_code(path: &Path) {
|
|||
pub trait Handle {
|
||||
const TYPE: ObjectType;
|
||||
fn as_raw(self) -> u64;
|
||||
fn from_raw(u64) -> Self;
|
||||
fn from_raw(_: u64) -> Self;
|
||||
}
|
||||
|
||||
#version_macros
|
||||
|
|
Loading…
Reference in a new issue