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

Method builder

crates/rustc_codegen_spirv/src/builder_spirv.rs:499–510  ·  view source on GitHub ↗

See comment on `BuilderCursor`

(&self, cursor: BuilderCursor)

Source from the content-addressed store, hash-verified

497
498 /// See comment on `BuilderCursor`
499 pub fn builder(&self, cursor: BuilderCursor) -> RefMut<'_, Builder> {
500 let mut builder = self.builder.borrow_mut();
501 // select_function does bounds checks and other relatively expensive things, so don't just call it
502 // unconditionally.
503 if builder.selected_function() != cursor.function {
504 builder.select_function(cursor.function).unwrap();
505 }
506 if cursor.function.is_some() && builder.selected_block() != cursor.block {
507 builder.select_block(cursor.block).unwrap();
508 }
509 builder
510 }
511
512 pub fn has_capability(&self, capability: Capability) -> bool {
513 self.enabled_capabilities.contains(&capability)

Callers 4

def_constant_cxMethod · 0.80
def_debug_fileMethod · 0.80
emit_globalMethod · 0.80
emit_with_cursorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected