mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2025-02-16 08:54:56 +00:00
Renamed spirv-types to spirv-std-types (#904)
This commit is contained in:
parent
e1696a4cbd
commit
f41625d70a
12
Cargo.lock
generated
12
Cargo.lock
generated
@ -2245,7 +2245,7 @@ dependencies = [
|
||||
"glam",
|
||||
"num-traits",
|
||||
"spirv-std-macros",
|
||||
"spirv-types",
|
||||
"spirv-std-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2254,10 +2254,14 @@ version = "0.4.0-alpha.13"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"spirv-types",
|
||||
"spirv-std-types",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spirv-std-types"
|
||||
version = "0.4.0-alpha.13"
|
||||
|
||||
[[package]]
|
||||
name = "spirv-tools"
|
||||
version = "0.8.0"
|
||||
@ -2278,10 +2282,6 @@ dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spirv-types"
|
||||
version = "0.4.0-alpha.13"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.8.0"
|
||||
|
@ -10,7 +10,7 @@ description = "Standard functions and types for SPIR-V"
|
||||
[dependencies]
|
||||
bitflags = "1.2.1"
|
||||
num-traits = { version = "0.2.14", default-features = false, features = ["libm"] }
|
||||
spirv-types = { path = "./shared", version = "0.4.0-alpha.13" }
|
||||
spirv-std-types = { path = "./shared", version = "0.4.0-alpha.13" }
|
||||
spirv-std-macros = { path = "./macros", version = "0.4.0-alpha.13" }
|
||||
glam = { version = ">=0.17, <=0.21", default-features = false, features = ["libm"], optional = true }
|
||||
|
||||
|
@ -11,7 +11,7 @@ description = "Macros for spirv-std"
|
||||
proc-macro = true
|
||||
|
||||
[dependencies]
|
||||
spirv-types = { path = "../shared", version = "0.4.0-alpha.13" }
|
||||
spirv-std-types = { path = "../shared", version = "0.4.0-alpha.13" }
|
||||
proc-macro2 = "1.0.24"
|
||||
quote = "1.0.8"
|
||||
syn = { version = "1.0.58", features=["full"] }
|
||||
|
@ -1,7 +1,7 @@
|
||||
use proc_macro2::Ident;
|
||||
|
||||
use quote::{quote, TokenStreamExt};
|
||||
use spirv_types::image_params::*;
|
||||
use spirv_std_types::image_params::*;
|
||||
use syn::parse::{Parse, ParseStream};
|
||||
|
||||
use self::params::SampledType;
|
||||
|
@ -121,7 +121,7 @@ use quote::ToTokens;
|
||||
/// - `depth` — Whether it is known that the image is a depth image.
|
||||
/// Accepted values: `true` or `false`. Default: `unknown`.
|
||||
///
|
||||
/// [`ImageFormat`]: spirv_types::image_params::ImageFormat
|
||||
/// [`ImageFormat`]: spirv_std_types::image_params::ImageFormat
|
||||
///
|
||||
/// Keep in mind that `sampled` here is a different concept than the `SampledImage` type:
|
||||
/// `sampled=true` means that this image requires a sampler to be able to access, while the
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "spirv-types"
|
||||
name = "spirv-std-types"
|
||||
description = "SPIR-V types shared between spirv-std and spirv-std-macros"
|
||||
version = "0.4.0-alpha.13"
|
||||
authors = ["Embark <opensource@embark-studios.com>"]
|
||||
|
@ -10,7 +10,7 @@ mod params;
|
||||
|
||||
pub use self::params::{ImageCoordinate, ImageCoordinateSubpassData, SampleType};
|
||||
pub use crate::macros::Image;
|
||||
pub use spirv_types::image_params::{
|
||||
pub use spirv_std_types::image_params::{
|
||||
AccessQualifier, Arrayed, Dimensionality, ImageDepth, ImageFormat, Multisampled, Sampled,
|
||||
};
|
||||
|
||||
|
@ -131,7 +131,7 @@ extern "C" fn rust_eh_personality() {}
|
||||
|
||||
// See: https://github.com/rust-lang/rust/issues/84738
|
||||
#[doc(hidden)]
|
||||
/// [spirv_types]
|
||||
/// [spirv_std_types]
|
||||
pub fn workaround_rustdoc_ice_84738() {}
|
||||
|
||||
#[doc(hidden)]
|
||||
|
@ -260,14 +260,16 @@ fn find_lib(
|
||||
.map(|entry| entry.path())
|
||||
.filter(|path| {
|
||||
let name = {
|
||||
let name = path.file_name();
|
||||
let name = path.file_stem();
|
||||
if name.is_none() {
|
||||
return false;
|
||||
}
|
||||
name.unwrap()
|
||||
};
|
||||
|
||||
let name_matches = name.to_str().unwrap().starts_with(&expected_name);
|
||||
let name_matches = name.to_str().unwrap().starts_with(&expected_name)
|
||||
&& name.len() == expected_name.len() + 17 // we expect our name, '-', and then 16 hexadecimal digits
|
||||
&& ends_with_dash_hash(name.to_str().unwrap());
|
||||
let extension_matches = path
|
||||
.extension()
|
||||
.map_or(false, |ext| ext == expected_extension);
|
||||
@ -283,6 +285,20 @@ fn find_lib(
|
||||
})
|
||||
}
|
||||
|
||||
/// Returns whether this string ends with a dash ('-'), followed by 16 lowercase hexadecimal characters
|
||||
fn ends_with_dash_hash(s: &str) -> bool {
|
||||
let n = s.len();
|
||||
if n < 17 {
|
||||
return false;
|
||||
}
|
||||
let mut bytes = s.bytes().skip(n - 17);
|
||||
if bytes.next() != Some(b'-') {
|
||||
return false;
|
||||
}
|
||||
|
||||
bytes.all(|b| b.is_ascii_hexdigit())
|
||||
}
|
||||
|
||||
/// Paths to all of the library artifacts of dependencies needed to compile tests.
|
||||
struct TestDeps {
|
||||
core: PathBuf,
|
||||
|
@ -9,7 +9,7 @@ OpMemoryModel Logical Simple
|
||||
OpEntryPoint Fragment %1 "main"
|
||||
OpExecutionMode %1 OriginUpperLeft
|
||||
%2 = OpString "$OPSTRING_FILENAME/generic-fn-op-name.rs"
|
||||
OpName %3 "generic_fn_op_name::generic::<f32, {spirv_types::image_params::Dimensionality::TwoD}>"
|
||||
OpName %3 "generic_fn_op_name::generic::<f32, {spirv_std_types::image_params::Dimensionality::TwoD}>"
|
||||
OpName %4 "generic_fn_op_name::main"
|
||||
%5 = OpTypeVoid
|
||||
%6 = OpTypeFunction %5
|
||||
|
Loading…
Reference in New Issue
Block a user