Struct rspirv::sr::Context [−][src]
pub struct Context { /* fields omitted */ }
The context class for SPIR-V structured representation.
This class holds all allocations for types, constants, decorations, instructions, etc. in structured representation. Thus, those objects are created using methods of this class. Tokens are returned for the object to be created, which can then be used to access the real object using the context again. Tokens are indeed indices into the vectors of objects inside the context. The context serves as the memory arena.
Methods
impl Context
[src]
impl Context
impl Context
[src]
impl Context
pub fn type_void(&mut self) -> TypeToken
[src]
pub fn type_void(&mut self) -> TypeToken
pub fn type_bool(&mut self) -> TypeToken
[src]
pub fn type_bool(&mut self) -> TypeToken
pub fn type_int(&mut self, width: u32, signedness: u32) -> TypeToken
[src]
pub fn type_int(&mut self, width: u32, signedness: u32) -> TypeToken
pub fn type_float(&mut self, width: u32) -> TypeToken
[src]
pub fn type_float(&mut self, width: u32) -> TypeToken
pub fn type_vector(
&mut self,
component_type: TypeToken,
component_count: u32
) -> TypeToken
[src]
pub fn type_vector(
&mut self,
component_type: TypeToken,
component_count: u32
) -> TypeToken
pub fn type_matrix(
&mut self,
column_type: TypeToken,
column_count: u32
) -> TypeToken
[src]
pub fn type_matrix(
&mut self,
column_type: TypeToken,
column_count: u32
) -> TypeToken
pub fn type_image(
&mut self,
sampled_type: TypeToken,
dim: Dim,
depth: u32,
arrayed: u32,
ms: u32,
sampled: u32,
image_format: ImageFormat,
access_qualifier: Option<AccessQualifier>
) -> TypeToken
[src]
pub fn type_image(
&mut self,
sampled_type: TypeToken,
dim: Dim,
depth: u32,
arrayed: u32,
ms: u32,
sampled: u32,
image_format: ImageFormat,
access_qualifier: Option<AccessQualifier>
) -> TypeToken
pub fn type_sampler(&mut self) -> TypeToken
[src]
pub fn type_sampler(&mut self) -> TypeToken
pub fn type_sampled_image(&mut self, image_type: TypeToken) -> TypeToken
[src]
pub fn type_sampled_image(&mut self, image_type: TypeToken) -> TypeToken
pub fn type_array(
&mut self,
element_type: TypeToken,
length: ConstantToken
) -> TypeToken
[src]
pub fn type_array(
&mut self,
element_type: TypeToken,
length: ConstantToken
) -> TypeToken
pub fn type_runtime_array(&mut self, element_type: TypeToken) -> TypeToken
[src]
pub fn type_runtime_array(&mut self, element_type: TypeToken) -> TypeToken
pub fn type_opaque(&mut self, type_name: String) -> TypeToken
[src]
pub fn type_opaque(&mut self, type_name: String) -> TypeToken
pub fn type_pointer(
&mut self,
storage_class: StorageClass,
pointee_type: TypeToken
) -> TypeToken
[src]
pub fn type_pointer(
&mut self,
storage_class: StorageClass,
pointee_type: TypeToken
) -> TypeToken
pub fn type_function(
&mut self,
return_type: TypeToken,
parameter_types: Vec<TypeToken>
) -> TypeToken
[src]
pub fn type_function(
&mut self,
return_type: TypeToken,
parameter_types: Vec<TypeToken>
) -> TypeToken
pub fn type_event(&mut self) -> TypeToken
[src]
pub fn type_event(&mut self) -> TypeToken
pub fn type_device_event(&mut self) -> TypeToken
[src]
pub fn type_device_event(&mut self) -> TypeToken
pub fn type_reserve_id(&mut self) -> TypeToken
[src]
pub fn type_reserve_id(&mut self) -> TypeToken
pub fn type_queue(&mut self) -> TypeToken
[src]
pub fn type_queue(&mut self) -> TypeToken
pub fn type_pipe(&mut self, qualifier: AccessQualifier) -> TypeToken
[src]
pub fn type_pipe(&mut self, qualifier: AccessQualifier) -> TypeToken
pub fn type_forward_pointer(&mut self, storage_class: StorageClass) -> TypeToken
[src]
pub fn type_forward_pointer(&mut self, storage_class: StorageClass) -> TypeToken
pub fn type_pipe_storage(&mut self) -> TypeToken
[src]
pub fn type_pipe_storage(&mut self) -> TypeToken
pub fn type_named_barrier(&mut self) -> TypeToken
[src]
pub fn type_named_barrier(&mut self) -> TypeToken
impl Context
[src]
impl Context
pub fn type_struct<T: AsRef<[TypeToken]>>(
&mut self,
field_types: T
) -> TypeToken
[src]
pub fn type_struct<T: AsRef<[TypeToken]>>(
&mut self,
field_types: T
) -> TypeToken
pub fn get_type(&self, token: TypeToken) -> &Type
[src]
pub fn get_type(&self, token: TypeToken) -> &Type
Returns the reference to the real type represented by the given token.
impl Context
[src]
impl Context
pub fn constant_bool(&mut self, val: bool) -> ConstantToken
[src]
pub fn constant_bool(&mut self, val: bool) -> ConstantToken
pub fn constant_i32(&mut self, val: i32) -> ConstantToken
[src]
pub fn constant_i32(&mut self, val: i32) -> ConstantToken
pub fn constant_u32(&mut self, val: u32) -> ConstantToken
[src]
pub fn constant_u32(&mut self, val: u32) -> ConstantToken
pub fn constant_f32(&mut self, val: f32) -> ConstantToken
[src]
pub fn constant_f32(&mut self, val: f32) -> ConstantToken
pub fn constant_composite<T: AsRef<[ConstantToken]>>(
&mut self,
val: T
) -> ConstantToken
[src]
pub fn constant_composite<T: AsRef<[ConstantToken]>>(
&mut self,
val: T
) -> ConstantToken
pub fn constant_null(&mut self, val: TypeToken) -> ConstantToken
[src]
pub fn constant_null(&mut self, val: TypeToken) -> ConstantToken
pub fn constant_sampler(
&mut self,
addressing_mode: SamplerAddressingMode,
param: u32,
filter_mode: SamplerFilterMode
) -> ConstantToken
[src]
pub fn constant_sampler(
&mut self,
addressing_mode: SamplerAddressingMode,
param: u32,
filter_mode: SamplerFilterMode
) -> ConstantToken
pub fn spec_constant_bool(&mut self, val: bool) -> ConstantToken
[src]
pub fn spec_constant_bool(&mut self, val: bool) -> ConstantToken
pub fn spec_constant_i32(&mut self, val: i32) -> ConstantToken
[src]
pub fn spec_constant_i32(&mut self, val: i32) -> ConstantToken
pub fn spec_constant_u32(&mut self, val: u32) -> ConstantToken
[src]
pub fn spec_constant_u32(&mut self, val: u32) -> ConstantToken
pub fn spec_constant_f32(&mut self, val: f32) -> ConstantToken
[src]
pub fn spec_constant_f32(&mut self, val: f32) -> ConstantToken
pub fn spec_constant_composite<T: AsRef<[ConstantToken]>>(
&mut self,
val: T
) -> ConstantToken
[src]
pub fn spec_constant_composite<T: AsRef<[ConstantToken]>>(
&mut self,
val: T
) -> ConstantToken
pub fn spec_constant_op<T: AsRef<[ConstantToken]>>(
&mut self,
op: Op,
operands: T
) -> ConstantToken
[src]
pub fn spec_constant_op<T: AsRef<[ConstantToken]>>(
&mut self,
op: Op,
operands: T
) -> ConstantToken
pub fn get_constant(&self, token: ConstantToken) -> &Constant
[src]
pub fn get_constant(&self, token: ConstantToken) -> &Constant
Returns the reference to the real constant represented by the given token.