pub struct EngineShaders {
pub image_sampler: bool,
pub strip: ShaderId,
pub strip_classes: [ShaderId; 7],
pub strip_layout: PipelineLayout,
pub atlas_strip: ShaderId,
pub atlas_layout: PipelineLayout,
pub clear: ShaderId,
pub copy: ShaderId,
pub filter: ShaderId,
}Expand description
The engine’s compiled shader modules, by id, and the one explicit layout every strip pipeline is built against.
Registered once at start-up into the ShaderLibrary a
PipelineCache is built over; a RenderPipelineDesc then names its
program by id rather than by source.
Fields§
§image_sampler: boolWhether the strip programs are the image-sampler family (see the module doc’s The program family).
strip: ShaderIdThe whole sparse-strip rasterizer — the PaintClass::Uber program,
shared by all six strip states.
strip_classes: [ShaderId; 7]The strip program’s specialisations, one per
PaintClass::SPECIALISED entry, in that order.
strip_layout: PipelineLayoutThe explicit layout every strip pipeline, of every class, is built
against (crate::gpu::bindings::strip_pipeline_layout).
atlas_strip: ShaderIdThe program the atlas-layer pass draws with: Self::strip in the
manual family, the manual family’s Uber program in the sampler one.
atlas_layout: PipelineLayoutThe layout the atlas-layer pass is built against: Self::strip_layout
in the manual family, the manual family’s layout in the sampler one.
clear: ShaderIdRegion and fullscreen clears.
copy: ShaderIdRectangular region copies.
filter: ShaderIdOne pass of a layer filter’s sequence.
Implementations§
Source§impl EngineShaders
impl EngineShaders
Sourcepub fn register(library: &mut ShaderLibrary, device: &Device) -> Self
pub fn register(library: &mut ShaderLibrary, device: &Device) -> Self
Self::register_family for the family the process configuration
names (FRUST_ENGINE_IMAGE_SAMPLER,
crate::config::image_sampler_enabled).
Sourcepub fn register_family(
library: &mut ShaderLibrary,
device: &Device,
image_sampler: bool,
) -> Self
pub fn register_family( library: &mut ShaderLibrary, device: &Device, image_sampler: bool, ) -> Self
Compiles the strip program of the family image_sampler names — its
Uber program and every class specialisation — and the clear, copy and
filter modules into library, returning their ids beside a freshly
created strip layout of that family.
The sampler family also compiles the manual family’s Uber program and layout, which its atlas-layer pass draws with (see the module doc’s The program family): one more module and one more layout, nothing else.
Insertion is idempotent per name, so calling this twice against the
same library returns the same ids without recompiling (the layout is
a new object each call — a desc compares layouts by identity, so keep
one EngineShaders per cache).
Sourcepub fn strip_class(&self, class: PaintClass) -> ShaderId
pub fn strip_class(&self, class: PaintClass) -> ShaderId
The registered id of the strip program specialised for class.
Trait Implementations§
Source§impl Clone for EngineShaders
impl Clone for EngineShaders
Source§impl Debug for EngineShaders
impl Debug for EngineShaders
impl Eq for EngineShaders
Source§impl PartialEq for EngineShaders
impl PartialEq for EngineShaders
impl StructuralPartialEq for EngineShaders
Auto Trait Implementations§
impl !RefUnwindSafe for EngineShaders
impl !UnwindSafe for EngineShaders
impl Freeze for EngineShaders
impl Send for EngineShaders
impl Sync for EngineShaders
impl Unpin for EngineShaders
impl UnsafeUnpin for EngineShaders
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.