Up vk version in shader compilation (#2467)

* Up vk version in shader compilation

* Update test in codegen.rs

* cargo +nightly fmt

* Update lib.rs

* clippy + fmt fixes

* simplify changes

* post merge
This commit is contained in:
maratik123 2024-02-15 21:55:56 +03:00 committed by GitHub
parent 3959fb5135
commit 3bb1f125df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -262,6 +262,7 @@ pub(super) fn reflect(
#[cfg(test)]
mod tests {
use super::*;
use shaderc::SpirvVersion;
use vulkano::shader::reflect;
fn convert_paths(root_path: &Path, paths: &[PathBuf]) -> Vec<String> {
@ -579,11 +580,15 @@ mod tests {
#[test]
fn descriptor_calculation_with_multiple_functions() {
let (comp, _) = compile(
&MacroInput::empty(),
&MacroInput {
spirv_version: Some(SpirvVersion::V1_6),
vulkan_version: Some(EnvVersion::Vulkan1_3),
..MacroInput::empty()
},
None,
Path::new(""),
r#"
#version 450
#version 460
layout(set = 1, binding = 0) buffer Buffer {
vec3 data;

View File

@ -618,7 +618,8 @@ impl Parse for MacroInput {
"1.0" => EnvVersion::Vulkan1_0,
"1.1" => EnvVersion::Vulkan1_1,
"1.2" => EnvVersion::Vulkan1_2,
ver => bail!(lit, "expected `1.0`, `1.1` or `1.2`, found `{ver}`"),
"1.3" => EnvVersion::Vulkan1_3,
ver => bail!(lit, "expected `1.0`, `1.1`, `1.2` or `1.3`, found `{ver}`"),
});
}
"spirv_version" => {