mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2025-02-27 14:25:08 +00:00
20 lines
373 B
Rust
20 lines
373 B
Rust
// build-pass
|
|
// compile-flags: -C llvm-args=--disassemble-fn=asm::asm
|
|
|
|
use spirv_std as _;
|
|
|
|
fn asm() {
|
|
unsafe {
|
|
asm!(
|
|
"%int = OpTypeInt 32 0",
|
|
"%scope = OpConstant %int 3",
|
|
"%semantics = OpConstant %int 72",
|
|
"OpMemoryBarrier %scope %semantics",
|
|
);
|
|
}
|
|
}
|
|
#[spirv(fragment)]
|
|
pub fn main() {
|
|
asm();
|
|
}
|