struct ExpressionContext<'a> {
function: &'a Function,
origin: FunctionOrigin,
info: &'a FunctionInfo,
module: &'a Module,
mod_info: &'a ModuleInfo,
pipeline_options: &'a PipelineOptions,
lang_version: (u8, u8),
policies: BoundsCheckPolicies,
guarded_indices: HandleSet<Expression>,
force_loop_bounding: bool,
}
Fields§
§function: &'a Function
§origin: FunctionOrigin
§info: &'a FunctionInfo
§module: &'a Module
§mod_info: &'a ModuleInfo
§pipeline_options: &'a PipelineOptions
§lang_version: (u8, u8)
§policies: BoundsCheckPolicies
§guarded_indices: HandleSet<Expression>
The set of expressions used as indices in ReadZeroSkipWrite
-policy
accesses. These may need to be cached in temporary variables. See
index::find_checked_indexes
for details.
force_loop_bounding: bool
See Writer::emit_force_bounded_loop_macro
for details.
Implementations§
source§impl<'a> ExpressionContext<'a>
impl<'a> ExpressionContext<'a>
fn resolve_type(&self, handle: Handle<Expression>) -> &'a TypeInner
sourcefn image_needs_lod(&self, image: Handle<Expression>) -> bool
fn image_needs_lod(&self, image: Handle<Expression>) -> bool
Return true if calls to image
’s read
and write
methods should supply a level of detail.
Only mipmapped images need to specify a level of detail. Since 1D textures cannot have mipmaps, MSL requires that the level argument to texture1d queries and accesses must be a constexpr 0. It’s easiest just to omit the level entirely for 1D textures.
fn choose_bounds_check_policy( &self, pointer: Handle<Expression>, ) -> BoundsCheckPolicy
fn access_needs_check( &self, base: Handle<Expression>, index: GuardedIndex, ) -> Option<IndexableLength>
fn get_packed_vec_kind(&self, expr_handle: Handle<Expression>) -> Option<Scalar>
Auto Trait Implementations§
impl<'a> Freeze for ExpressionContext<'a>
impl<'a> RefUnwindSafe for ExpressionContext<'a>
impl<'a> Send for ExpressionContext<'a>
impl<'a> Sync for ExpressionContext<'a>
impl<'a> Unpin for ExpressionContext<'a>
impl<'a> UnwindSafe for ExpressionContext<'a>
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