upgrade to vulkan 1.1 (#1258)

This commit is contained in:
Austin Johnson 2019-10-27 17:27:08 -05:00 committed by GitHub
parent db8f699c5c
commit 212c5f6622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -12,6 +12,7 @@
- Update dependencies: lazy_static, half, syn, quote & proc-macro2
- Swapchain can now be recreated with dimensions of corresponding surface using `recreate()`.
- Add support for GLSL macro defines to the `shader!` macro.
- Switch to Vulkan 1.1 and inherently SpirV 1.3 (shaderc default version for vulkan 1.1)
# Version 0.14.0 (2019-08-17)

View File

@ -12,7 +12,7 @@ use std::path::Path;
use syn::Ident;
use proc_macro2::{Span, TokenStream};
use shaderc::{Compiler, CompileOptions};
use shaderc::{Compiler, CompileOptions, TargetEnv};
pub use shaderc::{CompilationArtifact, ShaderKind, IncludeType, ResolvedInclude};
pub use crate::parse::ParseError;
@ -114,6 +114,8 @@ pub fn compile(path: Option<String>, base_path: &impl AsRef<Path>, code: &str, t
let mut compiler = Compiler::new().ok_or("failed to create GLSL compiler")?;
let mut compile_options = CompileOptions::new()
.ok_or("failed to initialize compile option")?;
const ENV_VULKAN_VERSION: u32 = ((1 << 22) | (1 << 12));
compile_options.set_target_env(TargetEnv::Vulkan, ENV_VULKAN_VERSION);
let root_source_path = if let &Some(ref path) = &path {
path
} else {

View File

@ -222,7 +222,7 @@ impl Instance {
.unwrap_or(0),
apiVersion: Version {
major: 1,
minor: 0,
minor: 1,
patch: 0,
}.into_vulkan_version(), // TODO:
})