Skip to content

Commit

Permalink
fix semantics type for control barriers to support multiple flags
Browse files Browse the repository at this point in the history
  • Loading branch information
msiglreith committed Apr 20, 2021
1 parent a42a9f2 commit b144e4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/spirv-std/src/arch/barrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ use crate::memory::{Scope, Semantics};
#[spirv_std_macros::gpu_only]
#[doc(alias = "OpControlBarrier")]
#[inline]
// FIXME(eddyb) use a `bitflags!` `Semantics` for `SEMANTICS`.
pub unsafe fn control_barrier<
const EXECUTION: Scope,
const MEMORY: Scope,
const SEMANTICS: Semantics,
const SEMANTICS: u32,
>() {
asm! {
"%u32 = OpTypeInt 32 0",
Expand All @@ -43,7 +44,7 @@ pub unsafe fn control_barrier<
"OpControlBarrier %execution %memory %semantics",
execution = const EXECUTION as u8,
memory = const MEMORY as u8,
semantics = const SEMANTICS as u8,
semantics = const SEMANTICS,
}
}

Expand Down

0 comments on commit b144e4f

Please sign in to comment.