mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2025-02-18 01:44:57 +00:00
![Sylvester Hesp](/assets/img/avatar_default.png)
* Accept `#[rust_gpu::spirv()]` attributes rather than `#[spirv()]` in backend * Implemented `#[spirv(..)]` proc macro attribute for all platforms that conditionally translates to `#[rust_gpu::spirv()]` based on platform * Changed `SpirvBuilder` to always apply `register_tool(rust_gpu)` attribute to shader crates * Updated docs * Added changelog
18 lines
381 B
Rust
18 lines
381 B
Rust
// build-pass
|
|
|
|
#![feature(adt_const_params)]
|
|
#![allow(incomplete_features)]
|
|
|
|
use spirv_std::memory::{Scope, Semantics};
|
|
use spirv_std::spirv;
|
|
|
|
#[spirv(fragment)]
|
|
pub fn main() {
|
|
unsafe {
|
|
spirv_std::arch::memory_barrier::<
|
|
{ Scope::Subgroup as u32 },
|
|
{ Semantics::ACQUIRE_RELEASE.bits() | Semantics::UNIFORM_MEMORY.bits() },
|
|
>();
|
|
}
|
|
}
|