Struct naga::front::glsl::ShaderMetadata

source ·
pub struct ShaderMetadata {
    pub version: u16,
    pub profile: Profile,
    pub stage: ShaderStage,
    pub workgroup_size: [u32; 3],
    pub early_fragment_tests: bool,
    pub extensions: FastHashSet<String>,
}
Expand description

Additional information about the GLSL shader.

Stores additional information about the GLSL shader which might not be stored in the shader Module.

Fields§

§version: u16

The GLSL version specified in the shader through the use of the #version preprocessor directive.

§profile: Profile

The GLSL profile specified in the shader through the use of the #version preprocessor directive.

§stage: ShaderStage

The shader stage in the pipeline, passed to the parse method via the Options struct.

§workgroup_size: [u32; 3]

The workgroup size for compute shaders, defaults to [1; 3] for compute shaders and [0; 3] for non compute shaders.

§early_fragment_tests: bool

Whether or not early fragment tests where requested by the shader. Defaults to false.

§extensions: FastHashSet<String>

The shader can request extensions via the #extension preprocessor directive, in the directive a behavior parameter is used to control whether the extension should be disabled, warn on usage, enabled if possible or required.

This field only stores extensions which were required or requested to be enabled if possible and they are supported.

Trait Implementations§

source§

impl Debug for ShaderMetadata

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ShaderMetadata

source§

fn default() -> Self

Returns the “default value” for a type. Read more

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>,

§

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>,

§

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.