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

Method constant_u8

crates/rustc_codegen_spirv/src/codegen_cx/constant.rs:19–22  ·  view source on GitHub ↗
(&self, span: Span, val: u8)

Source from the content-addressed store, hash-verified

17 }
18
19 pub fn constant_u8(&self, span: Span, val: u8) -> SpirvValue {
20 let ty = SpirvType::Integer(8, false).def(span, self);
21 self.def_constant(ty, SpirvConst::U32(val as u32))
22 }
23
24 pub fn constant_i16(&self, span: Span, val: i16) -> SpirvValue {
25 let ty = SpirvType::Integer(16, true).def(span, self);

Callers 2

const_u8Method · 0.80
memset_const_patternMethod · 0.80

Calls 3

IntegerInterface · 0.85
def_constantMethod · 0.80
defMethod · 0.45

Tested by

no test coverage detected