mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-22 06:45:13 +00:00
Fixed compile error in compile_error
Also includes an insignificant naming change
This commit is contained in:
parent
0f9cd391ce
commit
25cb265b5e
@ -15,7 +15,7 @@ pub trait SampleType<const FORMAT: u32>: Scalar {
|
||||
}
|
||||
|
||||
/// Helper macro to implement `SampleType` of various formats for various scalar types.
|
||||
macro_rules! sampletype_impls {
|
||||
macro_rules! sample_type_impls {
|
||||
($($fmt:ident : $s:ty => ($v2:ty, $v3:ty, $v4:ty)),+ $(,)?) => {
|
||||
$(
|
||||
impl SampleType<{ ImageFormat::$fmt as u32 }> for $s {
|
||||
@ -28,7 +28,7 @@ macro_rules! sampletype_impls {
|
||||
}
|
||||
|
||||
#[cfg(feature = "glam")]
|
||||
sampletype_impls! {
|
||||
sample_type_impls! {
|
||||
Unknown: i8 => (glam::IVec2, glam::IVec3, glam::IVec4),
|
||||
Unknown: i16 => (glam::IVec2, glam::IVec3, glam::IVec4),
|
||||
Unknown: i32 => (glam::IVec2, glam::IVec3, glam::IVec4),
|
||||
|
@ -121,7 +121,9 @@ pub use glam;
|
||||
// so we keep the "glam" feature toggle intact for now. As the code won't currently compile
|
||||
// without it, present the user with a somewhat friendly error message.
|
||||
#[cfg(not(feature = "glam"))]
|
||||
compile_error!("`spriv-std` now requires the use of `glam`. Make sure the "glam" feature is specified for `spirv-std` in `Cargo.toml`");
|
||||
compile_error!(
|
||||
r#"`spriv-std` now requires the use of `glam`. Make sure the "glam" feature is specified for `spirv-std` in `Cargo.toml`"#
|
||||
);
|
||||
|
||||
#[cfg(all(not(test), target_arch = "spirv"))]
|
||||
#[panic_handler]
|
||||
|
Loading…
Reference in New Issue
Block a user