pub struct Disassembler { /* private fields */ }Expand description
SPIR-V disassembler.
Implementations§
Source§impl Disassembler
impl Disassembler
Sourcepub fn print_header(self, value: bool) -> Self
pub fn print_header(self, value: bool) -> Self
Print the metadata in SPIR-V header which looks like this:
; SPIR-V
; Version: 1.5
; Generator: Khronos Glslang Reference Front End; 11
; Bound: 406
; Schema: 0Sourcepub fn name_ids(self, value: bool) -> Self
pub fn name_ids(self, value: bool) -> Self
Reference intermediate values by their names rather than numeric IDs if it has been annotated by OpName.
If enabled, the input SPIR-V MUST follow the standard physical layout as described in Section 2.3 in SPIR-V specification.
Sourcepub fn name_type_ids(self, value: bool) -> Self
pub fn name_type_ids(self, value: bool) -> Self
Reference type definitions by their names rather than numeric IDs. A human-friendly name will be generated if it’s not annotated by OpName.
If enabled, the input SPIR-V MUST follow the standard physical layout as described in Section 2.3 in SPIR-V specification.
Sourcepub fn name_const_ids(self, value: bool) -> Self
pub fn name_const_ids(self, value: bool) -> Self
Reference constant value by names rather than numeric IDs. A human- friendly name will be generated if it’s not annotated by OpName.
If enabled, the input SPIR-V MUST follow the standard physical layout as described in Section 2.3 in SPIR-V specification.
Sourcepub fn disassemble(&self, spv: &SpirvBinary) -> Result<String>
pub fn disassemble(&self, spv: &SpirvBinary) -> Result<String>
Disamble SPIR-V binary into SPIR-V assembly code.