makepad_shader_compiler::shader_registry

Struct ShaderRegistry

Source
pub struct ShaderRegistry {
    pub all_fns: HashMap<FnPtr, FnDef>,
    pub draw_shader_defs: HashMap<DrawShaderPtr, DrawShaderDef>,
    pub structs: HashMap<StructPtr, StructDef>,
    pub builtins: HashMap<Ident, Builtin>,
    pub enums: HashMap<LiveType, ShaderEnum>,
}

Fields§

§all_fns: HashMap<FnPtr, FnDef>§draw_shader_defs: HashMap<DrawShaderPtr, DrawShaderDef>§structs: HashMap<StructPtr, StructDef>§builtins: HashMap<Ident, Builtin>§enums: HashMap<LiveType, ShaderEnum>

Implementations§

Source§

impl ShaderRegistry

Source

pub fn new() -> Self

Source§

impl ShaderRegistry

Source

pub fn flush_registry(&mut self)

Source

pub fn register_enum(&mut self, live_type: LiveType, shader_enum: ShaderEnum)

Source

pub fn compute_const_table( &self, draw_shader_ptr: DrawShaderPtr, ) -> DrawShaderConstTable

Source

pub fn fn_ident_from_ptr( &self, live_registry: &LiveRegistry, fn_node_ptr: FnPtr, ) -> Ident

Source

pub fn draw_shader_method_ptr_from_ident( &self, draw_shader_def: &DrawShaderDef, ident: Ident, ) -> Option<FnPtr>

Source

pub fn struct_method_ptr_from_ident( &self, struct_def: &StructDef, ident: Ident, ) -> Option<FnPtr>

Source

pub fn draw_shader_method_decl_from_ident( &self, draw_shader_def: &DrawShaderDef, ident: Ident, ) -> Option<&FnDef>

Source

pub fn struct_method_decl_from_ident( &self, struct_def: &StructDef, ident: Ident, ) -> Option<&FnDef>

Source

pub fn find_live_node_by_path( &self, live_registry: &LiveRegistry, base_ptr: LivePtr, ids: &[LiveId], ) -> LiveNodeFindResult

Source

pub fn analyse_deps( &mut self, live_registry: &LiveRegistry, deps: &[ShaderParserDep], ) -> Result<(), LiveError>

Source

pub fn analyse_plain_fn( &mut self, live_registry: &LiveRegistry, struct_ptr: Option<StructPtr>, fn_ptr: FnPtr, ) -> Result<(), LiveError>

Source

pub fn analyse_struct( &mut self, live_registry: &LiveRegistry, struct_ptr: StructPtr, ) -> Result<(), LiveError>

Source

pub fn analyse_draw_shader<F>( &mut self, live_registry: &LiveRegistry, draw_shader_ptr: DrawShaderPtr, ext_self: F, ) -> Result<(), LiveError>

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.