MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / validate_atomic

Method validate_atomic

crates/rustc_codegen_spirv/src/builder/mod.rs:62–71  ·  view source on GitHub ↗
(&self, ty: Word, to_zombie: Word)

Source from the content-addressed store, hash-verified

60 }
61
62 pub fn validate_atomic(&self, ty: Word, to_zombie: Word) {
63 if !self.i8_i16_atomics_allowed {
64 match self.lookup_type(ty) {
65 SpirvType::Integer(width, _) if width < 32 => {
66 self.zombie(to_zombie, "atomic on i8 or i16 when disallowed by runtime");
67 }
68 _ => (),
69 }
70 }
71 }
72
73 pub fn struct_err(&self, msg: &str) -> DiagnosticBuilder<'_, ErrorGuaranteed> {
74 if let Some(current_span) = self.current_span {

Callers 4

atomic_loadMethod · 0.80
atomic_storeMethod · 0.80
atomic_cmpxchgMethod · 0.80
atomic_rmwMethod · 0.80

Calls 2

lookup_typeMethod · 0.80
zombieMethod · 0.80

Tested by

no test coverage detected