Disassembler

Struct Disassembler 

Source
pub struct Disassembler { /* private fields */ }
Expand description

SPIR-V disassembler.

Implementations§

Source§

impl Disassembler

Source

pub fn new() -> Self

Create a new SPIR-V disassembler.

Source

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: 0
Source

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.

Source

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.

Source

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.

Source

pub fn indent(self, value: bool) -> Self

Indent the output.

Source

pub fn disassemble(&self, spv: &SpirvBinary) -> Result<String>

Disamble SPIR-V binary into SPIR-V assembly code.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.