Skip to content

Commit

Permalink
Merge #166
Browse files Browse the repository at this point in the history
166: Update to latest SPIRV-Cross r=grovesNL a=grovesNL

Fixes #165

Co-authored-by: Joshua Groves <josh@joshgroves.com>
  • Loading branch information
bors[bot] and grovesNL committed Jan 20, 2021
2 parents 2ea85a0 + c20655c commit fe5a887
Show file tree
Hide file tree
Showing 12 changed files with 337 additions and 32 deletions.
4 changes: 0 additions & 4 deletions bindings_generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ fn main() {
.to_str()
.unwrap(),
)
.clang_arg("-I/Library/Developer/CommandLineTools/usr/include/c++/v1")
.clang_arg("-I/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include")
.clang_args(["-x", "c++", "-std=c++14"].iter())
.enable_cxx_namespaces()
.whitelist_function("sc_internal.*")
Expand Down Expand Up @@ -45,8 +43,6 @@ fn main() {
.to_str()
.unwrap(),
)
.clang_arg("-I/Library/Developer/CommandLineTools/usr/include/c++/v1")
.clang_arg("-I/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include")
.clang_args(["-x", "c++", "-std=c++14"].iter())
.enable_cxx_namespaces()
.whitelist_type("spv::.*")
Expand Down
1 change: 1 addition & 0 deletions examples/src/msl/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fn main() {
buffer_id: 5,
texture_id: 6,
sampler_id: 7,
count: 0,
},
);

Expand Down
2 changes: 1 addition & 1 deletion spirv_cross/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spirv_cross"
version = "0.22.2"
version = "0.23.0"
authors = ["Joshua Groves <josh@joshgroves.com>"]
description = "Safe wrapper around SPIRV-Cross"
license = "MIT/Apache-2.0"
Expand Down
175 changes: 163 additions & 12 deletions spirv_cross/src/bindings_native.rs

Large diffs are not rendered by default.

174 changes: 162 additions & 12 deletions spirv_cross/src/bindings_wasm.rs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions spirv_cross/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ impl spirv::Type {
B::ControlPointArray => ControlPointArray,
B::AccelerationStructure => AccelerationStructure,
B::RayQuery => RayQuery,
B::Interpolant => Interpolant,
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions spirv_cross/src/msl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub struct ResourceBinding {
pub buffer_id: u32,
pub texture_id: u32,
pub sampler_id: u32,
pub count: u32,
}

/// Location of a sampler binding to override
Expand Down Expand Up @@ -439,6 +440,7 @@ impl spirv::Compile<Target> for spirv::Ast<Target> {
msl_buffer: res.buffer_id,
msl_texture: res.texture_id,
msl_sampler: res.sampler_id,
count: res.count,
}
}),
);
Expand Down
2 changes: 2 additions & 0 deletions spirv_cross/src/spirv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ pub struct ShaderResources {
}

#[derive(Debug, Clone)]
#[non_exhaustive]
pub enum Type {
// TODO: Add missing fields to relevant variants from SPIRType
Unknown,
Expand Down Expand Up @@ -422,6 +423,7 @@ pub enum Type {
ControlPointArray,
AccelerationStructure,
RayQuery,
Interpolant,
}

/// A SPIR-V shader module.
Expand Down
2 changes: 2 additions & 0 deletions spirv_cross/tests/msl_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn ast_compiles_to_msl() {
buffer_id: 5,
texture_id: 6,
sampler_id: 7,
count: 0,
},
);

Expand Down Expand Up @@ -263,6 +264,7 @@ fn sets_argument_buffer_index() {
buffer_id: 2,
texture_id: 0,
sampler_id: 0,
count: 0,
},
);
let mut compiler_options = msl::CompilerOptions::default();
Expand Down
4 changes: 2 additions & 2 deletions wasm/spirv_cross_wrapper_glsl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified wasm/spirv_cross_wrapper_glsl.wasm
Binary file not shown.

0 comments on commit fe5a887

Please sign in to comment.