pub struct Variant {
pub group: usize,
pub blob_index: u32,
pub keywords: Vec<String>,
pub gpu_program_type: i64,
pub requirements: i64,
pub parameter_blob: Option<u32>,
pub parameters: Option<Parameters>,
}Expand description
One compiled variant: the blob entry holding its code, its keywords, its GPU program type (Unity’s
ShaderGpuProgramType: 17 a D3D11 pixel program before 2021.2, 18 an SM 5.0 one after) and its shader
requirements mask; group is the index of the player sub-program list it is in (from 2021.2) or its hardware tier
(before); parameters its own, where the player stores them per variant (before 2021.2), else None: the pass’s.
Fields§
§group: usizeThe index of the player sub-program list the variant is in (2021.2 on), or its hardware tier (before).
blob_index: u32The entry of the platform’s blob that holds the variant’s program record.
keywords: Vec<String>The keywords the variant is compiled with.
gpu_program_type: i64Unity’s ShaderGpuProgramType.
requirements: i64The shader requirements mask.
parameter_blob: Option<u32>The blob entry holding this variant’s own parameters, where the player stores them there (from 2021.2:
m_ParameterBlobIndices, parallel to the sub-program lists).
parameters: Option<Parameters>The variant’s own parameters, where the player stores them per variant (before 2021.2); None: the pass
program’s.
Trait Implementations§
impl Eq for Variant
impl StructuralPartialEq for Variant
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnsafeUnpin for Variant
impl UnwindSafe for Variant
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.