mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-21 22:34:34 +00:00
Move lang_items into spirv-std (#275)
This commit is contained in:
parent
5f3fd5c9d1
commit
59869ec58b
@ -49,15 +49,10 @@ spirv-std = { path = "../../crates/spirv-std" }
|
||||
"#;
|
||||
|
||||
static SRC_PREFIX: &str = r#"#![no_std]
|
||||
#![feature(lang_items, register_attr, asm)]
|
||||
#![feature(register_attr, asm)]
|
||||
#![register_attr(spirv)]
|
||||
use core::panic::PanicInfo;
|
||||
#[allow(unused_imports)]
|
||||
use spirv_std::*;
|
||||
#[panic_handler]
|
||||
fn panic(_: &PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
"#;
|
||||
|
||||
fn setup(src: &str) -> Result<PathBuf, Box<dyn Error>> {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#![no_std]
|
||||
#![feature(register_attr, repr_simd, core_intrinsics)]
|
||||
#![feature(register_attr, repr_simd, core_intrinsics, lang_items)]
|
||||
#![cfg_attr(target_arch = "spirv", feature(asm))]
|
||||
#![register_attr(spirv)]
|
||||
// Our standard Clippy lints that we use in Embark projects, we opt out of a few that are not appropriate for the specific crate (yet)
|
||||
@ -40,6 +40,16 @@
|
||||
pub use glam;
|
||||
pub use num_traits;
|
||||
|
||||
#[cfg(all(not(test), target_arch = "spirv"))]
|
||||
#[panic_handler]
|
||||
fn panic(_: &core::panic::PanicInfo<'_>) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[cfg(all(not(test), target_arch = "spirv"))]
|
||||
#[lang = "eh_personality"]
|
||||
extern "C" fn rust_eh_personality() {}
|
||||
|
||||
macro_rules! pointer_addrspace_write {
|
||||
(false) => {};
|
||||
(true) => {
|
||||
|
@ -1,16 +1,9 @@
|
||||
#![cfg_attr(target_arch = "spirv", no_std)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(register_attr)]
|
||||
#![register_attr(spirv)]
|
||||
|
||||
extern crate spirv_std;
|
||||
|
||||
#[cfg(all(not(test), target_arch = "spirv"))]
|
||||
#[panic_handler]
|
||||
fn panic(_: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[allow(unused_attributes)]
|
||||
#[spirv(gl_compute)]
|
||||
pub fn main_cs() {}
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![cfg_attr(target_arch = "spirv", no_std)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(register_attr)]
|
||||
#![register_attr(spirv)]
|
||||
|
||||
@ -26,13 +25,3 @@ pub fn main_vs(
|
||||
1.0,
|
||||
));
|
||||
}
|
||||
|
||||
#[cfg(all(not(test), target_arch = "spirv"))]
|
||||
#[panic_handler]
|
||||
fn panic(_: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[cfg(all(not(test), target_arch = "spirv"))]
|
||||
#[lang = "eh_personality"]
|
||||
extern "C" fn rust_eh_personality() {}
|
||||
|
@ -179,13 +179,3 @@ pub fn main_vs(
|
||||
|
||||
builtin_pos.store(pos.extend(0.0).extend(1.0));
|
||||
}
|
||||
|
||||
#[cfg(all(not(test), target_arch = "spirv"))]
|
||||
#[panic_handler]
|
||||
fn panic(_: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[cfg(all(not(test), target_arch = "spirv"))]
|
||||
#[lang = "eh_personality"]
|
||||
extern "C" fn rust_eh_personality() {}
|
||||
|
Loading…
Reference in New Issue
Block a user