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
impl Instruction
pub(super) fn string(name: &str, id: Word) -> Self
pub(super) fn source( source_language: SourceLanguage, version: u32, source: &Option<DebugInfoInner<'_>>, ) -> Self
pub(super) fn source_continued(source: &[u8]) -> Self
pub(super) fn source_auto_continued( source_language: SourceLanguage, version: u32, source: &Option<DebugInfoInner<'_>>, ) -> Vec<Self>
pub(super) fn name(target_id: Word, name: &str) -> Self
pub(super) fn member_name(target_id: Word, member: Word, name: &str) -> Self
pub(super) fn line(file: Word, line: Word, column: Word) -> Self
pub(super) fn decorate( target_id: Word, decoration: Decoration, operands: &[Word], ) -> Self
pub(super) fn member_decorate( target_id: Word, member_index: Word, decoration: Decoration, operands: &[Word], ) -> Self
pub(super) fn extension(name: &str) -> Self
pub(super) fn ext_inst_import(id: Word, name: &str) -> Self
pub(super) fn ext_inst( set_id: Word, op: GLOp, result_type_id: Word, id: Word, operands: &[Word], ) -> Self
pub(super) fn memory_model( addressing_model: AddressingModel, memory_model: MemoryModel, ) -> Self
pub(super) fn entry_point( execution_model: ExecutionModel, entry_point_id: Word, name: &str, interface_ids: &[Word], ) -> Self
pub(super) fn execution_mode( entry_point_id: Word, execution_mode: ExecutionMode, args: &[Word], ) -> Self
pub(super) fn capability(capability: Capability) -> Self
pub(super) fn type_void(id: Word) -> Self
pub(super) fn type_bool(id: Word) -> Self
pub(super) fn type_int(id: Word, width: Word, signedness: Signedness) -> Self
pub(super) fn type_float(id: Word, width: Word) -> Self
pub(super) fn type_vector( id: Word, component_type_id: Word, component_count: VectorSize, ) -> Self
pub(super) fn type_matrix( id: Word, column_type_id: Word, column_count: VectorSize, ) -> Self
pub(super) fn type_image( id: Word, sampled_type_id: Word, dim: Dim, flags: ImageTypeFlags, image_format: ImageFormat, ) -> Self
pub(super) fn type_sampler(id: Word) -> Self
pub(super) fn type_acceleration_structure(id: Word) -> Self
pub(super) fn type_ray_query(id: Word) -> Self
pub(super) fn type_sampled_image(id: Word, image_type_id: Word) -> Self
pub(super) fn type_array( id: Word, element_type_id: Word, length_id: Word, ) -> Self
pub(super) fn type_runtime_array(id: Word, element_type_id: Word) -> Self
pub(super) fn type_struct(id: Word, member_ids: &[Word]) -> Self
pub(super) fn type_pointer( id: Word, storage_class: StorageClass, type_id: Word, ) -> Self
pub(super) fn type_function( id: Word, return_type_id: Word, parameter_ids: &[Word], ) -> Self
pub(super) fn constant_null(result_type_id: Word, id: Word) -> Self
pub(super) fn constant_true(result_type_id: Word, id: Word) -> Self
pub(super) fn constant_false(result_type_id: Word, id: Word) -> Self
pub(super) fn constant_16bit(result_type_id: Word, id: Word, low: Word) -> Self
pub(super) fn constant_32bit( result_type_id: Word, id: Word, value: Word, ) -> Self
pub(super) fn constant_64bit( result_type_id: Word, id: Word, low: Word, high: Word, ) -> Self
pub(super) fn constant(result_type_id: Word, id: Word, values: &[Word]) -> Self
pub(super) fn constant_composite( result_type_id: Word, id: Word, constituent_ids: &[Word], ) -> Self
pub(super) fn variable( result_type_id: Word, id: Word, storage_class: StorageClass, initializer_id: Option<Word>, ) -> Self
pub(super) fn load( result_type_id: Word, id: Word, pointer_id: Word, memory_access: Option<MemoryAccess>, ) -> Self
pub(super) fn atomic_load( result_type_id: Word, id: Word, pointer_id: Word, scope_id: Word, semantics_id: Word, ) -> Self
pub(super) fn store( pointer_id: Word, value_id: Word, memory_access: Option<MemoryAccess>, ) -> Self
pub(super) fn atomic_store( pointer_id: Word, scope_id: Word, semantics_id: Word, value_id: Word, ) -> Self
pub(super) fn access_chain( result_type_id: Word, id: Word, base_id: Word, index_ids: &[Word], ) -> Self
pub(super) fn array_length( result_type_id: Word, id: Word, structure_id: Word, array_member: Word, ) -> Self
pub(super) fn function( return_type_id: Word, id: Word, function_control: FunctionControl, function_type_id: Word, ) -> Self
pub(super) fn function_parameter(result_type_id: Word, id: Word) -> Self
pub(super) const fn function_end() -> Self
pub(super) fn function_call( result_type_id: Word, id: Word, function_id: Word, argument_ids: &[Word], ) -> Self
pub(super) fn sampled_image( result_type_id: Word, id: Word, image: Word, sampler: Word, ) -> Self
pub(super) fn image_sample( result_type_id: Word, id: Word, lod: SampleLod, sampled_image: Word, coordinates: Word, depth_ref: Option<Word>, ) -> Self
pub(super) fn image_gather( result_type_id: Word, id: Word, sampled_image: Word, coordinates: Word, component_id: Word, depth_ref: Option<Word>, ) -> Self
pub(super) fn image_fetch_or_read( op: Op, result_type_id: Word, id: Word, image: Word, coordinates: Word, ) -> Self
pub(super) fn image_write(image: Word, coordinates: Word, value: Word) -> Self
pub(super) fn image_texel_pointer( result_type_id: Word, id: Word, image: Word, coordinates: Word, sample: Word, ) -> Self
pub(super) fn image_atomic( op: Op, result_type_id: Word, id: Word, pointer: Word, scope_id: Word, semantics_id: Word, value: Word, ) -> Self
pub(super) fn image_query( op: Op, result_type_id: Word, id: Word, image: Word, ) -> Self
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
pub(super) fn ray_query_proceed( result_type_id: Word, id: Word, query: Word, ) -> Self
pub(super) fn ray_query_generate_intersection(query: Word, hit: Word) -> Self
pub(super) fn ray_query_confirm_intersection(query: Word) -> Self
pub(super) fn ray_query_return_vertex_position( result_type_id: Word, id: Word, query: Word, intersection: Word, ) -> Self
pub(super) fn ray_query_get_intersection( op: Op, result_type_id: Word, id: Word, query: Word, intersection: Word, ) -> Self
pub(super) fn unary(op: Op, result_type_id: Word, id: Word, value: Word) -> Self
pub(super) fn composite_construct( result_type_id: Word, id: Word, constituent_ids: &[Word], ) -> Self
pub(super) fn composite_extract( result_type_id: Word, id: Word, composite_id: Word, indices: &[Word], ) -> Self
pub(super) fn vector_extract_dynamic( result_type_id: Word, id: Word, vector_id: Word, index_id: Word, ) -> Self
pub(super) fn vector_shuffle( result_type_id: Word, id: Word, v1_id: Word, v2_id: Word, components: &[Word], ) -> Self
pub(super) fn binary( op: Op, result_type_id: Word, id: Word, operand_1: Word, operand_2: Word, ) -> Self
pub(super) fn ternary( op: Op, result_type_id: Word, id: Word, operand_1: Word, operand_2: Word, operand_3: Word, ) -> Self
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
pub(super) fn relational( op: Op, result_type_id: Word, id: Word, expr_id: Word, ) -> Self
pub(super) fn atomic_binary( op: Op, result_type_id: Word, id: Word, pointer: Word, scope_id: Word, semantics_id: Word, value: Word, ) -> Self
pub(super) fn derivative( op: Op, result_type_id: Word, id: Word, expr_id: Word, ) -> Self
pub(super) fn phi( result_type_id: Word, result_id: Word, var_parent_pairs: &[(Word, Word)], ) -> Self
pub(super) fn selection_merge( merge_id: Word, selection_control: SelectionControl, ) -> Self
pub(super) fn loop_merge( merge_id: Word, continuing_id: Word, selection_control: SelectionControl, ) -> Self
pub(super) fn label(id: Word) -> Self
pub(super) fn branch(id: Word) -> Self
pub(super) fn branch_conditional( condition_id: Word, true_label: Word, false_label: Word, ) -> Self
pub(super) fn switch( selector_id: Word, default_id: Word, cases: &[Case], ) -> Self
pub(super) fn select( result_type_id: Word, id: Word, condition_id: Word, accept_id: Word, reject_id: Word, ) -> Self
pub(super) const fn kill() -> Self
pub(super) const fn return_void() -> Self
pub(super) fn return_value(value_id: Word) -> Self
pub(super) fn control_barrier( exec_scope_id: Word, mem_scope_id: Word, semantics_id: Word, ) -> Self
pub(super) fn memory_barrier(mem_scope_id: Word, semantics_id: Word) -> Self
pub(super) fn group_non_uniform_ballot( result_type_id: Word, id: Word, exec_scope_id: Word, predicate: Word, ) -> Self
pub(super) fn group_non_uniform_broadcast_first( result_type_id: Word, id: Word, exec_scope_id: Word, value: Word, ) -> Self
pub(super) fn group_non_uniform_gather( op: Op, result_type_id: Word, id: Word, exec_scope_id: Word, value: Word, index: Word, ) -> Self
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
pub(super) fn group_non_uniform_quad_swap( result_type_id: Word, id: Word, exec_scope_id: Word, value: Word, direction: Word, ) -> Self
Source§impl Instruction
impl Instruction
pub(super) const fn new(op: Op) -> Self
pub(super) fn set_type(&mut self, id: Word)
pub(super) fn set_result(&mut self, id: Word)
pub(super) fn add_operand(&mut self, operand: Word)
pub(super) fn add_operands(&mut self, operands: Vec<Word>)
pub(super) fn to_words(&self, sink: &mut impl Extend<Word>)
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more