Struct naga::back::spv::Instruction

source ·
struct Instruction {
    op: Op,
    wc: u32,
    type_id: Option<Word>,
    result_id: Option<Word>,
    operands: Vec<Word>,
}

Fields§

§op: Op§wc: u32§type_id: Option<Word>§result_id: Option<Word>§operands: Vec<Word>

Implementations§

source§

impl Instruction

source

pub(super) fn string(name: &str, id: Word) -> Self

source

pub(super) fn source( source_language: SourceLanguage, version: u32, source: &Option<DebugInfoInner<'_>>, ) -> Self

source

pub(super) fn source_continued(source: &[u8]) -> Self

source

pub(super) fn source_auto_continued( source_language: SourceLanguage, version: u32, source: &Option<DebugInfoInner<'_>>, ) -> Vec<Self>

source

pub(super) fn name(target_id: Word, name: &str) -> Self

source

pub(super) fn member_name(target_id: Word, member: Word, name: &str) -> Self

source

pub(super) fn line(file: Word, line: Word, column: Word) -> Self

source

pub(super) const fn no_line() -> Self

source

pub(super) fn decorate( target_id: Word, decoration: Decoration, operands: &[Word], ) -> Self

source

pub(super) fn member_decorate( target_id: Word, member_index: Word, decoration: Decoration, operands: &[Word], ) -> Self

source

pub(super) fn extension(name: &str) -> Self

source

pub(super) fn ext_inst_import(id: Word, name: &str) -> Self

source

pub(super) fn ext_inst( set_id: Word, op: GLOp, result_type_id: Word, id: Word, operands: &[Word], ) -> Self

source

pub(super) fn memory_model( addressing_model: AddressingModel, memory_model: MemoryModel, ) -> Self

source

pub(super) fn entry_point( execution_model: ExecutionModel, entry_point_id: Word, name: &str, interface_ids: &[Word], ) -> Self

source

pub(super) fn execution_mode( entry_point_id: Word, execution_mode: ExecutionMode, args: &[Word], ) -> Self

source

pub(super) fn capability(capability: Capability) -> Self

source

pub(super) fn type_void(id: Word) -> Self

source

pub(super) fn type_bool(id: Word) -> Self

source

pub(super) fn type_int(id: Word, width: Word, signedness: Signedness) -> Self

source

pub(super) fn type_float(id: Word, width: Word) -> Self

source

pub(super) fn type_vector( id: Word, component_type_id: Word, component_count: VectorSize, ) -> Self

source

pub(super) fn type_matrix( id: Word, column_type_id: Word, column_count: VectorSize, ) -> Self

source

pub(super) fn type_image( id: Word, sampled_type_id: Word, dim: Dim, flags: ImageTypeFlags, image_format: ImageFormat, ) -> Self

source

pub(super) fn type_sampler(id: Word) -> Self

source

pub(super) fn type_acceleration_structure(id: Word) -> Self

source

pub(super) fn type_ray_query(id: Word) -> Self

source

pub(super) fn type_sampled_image(id: Word, image_type_id: Word) -> Self

source

pub(super) fn type_array( id: Word, element_type_id: Word, length_id: Word, ) -> Self

source

pub(super) fn type_runtime_array(id: Word, element_type_id: Word) -> Self

source

pub(super) fn type_struct(id: Word, member_ids: &[Word]) -> Self

source

pub(super) fn type_pointer( id: Word, storage_class: StorageClass, type_id: Word, ) -> Self

source

pub(super) fn type_function( id: Word, return_type_id: Word, parameter_ids: &[Word], ) -> Self

source

pub(super) fn constant_null(result_type_id: Word, id: Word) -> Self

source

pub(super) fn constant_true(result_type_id: Word, id: Word) -> Self

source

pub(super) fn constant_false(result_type_id: Word, id: Word) -> Self

source

pub(super) fn constant_32bit( result_type_id: Word, id: Word, value: Word, ) -> Self

source

pub(super) fn constant_64bit( result_type_id: Word, id: Word, low: Word, high: Word, ) -> Self

source

pub(super) fn constant(result_type_id: Word, id: Word, values: &[Word]) -> Self

source

pub(super) fn constant_composite( result_type_id: Word, id: Word, constituent_ids: &[Word], ) -> Self

source

pub(super) fn variable( result_type_id: Word, id: Word, storage_class: StorageClass, initializer_id: Option<Word>, ) -> Self

source

pub(super) fn load( result_type_id: Word, id: Word, pointer_id: Word, memory_access: Option<MemoryAccess>, ) -> Self

source

pub(super) fn atomic_load( result_type_id: Word, id: Word, pointer_id: Word, scope_id: Word, semantics_id: Word, ) -> Self

source

pub(super) fn store( pointer_id: Word, value_id: Word, memory_access: Option<MemoryAccess>, ) -> Self

source

pub(super) fn atomic_store( pointer_id: Word, scope_id: Word, semantics_id: Word, value_id: Word, ) -> Self

source

pub(super) fn access_chain( result_type_id: Word, id: Word, base_id: Word, index_ids: &[Word], ) -> Self

source

pub(super) fn array_length( result_type_id: Word, id: Word, structure_id: Word, array_member: Word, ) -> Self

source

pub(super) fn function( return_type_id: Word, id: Word, function_control: FunctionControl, function_type_id: Word, ) -> Self

source

pub(super) fn function_parameter(result_type_id: Word, id: Word) -> Self

source

pub(super) const fn function_end() -> Self

source

pub(super) fn function_call( result_type_id: Word, id: Word, function_id: Word, argument_ids: &[Word], ) -> Self

source

pub(super) fn sampled_image( result_type_id: Word, id: Word, image: Word, sampler: Word, ) -> Self

source

pub(super) fn image_sample( result_type_id: Word, id: Word, lod: SampleLod, sampled_image: Word, coordinates: Word, depth_ref: Option<Word>, ) -> Self

source

pub(super) fn image_gather( result_type_id: Word, id: Word, sampled_image: Word, coordinates: Word, component_id: Word, depth_ref: Option<Word>, ) -> Self

source

pub(super) fn image_fetch_or_read( op: Op, result_type_id: Word, id: Word, image: Word, coordinates: Word, ) -> Self

source

pub(super) fn image_write(image: Word, coordinates: Word, value: Word) -> Self

source

pub(super) fn image_query( op: Op, result_type_id: Word, id: Word, image: Word, ) -> Self

source

pub(super) fn ray_query_initialize( query: Word, acceleration_structure: Word, ray_flags: Word, cull_mask: Word, ray_origin: Word, ray_tmin: Word, ray_dir: Word, ray_tmax: Word, ) -> Self

source

pub(super) fn ray_query_proceed( result_type_id: Word, id: Word, query: Word, ) -> Self

source

pub(super) fn ray_query_get_intersection( op: Op, result_type_id: Word, id: Word, query: Word, intersection: Word, ) -> Self

source

pub(super) fn unary(op: Op, result_type_id: Word, id: Word, value: Word) -> Self

source

pub(super) fn composite_construct( result_type_id: Word, id: Word, constituent_ids: &[Word], ) -> Self

source

pub(super) fn composite_extract( result_type_id: Word, id: Word, composite_id: Word, indices: &[Word], ) -> Self

source

pub(super) fn vector_extract_dynamic( result_type_id: Word, id: Word, vector_id: Word, index_id: Word, ) -> Self

source

pub(super) fn vector_shuffle( result_type_id: Word, id: Word, v1_id: Word, v2_id: Word, components: &[Word], ) -> Self

source

pub(super) fn binary( op: Op, result_type_id: Word, id: Word, operand_1: Word, operand_2: Word, ) -> Self

source

pub(super) fn ternary( op: Op, result_type_id: Word, id: Word, operand_1: Word, operand_2: Word, operand_3: Word, ) -> Self

source

pub(super) fn quaternary( op: Op, result_type_id: Word, id: Word, operand_1: Word, operand_2: Word, operand_3: Word, operand_4: Word, ) -> Self

source

pub(super) fn relational( op: Op, result_type_id: Word, id: Word, expr_id: Word, ) -> Self

source

pub(super) fn atomic_binary( op: Op, result_type_id: Word, id: Word, pointer: Word, scope_id: Word, semantics_id: Word, value: Word, ) -> Self

source

pub(super) fn derivative( op: Op, result_type_id: Word, id: Word, expr_id: Word, ) -> Self

source

pub(super) fn phi( result_type_id: Word, result_id: Word, var_parent_pairs: &[(Word, Word)], ) -> Self

source

pub(super) fn selection_merge( merge_id: Word, selection_control: SelectionControl, ) -> Self

source

pub(super) fn loop_merge( merge_id: Word, continuing_id: Word, selection_control: SelectionControl, ) -> Self

source

pub(super) fn label(id: Word) -> Self

source

pub(super) fn branch(id: Word) -> Self

source

pub(super) fn branch_conditional( condition_id: Word, true_label: Word, false_label: Word, ) -> Self

source

pub(super) fn switch( selector_id: Word, default_id: Word, cases: &[Case], ) -> Self

source

pub(super) fn select( result_type_id: Word, id: Word, condition_id: Word, accept_id: Word, reject_id: Word, ) -> Self

source

pub(super) const fn kill() -> Self

source

pub(super) const fn return_void() -> Self

source

pub(super) fn return_value(value_id: Word) -> Self

source

pub(super) fn control_barrier( exec_scope_id: Word, mem_scope_id: Word, semantics_id: Word, ) -> Self

source

pub(super) fn group_non_uniform_ballot( result_type_id: Word, id: Word, exec_scope_id: Word, predicate: Word, ) -> Self

source

pub(super) fn group_non_uniform_broadcast_first( result_type_id: Word, id: Word, exec_scope_id: Word, value: Word, ) -> Self

source

pub(super) fn group_non_uniform_gather( op: Op, result_type_id: Word, id: Word, exec_scope_id: Word, value: Word, index: Word, ) -> Self

source

pub(super) fn group_non_uniform_arithmetic( op: Op, result_type_id: Word, id: Word, exec_scope_id: Word, group_op: Option<GroupOperation>, value: Word, ) -> Self

source§

impl Instruction

source

pub(super) const fn new(op: Op) -> Self

source

pub(super) fn set_type(&mut self, id: Word)

source

pub(super) fn set_result(&mut self, id: Word)

source

pub(super) fn add_operand(&mut self, operand: Word)

source

pub(super) fn add_operands(&mut self, operands: Vec<Word>)

source

pub(super) fn to_words(&self, sink: &mut impl Extend<Word>)

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.