Module spv

Source
Expand description

SPIR-V support, mainly conversions to/from SPIR-T (lower/lift).

Modules§

lift
SPIR-T to SPIR-V lifting.
lower
SPIR-V to SPIR-T lowering.
print
Pretty-printing SPIR-V operands.
read
Low-level parsing of SPIR-V binary form.
spec
SPIR-V specification parsing/indexing.
write
Low-level emission of SPIR-V binary form.

Structs§

DebugSourceLang
DebugSources
Dialect
Semantic properties of a SPIR-V module (not tied to any IDs).
Inst
A SPIR-V instruction, in its minimal form (opcode and immediate operands).
InstWithIds
A full SPIR-V instruction (like Inst, but including input/output ID operands).
ModuleDebugInfo
Non-semantic details (i.e. debuginfo) of a SPIR-V module (not tied to any IDs).

Enums§

Imm
SPIR-V immediate (one word, longer immediates are a sequence of multiple Imms).

Functions§

encode_literal_string
extract_literal_string
Given a single LiteralString (as one Imm::Short or a Imm::LongStart followed by some number of Imm::LongCont - will panic otherwise), returns a Rust String if the literal is valid UTF-8, or the validation error otherwise.

Type Aliases§

Id
SPIR-V ID.