mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +00:00
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:
parent
3959fb5135
commit
3bb1f125df
@ -262,6 +262,7 @@ pub(super) fn reflect(
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use shaderc::SpirvVersion;
|
||||||
use vulkano::shader::reflect;
|
use vulkano::shader::reflect;
|
||||||
|
|
||||||
fn convert_paths(root_path: &Path, paths: &[PathBuf]) -> Vec<String> {
|
fn convert_paths(root_path: &Path, paths: &[PathBuf]) -> Vec<String> {
|
||||||
@ -579,11 +580,15 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn descriptor_calculation_with_multiple_functions() {
|
fn descriptor_calculation_with_multiple_functions() {
|
||||||
let (comp, _) = compile(
|
let (comp, _) = compile(
|
||||||
&MacroInput::empty(),
|
&MacroInput {
|
||||||
|
spirv_version: Some(SpirvVersion::V1_6),
|
||||||
|
vulkan_version: Some(EnvVersion::Vulkan1_3),
|
||||||
|
..MacroInput::empty()
|
||||||
|
},
|
||||||
None,
|
None,
|
||||||
Path::new(""),
|
Path::new(""),
|
||||||
r#"
|
r#"
|
||||||
#version 450
|
#version 460
|
||||||
|
|
||||||
layout(set = 1, binding = 0) buffer Buffer {
|
layout(set = 1, binding = 0) buffer Buffer {
|
||||||
vec3 data;
|
vec3 data;
|
||||||
|
@ -618,7 +618,8 @@ impl Parse for MacroInput {
|
|||||||
"1.0" => EnvVersion::Vulkan1_0,
|
"1.0" => EnvVersion::Vulkan1_0,
|
||||||
"1.1" => EnvVersion::Vulkan1_1,
|
"1.1" => EnvVersion::Vulkan1_1,
|
||||||
"1.2" => EnvVersion::Vulkan1_2,
|
"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" => {
|
"spirv_version" => {
|
||||||
|
Loading…
Reference in New Issue
Block a user